id
stringlengths
1
6
tokens
sequence
labels
sequence
1200
[ "import", "{", "Tooltip", "}", "from", "'@rexd/core'", ";", "import", "{", "Icon", "}", "from", "'@rexd/icon'", ";", "import", "cx", "from", "'classnames'", ";", "import", "React", ",", "{", "ReactNode", "}", "from", "'react'", ";", "import", "styled", "from", "'styled-components'", ";", "function", "asCSSLength", "(", "len", ")", "{", "return", "typeof", "len", "===", "'number'", "?", "`${", "len", "}px`", ":", "len", ";", "}", "const", "FormLayoutContainer", "=", "styled", ".", "div", "`\n --label-width: auto;\n --control-width: auto;\n --form-item-gap: 0;\n font-size: 12px;\n\n .form-item {\n margin-bottom: var(--form-item-gap);\n }\n\n .form-item.minimal {\n margin-bottom: 0;\n\n > .error-message,\n > .form-item-label {\n display: none;\n }\n }\n\n &.horizontal {\n .form-item {\n display: flex;\n }\n\n .form-item-label {\n flex: 0 0 var(--label-width);\n padding-top: 8px;\n padding-right: 12px;\n text-align: right;\n line-height: 1.5;\n }\n }\n\n &.vertical {\n .form-item-label {\n font-size: 12px;\n line-height: 1.5;\n margin-bottom: 4px;\n }\n }\n\n .form-item-preview {\n > .form-item-label {\n padding-top: 0;\n }\n > .form-item-control {\n line-height: 1.5;\n }\n }\n\n .required-indicator {\n margin-right: 4px;\n color: #eb4141;\n ::before {\n content: '*';\n }\n }\n\n .error-message {\n margin-top: 4px;\n color: #eb4141;\n }\n\n .tip {\n margin-left: 4px;\n color: #999;\n height: 18px;\n vertical-align: top;\n }\n\n .help {\n color: #999999;\n margin-top: 4px;\n line-height: 1.5;\n }\n\n .form-item-control {\n width: var(--control-width);\n\n > .next-input,\n > .next-select {\n width: 100%;\n }\n\n > .next-range {\n padding: 8px 0;\n }\n\n > .next-checkbox-group,\n > .next-radio-group,\n > .next-checkbox-wrapper {\n display: inline-block;\n line-height: 18px;\n }\n }\n\n &.horizontal .form-item-control {\n > .next-checkbox-group,\n > .next-radio-group,\n > .next-checkbox-wrapper {\n padding-top: 8px;\n }\n }\n`", ";", "export", "interface", "FormLayoutParams", "{", "/** 标签位置,可选 'left' 或 'top' */", "labelPosition", "?", ":", "'left'", "|", "'top'", ";", "/** 标签宽度 */", "labelWidth", "?", ":", "string", "|", "number", ";", "/** 控件宽度 */", "controlWidth", "?", ":", "string", "|", "number", ";", "/** 两个 form item 之间的间距 */", "formItemGap", "?", ":", "string", "|", "number", ";", "}", "export", "interface", "FormLayoutProps", "extends", "Partial", "<", "FormLayoutParams", ">", "{", "style", "?", ":", "React", ".", "CSSProperties", ";", "className", "?", ":", "string", ";", "children", "?", ":", "ReactNode", ";", "}", "export", "function", "FormLayout", "(", "{", "children", ",", "className", ",", "style", ",", "labelPosition", "=", "'left'", ",", "labelWidth", "=", "labelPosition", "===", "'left'", "?", "120", ":", "'auto'", ",", "formItemGap", "=", "labelPosition", "===", "'left'", "?", "12", ":", "16", ",", "controlWidth", "=", "320", ",", "}", ")", "{", "return", "(", "<", "FormLayoutContainer", "style", "=", "{", "{", "'--label-width'", ":", "asCSSLength", "(", "labelWidth", ")", ",", "'--control-width'", ":", "asCSSLength", "(", "controlWidth", ")", ",", "'--form-item-gap'", ":", "asCSSLength", "(", "formItemGap", ")", ",", "...", "style", ",", "}", "as", "any", "}", "className", "=", "{", "cx", "(", "{", "horizontal", ":", "labelPosition", "===", "'left'", ",", "vertical", ":", "labelPosition", "===", "'top'", ",", "}", ",", "className", ")", "}", ">", "{", "children", "}", "<", "/FormLayoutContainer>);", "}", "const", "FormItemGroupDiv", "=", "styled", ".", "div", "`\n ${", "FormLayoutContainer", "}.horizontal & {\n display: flex;\n }\n\n &.inline {\n .form-item-group-content {\n display: flex;\n }\n }\n`", ";", "export", "interface", "FormItemGroupProps", "{", "label", "?", ":", "React", ".", "ReactNode", ";", "tip", "?", ":", "React", ".", "ReactNode", ";", "asterisk", "?", ":", "boolean", ";", "children", "?", ":", "React", ".", "ReactNode", ";", "labelWidth", "?", ":", "number", "|", "string", ";", "controlWidth", "?", ":", "number", "|", "string", ";", "className", "?", ":", "string", ";", "style", "?", ":", "React", ".", "CSSProperties", ";", "inline", "?", ":", "boolean", ";", "}", "export", "const", "FormItemGroup", "=", "(", "{", "label", ",", "asterisk", ",", "tip", ",", "children", ",", "labelWidth", ",", "controlWidth", ",", "className", ",", "style", ",", "inline", ",", "}", ")", "=>", "{", "return", "(", "<", "FormItemGroupDiv", "className", "=", "{", "cx", "(", "'form-item-group'", ",", "{", "inline", "}", ",", "className", ")", "}", "style", "=", "{", "style", "}", ">", "{", "label", "==", "null", "&&", "tip", "==", "null", "?", "null", ":", "(", "<", "div", "className", "=", "\"form-item-label\"", ">", "{", "asterisk", "&&", "<", "span", "className", "=", "\"required-indicator\"", "/", ">", "}", "{", "label", "&&", "<", "span", "className", "=", "\"form-item-label-text\"", ">", "{", "label", "}", "<", "/span>}", "{", "tip", "&&", "<", "Tip", "title", "=", "{", "tip", "}", "/>}", "<", "/div>)}", "<", "div", "className", "=", "\"form-item-group-content\"", "style", "=", "{", "{", "'--label-width'", ":", "asCSSLength", "(", "labelWidth", ")", ",", "'--control-width'", ":", "asCSSLength", "(", "controlWidth", ")", ",", "}", "as", "any", "}", ">", "{", "children", "}", "<", "/div>", "<", "/FormItemGroupDiv>);", "}", ";", "const", "Tip", "=", "(", "{", "title", "}", ")", "=>", "(", "<", "Tooltip", "interactionKind", "=", "\"hover\"", "title", "=", "{", "title", "}", "renderTarget", "=", "{", "(", "arg", ")", "=>", "<", "Icon", "{", "...", "arg", "}", "type", "=", "\"prompt\"", "className", "=", "\"tip\"", "/", ">", "}", "/>);", "export", "interface", "FormItemViewProps", "{", "label", ":", "React", ".", "ReactNode", ";", "help", "?", ":", "React", ".", "ReactNode", ";", "tip", "?", ":", "React", ".", "ReactNode", ";", "asterisk", "?", ":", "boolean", ";", "error", "?", ":", "React", ".", "ReactNode", ";", "children", ":", "React", ".", "ReactNode", ";", "style", "?", ":", "React", ".", "CSSProperties", ";", "className", "?", ":", "string", ";", "}", "export", "function", "FormItemView", "(", "{", "label", ",", "help", ",", "tip", ",", "asterisk", ",", "error", ",", "children", ",", "className", ",", "style", "}", ")", "{", "return", "(", "<", "div", "className", "=", "{", "cx", "(", "'form-item'", ",", "className", ")", "}", "style", "=", "{", "style", "}", ">", "{", "label", "==", "null", "&&", "tip", "==", "null", "?", "null", ":", "(", "<", "div", "className", "=", "\"form-item-label\"", ">", "{", "asterisk", "&&", "<", "span", "className", "=", "\"required-indicator\"", "/", ">", "}", "{", "label", "&&", "<", "span", "className", "=", "\"form-item-label-text\"", ">", "{", "label", "}", "<", "/span>}", "{", "tip", "&&", "<", "Tip", "title", "=", "{", "tip", "}", "/>}", "<", "/div>)}", "<", "div", "className", "=", "\"form-item-control\"", ">", "{", "children", "}", "{", "help", "&&", "<", "div", "className", "=", "\"help\"", ">", "{", "help", "}", "<", "/div>}", "{", "error", "&&", "<", "div", "className", "=", "\"error-message\"", ">", "{", "error", "}", "<", "/div>}", "<", "/div>", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1201
[ "import", "React", ",", "{", "useContext", ",", "useState", "}", "from", "'react'", ";", "import", "{", "composeState", "}", "from", "'./common-utils'", ";", "import", "{", "FormItemGroup", ",", "FormItemView", ",", "FormLayout", ",", "FormLayoutParams", "}", "from", "'./form-ui'", ";", "import", "{", "FormModel", ",", "IModel", "}", "from", "'./models'", ";", "export", "const", "ModelContext", "=", "React", ".", "createContext", "<", "IModel", "<", "any", ">", ">", "(", "null", ")", ";", "ModelContext", ".", "displayName", "=", "'ModelContext'", ";", "const", "ModelProvider", "=", "ModelContext", ".", "Provider", ";", "export", "function", "useModel", "<", "T", "=", "any", ">", "(", ")", "{", "return", "useContext", "(", "ModelContext", ")", "as", "IModel", "<", "T", ">", ";", "}", "export", "interface", "FormEnvContextType", "{", "/** 提交表单时的回调函数,需配合 <Form.Submit /> 使用 */", "onSubmit", "?", "(", "submitValues", ",", "model", ")", ":", "void", ";", "/** 提交表单时的出错回调函数,需配合 <Form.Submit /> 使用 */", "onError", "?", "(", "errors", ",", "model", ")", ":", "void", ";", "/** 清空表单时的回调函数,需配合 <Form.Reset /> 使用 */", "onReset", "?", "(", "model", ")", ":", "void", ";", "default", "isPreview", "?", ":", "boolean", ";", "default", "validateOnMount", "?", ":", "boolean", ";", "default", "validateOnChange", "?", ":", "boolean", ";", "default", "validateOnBlur", "?", ":", "boolean", ";", "}", "export", "interface", "FormProps", "<", "T", ">", "extends", "FormEnvContextType", "{", "/** 受控用法。 xform 模型对象,一般由上层通过 new FormModel(...) 创建而成 */", "model", "?", ":", "FormModel", "<", "T", ">", ";", "/** 非受控用法。 表单的默认值 */", "defaultValue", "?", ":", "T", ";", "category", "style", "?", ":", "React", ".", "CSSProperties", ";", "category", "className", "?", ":", "string", ";", "category", "layout", "?", ":", "FormLayoutParams", ";", "children", "?", ":", "React", ".", "ReactNode", ";", "}", "export", "function", "Form", "<", "T", ">", "(", "{", "model", ":", "modelProp", ",", "defaultValue", ",", "children", ",", "className", ",", "style", ",", "layout", ",", "...", "envProps", "}", ")", "{", "const", "[", "_model", "]", "=", "useState", "(", "(", ")", "=>", "new", "FormModel", "(", "defaultValue", ")", ")", ";", "const", "model", "=", "composeState", "(", "modelProp", ",", "_model", "as", "any", ")", ";", "return", "(", "<", "ModelProvider", "value", "=", "{", "model", "}", ">", "<", "FormLayout", "style", "=", "{", "style", "}", "className", "=", "{", "className", "}", "{", "...", "layout", "}", ">", "{", "children", "}", "<", "/FormLayout>", "<", "/ModelProvider>);", "}", "Form", ".", "ModelProvider", "=", "ModelProvider", ";", "Form", ".", "Layout", "=", "FormLayout", ";", "Form", ".", "ItemGroup", "=", "FormItemGroup", ";", "Form", ".", "ItemView", "=", "FormItemView", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 31, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 379, null, null, null, null, null, null, null, 896, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 896, null, null, null, null, null, null, null, null, null, null, 896, null, null, null, null, null, null, null, null, 896, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1202
[ "import", "{", "Input", "}", "from", "'@rexd/core'", ";", "import", "cx", "from", "'classnames'", ";", "import", "{", "pick", "}", "from", "'lodash-es'", ";", "import", "{", "toJS", "}", "from", "'mobx'", ";", "import", "{", "observer", "}", "from", "'mobx-react-lite'", ";", "import", "React", ",", "{", "useEffect", "}", "from", "'react'", ";", "import", "{", "composeState", "}", "from", "'./common-utils'", ";", "import", "{", "useModel", "}", "from", "'./form'", ";", "import", "{", "FormItemView", "}", "from", "'./form-ui'", ";", "import", "{", "Field", ",", "FieldConfig", ",", "IModel", "}", "from", "'./models'", ";", "function", "resolveField", "(", "fieldProp", ",", "model", ",", "name", ")", "{", "let", "field", ";", "if", "(", "fieldProp", "!=", "null", ")", "{", "field", "=", "fieldProp", ";", "}", "else", "if", "(", "name", "===", "'&'", ")", "{", "field", "=", "model", ".", "_asField", "(", ")", ";", "}", "else", "if", "(", "name", "!=", "null", ")", "{", "field", "=", "(", "model", "as", "IModel", "<", "any", ">", ")", ".", "getField", "(", "name", ")", ";", "}", "else", "{", "throw", "new", "Error", "(", "'<FormItem /> 必须通过 name 或 field 来指定对应的数据索引'", ")", ";", "}", "return", "field", ";", "}", "export", "interface", "FormItemComponentProps", "{", "value", "?", ":", "any", ";", "onChange", "?", "(", "...", "args", ")", ":", "void", ";", "onBlur", "?", "(", "...", "args", ")", ":", "void", ";", "readOnly", "?", ":", "any", ";", "disabled", "?", ":", "any", ";", "[", "prop", "]", ":", "any", ";", "}", "export", "interface", "FormItemCreationOptions", "{", "/** 名称 */", "name", ":", "string", ";", "/** 控件对应的 React 组件,例如 `<FormItem component=\"select\" />` 对应 `Select` 组件. */", "component", "?", ":", "React", ".", "ComponentType", "<", "FormItemComponentProps", ">", ";", "/** 控件渲染方法,与 component 参数二选一,优先级高于 component */", "render", "?", "(", "arg", ")", ":", "React", ".", "ReactElement", ";", "/** 组件值的属性名称,默认为 `'value'` */", "valuePropName", "?", ":", "string", ";", "/** 组件状态值的属性名称,默认为 `'status'` */", "statusPropName", "?", ":", "string", ";", "/** 预览态下组件的渲染方法。如果不设置该方法,预览态下将使用 render/component 作为后备方案. */", "renderPreview", "?", "(", "props", ")", ":", "React", ".", "ReactNode", ";", "/** 当模型中的字段值为空(undefined)时,渲染控件所使用的值 */", "fallbackValue", ":", "any", ";", "/** 组件类型默认的空值判断方法 */", "isEmpty", "(", "value", ")", ":", "boolean", ";", "}", "export", "function", "createFormItem", "(", "options", ")", "{", "const", "statusPropName", "=", "options", ".", "statusPropName", "??", "'status'", ";", "const", "valuePropName", "=", "options", ".", "valuePropName", "??", "'value'", ";", "function", "FormItemComponent", "(", "{", "fallbackValue", "=", "options", ".", "fallbackValue", ",", "isEmpty", "=", "options", ".", "isEmpty", ",", "renderPreview", "=", "options", ".", "renderPreview", ",", "componentProps", ":", "componentPropsProp", ",", "name", ",", "field", ":", "fieldProp", ",", "...", "props", "}", ")", "{", "const", "model", "=", "useModel", "(", ")", ";", "const", "field", "=", "resolveField", "(", "fieldProp", ",", "model", ",", "name", ")", ";", "const", "fieldConfig", "=", "{", "fallbackValue", ",", "isEmpty", ",", "...", "props", ",", "}", ";", "field", ".", "_useTrack", "(", "fieldConfig", ")", ";", "useEffect", "(", "(", ")", "=>", "{", "if", "(", "fieldConfig", ".", "validateOnMount", ")", "{", "field", ".", "validate", "(", "'mount'", ")", ";", "const", "cancel", "=", "field", ".", "state", ".", "cancelValidation", ";", "return", "(", ")", "=>", "{", "cancel", "?.", "(", ")", ";", "}", ";", "}", "}", ",", "[", "]", ")", ";", "const", "error", "=", "field", ".", "state", ".", "error", ";", "const", "value", "=", "toJS", "(", "composeState", "(", "field", ".", "value", ",", "fallbackValue", ")", ")", ";", "const", "componentProps", "=", "{", "...", "pick", "(", "props", ",", "[", "'dataSource'", ",", "'readOnly'", ",", "'disabled'", "]", ")", ",", "...", "componentPropsProp", ",", "[", "statusPropName", "]", ":", "composeState", "(", "componentPropsProp", "?.", "[", "statusPropName", "]", ",", "composeState", "(", "props", "[", "statusPropName", "]", ",", "error", "?", "'error'", ":", "undefined", ")", ")", ",", "[", "valuePropName", "]", ":", "composeState", "(", "props", "[", "valuePropName", "]", ",", "value", ")", ",", "onChange", ":", "composeState", "(", "props", ".", "onChange", ",", "field", ".", "handleChange", ")", ",", "onBlur", ":", "composeState", "(", "props", ".", "onBlur", ",", "field", ".", "handleBlur", ")", ",", "}", ";", "let", "children", ";", "if", "(", "options", ".", "render", ")", "{", "children", "=", "options", ".", "render", "(", "componentProps", ")", ";", "}", "else", "{", "children", "=", "<", "options", ".", "component", "{", "...", "componentProps", "}", "/", ">", ";", "}", "return", "(", "<", "FormItemView", "label", "=", "{", "props", ".", "label", "}", "help", "=", "{", "props", ".", "help", "}", "asterisk", "=", "{", "props", ".", "asterisk", "??", "props", ".", "required", "}", "error", "=", "{", "error", "}", "tip", "=", "{", "props", ".", "tip", "}", "style", "=", "{", "props", ".", "style", "}", "className", "=", "{", "cx", "(", "props", ".", "className", ")", "}", ">", "{", "children", "}", "<", "/FormItemView>);", "}", "FormItemComponent", ".", "displayName", "=", "`FormItem__${", "options", ".", "name", "}`", ";", "return", "observer", "(", "FormItemComponent", ")", ";", "}", "const", "COMPONENT_DICT", "=", "{", "input", ":", "createFormItem", "(", "{", "name", ":", "'input'", ",", "component", ":", "Input", ",", "fallbackValue", ":", "''", ",", "isEmpty", ":", "function", "(", "value", ")", "{", "return", "!", "value", ";", "}", ",", "}", ")", ",", "}", ";", "const", "NotFound", "=", "createFormItem", "(", "{", "name", ":", "'notFound'", ",", "fallbackValue", ":", "null", ",", "isEmpty", ":", "(", ")", "=>", "false", ",", "render", "(", "{", "component", "}", ")", "{", "return", "(", "<", "div", "style", "=", "{", "{", "border", ":", "'1px dashed red'", ",", "fontSize", ":", "14", ",", "padding", ":", "4", ",", "color", ":", "'red'", "}", "}", ">", "<", "code", ">", "&", "lt", ";", "FormItem", "component", "=", "'{component}'", "/", "&", "gt", ";", "<", "/code> 没有找到对应组件,请检查组件名称是否拼写正确", "<", "/div>);", "}", ",", "}", ")", ";", "export", "interface", "FormItemProps", "extends", "FieldConfig", "<", "any", ">", "{", "component", ":", "string", ";", "componentProps", "?", ":", "any", ";", "dataSource", "?", ":", "any", ";", "style", "?", ":", "React", ".", "CSSProperties", ";", "className", "?", ":", "string", ";", "name", "?", ":", "string", ";", "field", "?", ":", "Field", ";", "value", "?", ":", "any", ";", "onChange", "?", "(", "nextValue", ")", ":", "void", ";", "onBlur", "?", "(", ")", ":", "void", ";", "renderPreview", "?", "(", "props", ")", ":", "React", ".", "ReactNode", ";", "}", "export", "function", "FormItem", "(", "{", "component", ",", "...", "props", "}", ")", "{", "const", "Comp", "=", "COMPONENT_DICT", "[", "component", "]", ";", "if", "(", "Comp", "==", "null", ")", "{", "return", "<", "NotFound", "{", "...", "props", "}", "componentProps", "=", "{", "{", "component", "}", "}", "/>;", "}", "return", "React", ".", "createElement", "(", "Comp", ",", "props", ")", ";", "}", "FormItem", ".", "register", "=", "(", "options", ")", "=>", "{", "COMPONENT_DICT", "[", "options", ".", "name", "]", "=", "createFormItem", "(", "options", ")", ";", "}", ";", "FormItem", ".", "COMPONENT_DICT", "=", "COMPONENT_DICT", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 254, null, 254, null, 896, null, 2, null, null, null, 254, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, 2, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1203
[ "interface", "FactoryConfig", "{", "width", "?", ":", "number", ";", "height", "?", ":", "number", ";", "diagonal", "?", ":", "number", ";", "/**\n * 最小阅读距离\n */", "distance", "?", ":", "number", ";", "}", "function", "getLatestIntegerLargeThenNumber", "(", "num", ")", "{", "return", "Math", ".", "floor", "(", "num", "+", "1", ")", ";", "}", "function", "calculateFontSize", "(", "config", ")", "{", "const", "{", "width", ",", "height", ",", "diagonal", ",", "distance", "}", "=", "config", ";", "const", "ppi", "=", "Math", ".", "sqrt", "(", "width", "**", "2", "+", "height", "**", "2", ")", "/", "diagonal", ";", "const", "suggested", "=", "distance", "/", "70", "/", "0.3527", "/", "(", "72", "/", "ppi", ")", ";", "const", "min", "=", "distance", "/", "140", "/", "0.3527", "/", "(", "72", "/", "ppi", ")", ";", "const", "max", "=", "distance", "/", "55", "/", "0.3527", "/", "(", "72", "/", "ppi", ")", ";", "return", "{", "min", ":", "getLatestIntegerLargeThenNumber", "(", "min", ")", ",", "max", ":", "getLatestIntegerLargeThenNumber", "(", "max", ")", ",", "base", ":", "getLatestIntegerLargeThenNumber", "(", "suggested", ")", ",", "}", ";", "}", "interface", "FontListConfig", "{", "/**\n * 左侧个数\n */", "leftCount", "?", ":", "number", ";", "/**\n * 右侧个数\n */", "rightCount", "?", ":", "number", ";", "leftOffset", "?", ":", "number", ";", "rightOffset", "?", ":", "number", ";", "/**\n * 基准值\n */", "base", ":", "number", ";", "}", "function", "calulateFontList", "(", "config", ")", "{", "const", "{", "leftCount", "=", "2", ",", "rightCount", "=", "3", ",", "leftOffset", "=", "1", ",", "rightOffset", "=", "2", ",", "base", "}", "=", "config", ";", "const", "list", "=", "[", "]", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "leftCount", ";", "i", "++", ")", "{", "list", ".", "unshift", "(", "base", "-", "(", "i", "+", "1", ")", "*", "leftOffset", ")", ";", "}", "for", "(", "let", "i", "=", "0", ";", "i", "<=", "rightCount", ";", "i", "++", ")", "{", "list", ".", "push", "(", "base", "+", "i", "*", "rightOffset", ")", ";", "}", "return", "list", ";", "}", "const", "FONT_SIZE_TOKENS", "=", "[", "'note'", ",", "'body'", ",", "'subtitle'", ",", "'title'", ",", "'subheader'", ",", "'header'", "]", ";", "export", "function", "generateFontSizeTokens", "(", "config", ")", "{", "const", "size", "=", "calculateFontSize", "(", "config", ")", ";", "const", "fontSizeList", "=", "calulateFontList", "(", "{", "base", ":", "size", ".", "base", ",", "}", ")", ";", "const", "ret", "=", "{", "}", ";", "fontSizeList", ".", "forEach", "(", "(", "val", ",", "i", ")", "=>", "{", "ret", "[", "FONT_SIZE_TOKENS", "[", "i", "]", "]", "=", "val", ";", "}", ")", ";", "return", "ret", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, 0, null, null, null, 6, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1204
[ "import", "{", "ActionSheet", ",", "Box", ",", "Button", ",", "Dialog", ",", "extendTheme", ",", "Group", ",", "Image", ",", "THEMES", "}", "from", "'@rexd/core'", ";", "import", "{", "Icon", "}", "from", "'@rexd/icon'", ";", "import", "{", "observer", "}", "from", "'mobx-react-lite'", ";", "import", "React", "from", "'react'", ";", "import", "{", "ToggleButtonGroup", "}", "from", "'./components'", ";", "import", "{", "AudioIcon", ",", "EyeIcon", ",", "GestureIcon", ",", "MouseIcon", "}", "from", "'./icons'", ";", "import", "{", "Form", ",", "FormItem", ",", "FormModel", "}", "from", "'./mini-xform'", ";", "import", "{", "FormItemView", "}", "from", "'./mini-xform/form-ui'", ";", "import", "{", "generateFontSizeTokens", "}", "from", "'./token-factory'", ";", "export", "default", "{", "title", ":", "'Config/System'", ",", "}", ";", "const", "model", "=", "new", "FormModel", "(", "{", "distance", ":", "350", ",", "diagonal", ":", "21", ",", "width", ":", "1024", ",", "height", ":", "768", ",", "operation", ":", "'mouse'", ",", "}", ")", ";", "const", "downloads", "=", "[", "{", "key", ":", "'json'", ",", "label", ":", "'下载 JSON 文件'", "}", ",", "{", "key", ":", "'sketch'", ",", "label", ":", "'下载 Sketch 文件'", ",", "disabled", ":", "true", "}", ",", "]", ";", "const", "gifMap", "=", "{", "phone", ":", "'//img.alicdn.com/imgextra/i2/O1CN018Q4bIe1VbMZsZlIAL_!!6000000002671-1-tps-1080-810.gif'", ",", "desktop", ":", "'//img.alicdn.com/imgextra/i1/O1CN019VkD4J1bZszf4vCqV_!!6000000003480-1-tps-1080-810.gif'", ",", "}", ";", "const", "SCREEN_BREAKPOINT_FOR_PHONE", "=", "416", ";", "const", "getDevice", "=", "(", "width", ",", "operation", "?", ")", "=>", "{", "let", "device", "=", "'desktop'", ";", "if", "(", "width", "<", "SCREEN_BREAKPOINT_FOR_PHONE", "||", "operation", "===", "'gesture'", ")", "{", "device", "=", "'phone'", ";", "}", "return", "device", ";", "}", ";", "const", "iconProps", "=", "{", "width", ":", "'16px'", ",", "height", ":", "'16px'", ",", "}", ";", "const", "SystemInner", "=", "observer", "(", "(", ")", "=>", "{", "const", "operations", "=", "[", "{", "value", ":", "'mouse'", ",", "label", ":", "<", "MouseIcon", "{", "...", "iconProps", "}", "/", ">", ",", "title", ":", "'鼠标操作'", "}", ",", "{", "value", ":", "'gesture'", ",", "label", ":", "<", "GestureIcon", "{", "...", "iconProps", "}", "/", ">", ",", "title", ":", "'手势操作'", "}", ",", "{", "value", ":", "'eye'", ",", "label", ":", "<", "EyeIcon", "{", "...", "iconProps", "}", "/", ">", ",", "disabled", ":", "true", ",", "title", ":", "'仅阅读'", "}", ",", "{", "value", ":", "'audio'", ",", "label", ":", "<", "AudioIcon", "{", "...", "iconProps", "}", "/", ">", ",", "disabled", ":", "true", ",", "title", ":", "'语音操作'", "}", ",", "]", ";", "const", "handlePreview", "=", "(", ")", "=>", "{", "const", "device", "=", "getDevice", "(", "model", ".", "values", ".", "width", ",", "model", ".", "values", ".", "operation", ")", ";", "const", "fontSizes", "=", "generateFontSizeTokens", "(", "model", ".", "values", ")", ";", "Dialog", ".", "show", "(", "{", "title", ":", "'ReX 主题效果预览'", ",", "disableScroll", ":", "'force'", ",", "content", ":", "(", "<", "Box", "display", "=", "\"flex\"", ">", "<", "Box", "flex", "=", "\"1\"", ">", "<", "Image", "src", "=", "{", "gifMap", "[", "device", "]", "}", "width", "=", "\"400px\"", "/", ">", "<", "/Box>", "<", "Box", "flex", "=", "\"1\"", ">", "<", "Box", "fontSize", "=", "\"title\"", "pl", "=", "\"l\"", "mb", "=", "\"xl\"", ">", "根据最小视距推荐的字号序列", ":", "<", "/Box>", "<", "Box", ">", "{", "Object", ".", "keys", "(", "fontSizes", ")", ".", "map", "(", "(", "item", ")", "=>", "(", "<", "Box", "key", "=", "{", "item", "}", "px", "=", "\"l\"", "fontSize", "=", "\"14px\"", "lineHeight", "=", "{", "2", "}", ">", "<", "Box", "display", "=", "\"inline-block\"", "width", "=", "\"80px\"", "textAlign", "=", "\"right\"", "mr", "=", "\"m\"", "fontWeight", "=", "\"bold\"", ">", "{", "item", "}", "<", "/Box>", "<", "Box", "display", "=", "\"inline-block\"", ">", "{", "fontSizes", "[", "item", "]", "}", "px", "<", "/Box>", "<", "/Box>))}", "<", "/Box>", "<", "/Box>", "<", "/Box>),", "style", ":", "{", "width", ":", "800", ",", "}", ",", "}", ")", ";", "}", ";", "const", "handleDownload", "=", "(", "action", ")", "=>", "{", "const", "device", "=", "getDevice", "(", "model", ".", "values", ".", "width", ")", ";", "if", "(", "action", "===", "'json'", ")", "{", "const", "fontSizes", "=", "generateFontSizeTokens", "(", "model", ".", "values", ")", ";", "const", "theme", "=", "extendTheme", "(", "THEMES", ".", "light", "[", "device", "]", ",", "{", "fontSizes", "}", ")", ";", "const", "dataStr", "=", "`data:text/json;chartset=utf-8,${", "encodeURIComponent", "(", "JSON", ".", "stringify", "(", "theme", ")", ")", "}`", ";", "const", "node", "=", "document", ".", "createElement", "(", "'a'", ")", ";", "node", ".", "setAttribute", "(", "'href'", ",", "dataStr", ")", ";", "node", ".", "setAttribute", "(", "'download'", ",", "'theme.rex.json'", ")", ";", "document", ".", "body", ".", "appendChild", "(", "node", ")", ";", "node", ".", "click", "(", ")", ";", "node", ".", "remove", "(", ")", ";", "}", "else", "if", "(", "action", "===", "'sketch'", ")", "{", "}", "}", ";", "return", "(", "<", "Box", "display", "=", "\"flex\"", "borderRadius", "=", "\"l\"", "overflow", "=", "\"hidden\"", "position", "=", "\"relative\"", ">", "<", "Box", "flex", "=", "\"1\"", "pl", "=", "\"60px\"", "py", "=", "\"48px\"", "bg", "=", "\"#f0f0f0\"", ">", "<", "Form", "model", "=", "{", "model", "}", "layout", "=", "{", "{", "labelPosition", ":", "'top'", "}", "}", ">", "<", "FormItem", "component", "=", "\"input\"", "label", "=", "\"最小阅读距离\"", "name", "=", "\"distance\"", "componentProps", "=", "{", "{", "type", ":", "'number'", ",", "rightElement", ":", "<", "Box", "fontSize", "=", "\"body\"", ">", "mm", "<", "/Box>,", "min", ":", "200", ",", "max", ":", "10000", ",", "}", "}", "/>", "<", "FormItem", "component", "=", "\"input\"", "label", "=", "\"屏幕对角线\"", "name", "=", "\"diagonal\"", "componentProps", "=", "{", "{", "type", ":", "'number'", ",", "rightElement", ":", "<", "Box", "fontSize", "=", "\"body\"", ">", "英寸", "<", "/Box>,", "min", ":", "3", ",", "max", ":", "85", ",", "}", "}", "/>", "<", "Form", ".", "ItemGroup", "label", "=", "\"分辨率\"", "inline", "controlWidth", "=", "{", "240", "}", ">", "<", "FormItem", "component", "=", "\"input\"", "label", "=", "{", "null", "}", "name", "=", "\"width\"", "componentProps", "=", "{", "{", "placeholder", ":", "'宽度'", ",", "rightElement", ":", "<", "Box", "fontSize", "=", "\"body\"", ">", "px", "<", "/Box> }} style={{ marginRight: 12 }}/", ">", "<", "FormItem", "component", "=", "\"input\"", "label", "=", "{", "null", "}", "name", "=", "\"height\"", "componentProps", "=", "{", "{", "placeholder", ":", "'宽度'", ",", "rightElement", ":", "<", "Box", "fontSize", "=", "\"body\"", ">", "px", "<", "/Box> }}/", ">", "<", "/Form.ItemGroup>", "<", "FormItemView", "label", "=", "\"主要操作方式\"", ">", "<", "ToggleButtonGroup", "value", "=", "{", "model", ".", "getField", "(", "'operation'", ")", ".", "value", "}", "onChange", "=", "{", "model", ".", "getField", "(", "'operation'", ")", ".", "handleChange", "}", "{", "...", "{", "dataSource", ":", "operations", ",", "selectMode", ":", "'single'", ",", "buttonProps", ":", "{", "iconOnly", ":", "true", ",", "}", ",", "}", "}", "/>", "<", "/FormItemView>", "<", "Group", ">", "<", "Button", "onClick", "=", "{", "handlePreview", "}", ">", "预览效果", "<", "/Button>", "<", "ActionSheet", "target", "=", "{", "<", "Button", "type", "=", "\"primary\"", "rightElement", "=", "{", "<", "Icon", "type", "=", "\"arrow-down-bold\"", "/", ">", "}", ">", "确认下载组件", "<", "/Button>} dataSource={downloads} onItemClick={handleDownload}/", ">", "<", "/Group>", "<", "/Form>", "<", "/Box>", "<", "Box", "flexBasis", "=", "\"400px\"", "style", "=", "{", "{", "background", ":", "'url(https://img.alicdn.com/imgextra/i1/O1CN01cg5Nkk1R3gzn9k9rG_!!6000000002056-2-tps-800-1286.png) top left'", ",", "backgroundColor", ":", "'#2d3987'", ",", "backgroundSize", ":", "'cover'", ",", "backgroundPositionY", ":", "'-100px'", ",", "}", "}", "/>", "<", "Box", "position", "=", "\"absolute\"", "top", "=", "\"32px\"", "right", "=", "\"32px\"", ">", "<", "Image", "src", "=", "\"https://img.alicdn.com/imgextra/i2/O1CN01ReQtHu25fmZ7MZkba_!!6000000007554-55-tps-72-15.svg\"", "/", ">", "<", "/Box>", "<", "/Box>);", "}", ")", ";", "export", "const", "System", "=", "(", ")", "=>", "<", "SystemInner", "/>;" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9606, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, 2, null, null, 3, null, 2, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, 2, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 230, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null ]
1205
[ "import", "React", "from", "'react'", ";", "import", "{", "Box", "}", "from", "'@rexd/core'", ";", "export", "default", "{", "title", ":", "'Layout/Box'", "}", ";", "export", "const", "Basic", "=", "(", ")", "=>", "(", "<", "Box", "display", "=", "\"inline-block\"", "bg", "=", "\"emphasis.100\"", "color", "=", "\"emphasis.0\"", "p", "=", "\"l\"", "borderRadius", "=", "\"m\"", ">", "Hello", "World", "<", "/Box>);", "export", "const", "BorderBox", "=", "(", ")", "=>", "(", "<", "Box", ">", "<", "Box", "border", "=", "\"solid\"", "borderColor", "=", "\"line.border\"", "borderWidth", "=", "{", "2", "}", ">", "border", "box", "<", "/Box>", "<", "Box", "mt", "=", "\"l\"", "border", "=", "\"4px solid #FF0000\"", ">", "border", "box", "<", "/Box>", "<", "/Box>);", "export", "const", "Simple", "=", "(", ")", "=>", "(", "<", "Box", "bg", "=", "\"brand.normal\"", "p", "=", "\"m\"", "color", "=", "\"emphasis.0\"", "border", "=", "\"solid\"", "borderColor", "=", "\"line.border\"", "borderRadius", "=", "\"m\"", ">", "This", "is", "a", "simple", "box", ".", "<", "/Box>);", "export", "const", "As", "=", "(", ")", "=>", "(", "<", "Box", "as", "=", "\"button\"", "borderRadius", "=", "\"m\"", "bg", "=", "\"brand.normal\"", "color", "=", "\"white\"", ">", "hello", "<", "/Box>);" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1206
[ "import", "React", "from", "'react'", ";", "import", "styled", "from", "'styled-components'", ";", "import", "{", "Box", ",", "Flex", ",", "FlexItem", "}", "from", "'@rexd/core'", ";", "export", "default", "{", "title", ":", "'Layout/Flex'", ",", "component", ":", "Flex", "}", ";", "export", "const", "Simple", "=", "(", ")", "=>", "(", "<", "Flex", "spacing", "=", "\"l\"", "direction", "=", "\"row\"", ">", "<", "Box", "width", "=", "\"40px\"", "height", "=", "\"40px\"", "bg", "=", "\"brand.normal\"", "color", "=", "\"white\"", ">", "1", "<", "/Box>", "<", "Box", "width", "=", "\"40px\"", "height", "=", "\"40px\"", "bg", "=", "\"brand.normal\"", "color", "=", "\"white\"", ">", "2", "<", "/Box>", "<", "Box", "width", "=", "\"40px\"", "height", "=", "\"40px\"", "bg", "=", "\"brand.normal\"", "color", "=", "\"white\"", ">", "3", "<", "/Box>", "<", "/Flex>);", "export", "const", "VerticalStack", "=", "(", ")", "=>", "(", "<", "Flex", "spacing", "=", "\"l\"", "direction", "=", "\"column\"", ">", "<", "Box", "width", "=", "\"40px\"", "height", "=", "\"40px\"", "bg", "=", "\"brand.normal\"", "color", "=", "\"white\"", ">", "1", "<", "/Box>", "<", "Box", "width", "=", "\"40px\"", "height", "=", "\"40px\"", "bg", "=", "\"brand.normal\"", "color", "=", "\"white\"", ">", "2", "<", "/Box>", "<", "Box", "width", "=", "\"40px\"", "height", "=", "\"40px\"", "bg", "=", "\"brand.normal\"", "color", "=", "\"white\"", ">", "3", "<", "/Box>", "<", "/Flex>);", "const", "Example", "=", "styled", ".", "div", "`\n .rex-flex-item {\n padding: 12px 0;\n background-color: #ddd;\n border: 1px solid #ccc;\n text-align: center;\n }\n`", ";", "export", "const", "EqualCols", "=", "(", ")", "=>", "(", "<", "Example", ">", "<", "Flex", ">", "<", "FlexItem", ">", "1", "/", "3", "<", "/FlexItem>", "<", "FlexItem", ">", "1", "/", "3", "<", "/FlexItem>", "<", "FlexItem", ">", "1", "/", "3", "<", "/FlexItem>", "<", "/Flex>", "<", "/Example>);", "export", "const", "ColSpan", "=", "(", ")", "=>", "(", "<", "Example", ">", "<", "Flex", ">", "<", "FlexItem", "span", "=", "{", "1", "}", ">", "1", "/", "12", "<", "/FlexItem>", "<", "FlexItem", "span", "=", "{", "2", "}", ">", "1", "/", "6", "<", "/FlexItem>", "<", "FlexItem", "span", "=", "{", "3", "}", ">", "1", "/", "4", "<", "/FlexItem>", "<", "FlexItem", "span", "=", "{", "6", "}", ">", "1", "/", "2", "<", "/FlexItem>", "<", "/Flex>", "<", "/Example>);", "export", "const", "AutoCol", "=", "(", ")", "=>", "(", "<", "Example", ">", "<", "Flex", ">", "<", "FlexItem", ">", "item", "<", "/FlexItem>", "<", "FlexItem", "span", "=", "\"auto\"", ">", "动态宽度的内容", "<", "/FlexItem>", "<", "FlexItem", ">", "item", "<", "/FlexItem>", "<", "/Flex>", "<", "/Example>);", "export", "const", "ResponsiveCol", "=", "(", ")", "=>", "(", "<", "Example", ">", "<", "Flex", "wrap", "=", "\"wrap\"", ">", "<", "FlexItem", "span", "=", "{", "{", "s", ":", "12", ",", "m", ":", "6", ",", "l", ":", "4", "}", "}", ">", "responsive", "<", "/FlexItem>", "<", "FlexItem", ">", "item", "<", "/FlexItem>", "<", "FlexItem", ">", "item", "<", "/FlexItem>", "<", "/Flex>", "<", "/Example>);", "export", "const", "JustifyAndAlign", "=", "(", ")", "=>", "(", "<", "Example", ">", "<", "Flex", "justify", "=", "\"space-around\"", ">", "<", "FlexItem", "span", "=", "\"auto\"", ">", "一个居中的盒子", "<", "/FlexItem>", "<", "/Flex>", "<", "/Example>);" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1207
[ "import", "React", "from", "'react'", ";", "import", "{", "Box", ",", "Grid", ",", "GridItem", "}", "from", "'@rexd/core'", ";", "export", "default", "{", "title", ":", "'Layout/Grid'", "}", ";", "/**\n * 多列\n */", "export", "function", "Columns", "(", ")", "{", "return", "(", "<", "Grid", "columns", "=", "{", "3", "}", "spacing", "=", "{", "12", "}", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "/Grid>);", "}", "/**\n * 预设响应式\n */", "export", "function", "Responsive", "(", ")", "{", "return", "(", "<", "Grid", "columns", "=", "{", "{", "s", ":", "2", ",", "m", ":", "4", ",", "l", ":", "6", "}", "}", "spacing", "=", "\"12px\"", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "/Grid>);", "}", "/**\n * 自动响应式\n */", "export", "function", "AutoResponsive", "(", ")", "{", "return", "(", "<", "Grid", "minChildWidth", "=", "\"120px\"", "spacing", "=", "\"12px\"", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "/Grid>);", "}", "/**\n * 间距\n */", "export", "function", "Spacing", "(", ")", "{", "return", "(", "<", "Grid", "columns", "=", "{", "3", "}", "spacingX", "=", "{", "6", "}", "spacingY", "=", "{", "12", "}", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "Box", "bg", "=", "\"blue\"", "height", "=", "\"80px\"", "/", ">", "<", "/Grid>);", "}", "/**\n * 不同列宽\n */", "export", "function", "ColSpan", "(", ")", "{", "return", "(", "<", "Grid", "height", "=", "\"100px\"", "templateColumns", "=", "\"repeat(12, 1fr)\"", "gap", "=", "\"4px\"", ">", "<", "GridItem", "colSpan", "=", "{", "4", "}", "bg", "=", "\"blue\"", "/", ">", "<", "GridItem", "colSpan", "=", "{", "8", "}", "bg", "=", "\"orange\"", "/", ">", "<", "/Grid>);", "}", "/**\n * 自定义用法\n */", "export", "function", "Complex", "(", ")", "{", "return", "(", "<", "Grid", "height", "=", "\"200px\"", "templateRows", "=", "\"repeat(2, 1fr)\"", "templateColumns", "=", "\"repeat(5, 1fr)\"", "gap", "=", "\"4px\"", ">", "<", "GridItem", "rowSpan", "=", "{", "2", "}", "colSpan", "=", "{", "1", "}", "bg", "=", "\"black\"", "/", ">", "<", "GridItem", "colSpan", "=", "{", "2", "}", "bg", "=", "\"orange\"", "/", ">", "<", "GridItem", "colSpan", "=", "{", "2", "}", "bg", "=", "\"orange\"", "/", ">", "<", "GridItem", "colSpan", "=", "{", "4", "}", "bg", "=", "\"black\"", "/", ">", "<", "/Grid>);", "}", "export", "function", "StartEnd", "(", ")", "{", "return", "(", "<", "Grid", "templateColumns", "=", "\"repeat(5, 1fr)\"", "gap", "=", "\"4px\"", ">", "<", "GridItem", "colSpan", "=", "{", "2", "}", "height", "=", "\"40px\"", "bg", "=", "\"tomato\"", "/", ">", "<", "GridItem", "colStart", "=", "{", "4", "}", "colEnd", "=", "{", "6", "}", "height", "=", "\"40px\"", "bg", "=", "\"papayawhip\"", "/", ">", "<", "/Grid>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1208
[ "import", "React", "from", "'react'", ";", "import", "{", "Group", ",", "Button", ",", "Input", "}", "from", "'@rexd/core'", ";", "export", "default", "{", "title", ":", "'Layout/Group'", "}", ";", "export", "const", "Basic", "=", "(", ")", "=>", "(", "<", "Group", ">", "<", "Button", ">", "left", "<", "/Button>", "<", "Button", ">", "center", "<", "/Button>", "<", "Button", ">", "right", "<", "/Button>", "<", "/Group>);", "export", "const", "Attached", "=", "(", ")", "=>", "(", "<", "Group", "attached", ">", "<", "Button", ">", "left", "<", "/Button>", "<", "Button", ">", "center", "<", "/Button>", "<", "Button", ">", "right", "<", "/Button>", "<", "/Group>);", "export", "const", "More", "=", "(", ")", "=>", "(", "<", "Group", "attached", ">", "<", "Input", "/>", "<", "Button", ">", "search", "<", "/Button>", "<", "/Group>);" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1209
[ "import", "{", "AdaptiveDialog", ",", "AdaptivePopup", ",", "Button", ",", "Panel", "}", "from", "'@rexd/core'", ";", "import", "React", ",", "{", "useState", "}", "from", "'react'", ";", "import", "styled", "from", "'styled-components'", ";", "export", "default", "{", "title", ":", "'overlays / Adaptive'", "}", ";", "const", "StyledDiv", "=", "styled", "(", "Panel", ")", "`\n min-width: 300px;\n min-height: 100px;\n padding: 10px;\n`", ";", "function", "BalaBala", "(", ")", "{", "return", "(", "<", ">", "最近工作", ":", "高级经理", "|", "招商银行丨杭州分行", "|", "2009", "-", "07", "-", "01", "至今", "<", "br", "/", ">", "工作职责", ":", "巴拉巴拉小魔仙", "<", "br", "/", ">", "联系方式", ":", "67676767", "|", "1212121", "@", "163.", "con", "<", "br", "/", ">", "教育经理", ":", "北京大学", "|", "工商管理", "|", "2007", "-", "09", "-", "01", "至", "2006", "-", "06", "-", "01", "<", "br", "/", ">", "中央财经大学", "|", "2004", "-", "09", "-", "01", "至", "2007", "-", "06", "-", "01", "<", "/>);", "}", "export", "function", "BasicAdaptivePopup", "(", ")", "{", "return", "(", "<", "AdaptivePopup", "target", "=", "{", "<", "Button", ">", "尝试在不同端打开试试", "<", "/Button>} style={{ maxWidth: '92%' }} renderChildren={(arg) => (<StyledDiv {...arg}>", "<", "BalaBala", "/", ">", "<", "/StyledDiv>)}/", ">", ")", ";", "}", "export", "function", "NestedAdaptivePopup", "(", ")", "{", "return", "(", "<", "AdaptivePopup", "target", "=", "{", "<", "Button", ">", "查看详情", "<", "/Button>} style={{ maxWidth: '92%' }} renderChildren={(arg) => (<StyledDiv {...arg}>", "<", "BalaBala", "/", ">", "<", "AdaptivePopup", "target", "=", "{", "<", "Button", ">", "查看教育经历", "<", "/Button>} style={{ maxWidth: '92%' }} renderChildren={(arg2) => (<StyledDiv {...arg2}>", "1.", "北京大学", "|", "工商管理", "|", "2007", "-", "09", "-", "01", "至", "2006", "-", "06", "-", "01", "<", "br", "/", ">", "2.", "中央财经大学", "|", "2004", "-", "09", "-", "01", "至", "2007", "-", "06", "-", "01", "<", "/StyledDiv>)}/", ">", "<", "/StyledDiv>)}/", ">", ")", ";", "}", "export", "function", "BasicAdaptiveDialog", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "尝试在不同端打开试试", "<", "/Button>", "<", "AdaptiveDialog", "title", "=", "\"芭芭拉简历\"", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "canCloseByOutSideClick", "canCloseByEsc", "renderChildren", "=", "{", "(", "arg", ")", "=>", "(", "<", "Panel", "{", "...", "arg", "}", ">", "<", "BalaBala", "/>", "<", "/Panel>)}/", ">", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1210
[ "import", "{", "PositionOffset", ",", "PositionPlacement", "}", "from", "'@rexd/core'", ";", "export", "function", "getNextPlacement", "(", "p", ")", "{", "const", "array", "=", "[", "'center'", ",", "'top-left'", ",", "'top'", ",", "'top-right'", ",", "'left'", ",", "'right'", ",", "'bottom-left'", ",", "'bottom'", ",", "'bottom-right'", ",", "]", ";", "return", "array", "[", "(", "array", ".", "indexOf", "(", "p", ")", "+", "1", ")", "%", "array", ".", "length", "]", ";", "}", "export", "function", "getDialogOffsetFromPlacement", "(", "placement", ")", "{", "return", "[", "placement", ".", "includes", "(", "'left'", ")", "?", "16", ":", "placement", ".", "includes", "(", "'right'", ")", "?", "-", "16", ":", "0", ",", "placement", ".", "includes", "(", "'top'", ")", "?", "16", ":", "placement", ".", "includes", "(", "'bottom'", ")", "?", "-", "16", ":", "0", ",", "]", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, 31906, null, 31906, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 20791, null, 31906, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1211
[ "import", "{", "Button", ",", "Dialog", ",", "Drawer", ",", "PositionPlacement", "}", "from", "'@rexd/core'", ";", "import", "{", "Icon", "}", "from", "'@rexd/icon'", ";", "import", "_", "from", "'lodash-es'", ";", "import", "React", ",", "{", "useEffect", ",", "useState", "}", "from", "'react'", ";", "import", "{", "fromEvent", "}", "from", "'rxjs'", ";", "import", "{", "getDialogOffsetFromPlacement", ",", "getNextPlacement", "}", "from", "'./story-helpers'", ";", "export", "default", "{", "title", ":", "'overlays / Dialog'", "}", ";", "const", "hippoIntroduction", "=", "'盒马是阿里巴巴集团旗下,以数据和技术驱动的新零售平台。盒马希望为消费者打造社区化的一站式新零售体验中心,用科技和人情味带给人们“鲜美生活”。'", ";", "const", "alibabaIntroduction", "=", "'阿里巴巴集团创立于1999年,是一家提供电子商务在线交易平台的中国公司,实行位于杭州与北京的双总部制度。\\n'", "+", "'服务范围包括B2B贸易、网上零售、购物搜索引擎、第三方支付和云计算服务。'", ";", "export", "function", "Basic", "(", ")", "{", "const", "[", "state", ",", "setState", "]", "=", "useState", "(", "{", "visible", ":", "false", ",", "width", ":", "400", "}", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "16", ",", "flexWrap", ":", "'wrap'", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setState", "(", "{", "visible", ":", "true", ",", "width", ":", "300", "}", ")", "}", ">", "打开小号对话框", "(", "300", "px", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setState", "(", "{", "visible", ":", "true", ",", "width", ":", "450", "}", ")", "}", ">", "打开中号对话框", "(", "450", "px", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setState", "(", "{", "visible", ":", "true", ",", "width", ":", "800", "}", ")", "}", ">", "打开大号对话框", "(", "800", "px", ")", "<", "/Button>", "<", "/div>", "<", "Dialog", "title", "=", "\"盒马\"", "visible", "=", "{", "state", ".", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setState", "(", "{", "visible", ":", "false", ",", "width", ":", "state", ".", "width", "}", ")", "}", "style", "=", "{", "{", "width", ":", "state", ".", "width", "}", "}", ">", "{", "hippoIntroduction", "}", "<", "/Dialog>", "<", "/div>);", "}", "export", "function", "NonModal", "(", ")", "{", "const", "[", "state", ",", "setState", "]", "=", "useState", "(", "{", "visible", ":", "false", "}", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setState", "(", "{", "visible", ":", "true", "}", ")", "}", ">", "打开非模态对话框", "<", "/Button>", "<", "Dialog", "title", "=", "\"盒马\"", "visible", "=", "{", "state", ".", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setState", "(", "{", "visible", ":", "false", "}", ")", "}", "canCloseByEsc", "canCloseByIcon", "canCloseByOutSideClick", ">", "{", "hippoIntroduction", "}", "<", "/Dialog>", "<", "/div>);", "}", "export", "function", "Nested", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "innerVisible", ",", "setInnerVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开对话框", "<", "/Button>", "<", "Dialog", "title", "=", "\"阿里巴巴\"", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "canCloseByEsc", ">", "<", "p", ">", "{", "alibabaIntroduction", "}", "<", "/p>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setInnerVisible", "(", "true", ")", "}", ">", "打开嵌套对话框", "<", "/Button>", "<", "Dialog", "title", "=", "\"嵌套对话框-盒马\"", "visible", "=", "{", "innerVisible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setInnerVisible", "(", "false", ")", "}", "canCloseByEsc", "style", "=", "{", "{", "width", ":", "720", "}", "}", ">", "<", "p", "style", "=", "{", "{", "marginBottom", ":", "0", "}", "}", ">", "{", "hippoIntroduction", "}", "<", "/p>", "<", "/Dialog>", "<", "/Dialog>", "<", "/div>);", "}", "function", "NestedDialog", "(", "{", "depth", ",", "visible", ",", "onRequestClose", "}", ")", "{", "const", "[", "showInner", ",", "setShowInner", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "Dialog", "title", "=", "{", "`对话框标题 depth=${", "depth", "}`", "}", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "onRequestClose", "}", "canCloseByEsc", ">", "<", "h2", ">", "我是对话框中的内容", "<", "/h2>", "<", "p", ">", "(", "按下", "ESC", "可以关闭当前对话框", ")", "<", "/p>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setShowInner", "(", "true", ")", "}", ">", "打开下级对话框", "<", "/Button>", "<", "NestedDialog", "depth", "=", "{", "depth", "+", "1", "}", "visible", "=", "{", "showInner", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setShowInner", "(", "false", ")", "}", "/>", "<", "/Dialog>);", "}", "export", "function", "MatryoshkaDoll", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开对话框", "<", "/Button>", "<", "NestedDialog", "depth", "=", "{", "0", "}", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "/>", "<", "/div>);", "}", "const", "standards", "=", "[", "'#4E7EF5'", ",", "'#42ABFC'", ",", "'#32CEE6'", ",", "'#46CF9F'", ",", "'#FFC147'", ",", "'#FF7161'", ",", "'#6782B5'", ",", "'#FA82BA'", ",", "'#977FF5'", "]", ";", "const", "colors", "=", "[", "0", ",", "3", ",", "4", ",", "6", ",", "5", ",", "8", ",", "2", ",", "1", ",", "7", "]", ".", "map", "(", "(", "index", ")", "=>", "standards", "[", "index", "]", ")", ";", "export", "function", "DynamicSizeAndPlacements", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "width", ",", "setWidth", "]", "=", "useState", "(", "600", ")", ";", "const", "[", "lineCount", ",", "setLineCount", "]", "=", "useState", "(", "3", ")", ";", "const", "[", "placement", ",", "setPlacement", "]", "=", "useState", "<", "PositionPlacement", ">", "(", "'center'", ")", ";", "useEffect", "(", "(", ")", "=>", "{", "const", "subscription", "=", "fromEvent", "<", "KeyboardEvent", ">", "(", "document", ",", "'keypress'", ")", ".", "subscribe", "(", "(", "event", ")", "=>", "{", "if", "(", "event", ".", "key", ".", "toLowerCase", "(", ")", "===", "'c'", ")", "{", "setPlacement", "(", "getNextPlacement", ")", ";", "}", "}", ")", ";", "return", "(", ")", "=>", "{", "subscription", ".", "unsubscribe", "(", ")", ";", "}", ";", "}", ",", "[", "]", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开对话框", "<", "/Button>", "<", "Dialog", "title", "=", "\"对话框标题\"", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "style", "=", "{", "{", "width", ",", "transition", ":", "'inset 200ms cubic-bezier(0.51, 1, 0.68, 1)'", "}", "}", "placement", "=", "{", "placement", "}", "offset", "=", "{", "getDialogOffsetFromPlacement", "(", "placement", ")", "}", ">", "<", "div", ">", "<", "p", "style", "=", "{", "{", "marginTop", ":", "0", "}", "}", ">", "当前方位", "<", "code", ">", "placement", "=", "{", "placement", "}", "<", "/code>", "<", "/p>", "<", "/div>", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "16", ",", "overflow", ":", "'auto'", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setWidth", "(", "width", "+", "50", ")", "}", ">", "增加宽度", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setWidth", "(", "width", "-", "50", ")", "}", ">", "减小宽度", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setLineCount", "(", "lineCount", "+", "1", ")", "}", ">", "增加高度", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setLineCount", "(", "lineCount", "-", "1", ")", "}", ">", "减小高度", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setPlacement", "(", "getNextPlacement", ")", "}", ">", "改变方位", "(", "快捷键", "<", "code", ">", "C", "<", "/code>)", "<", "/Button>", "<", "/div>", "<", "br", "/", ">", "{", "_", ".", "range", "(", "lineCount", ")", ".", "map", "(", "(", "i", ")", "=>", "(", "<", "p", "key", "=", "{", "i", "}", "style", "=", "{", "{", "margin", ":", "0", ",", "padding", ":", "8", ",", "background", ":", "colors", "[", "i", "%", "colors", ".", "length", "]", "}", "}", ">", "line", "{", "i", "+", "1", "}", "<", "/p>))}", "<", "/Dialog>", "<", "/div>);", "}", "export", "function", "VeryTall", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开对话框", "<", "/Button>", "<", "Dialog", "title", "=", "\"对话框标题\"", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "canCloseByEsc", "canCloseByIcon", "style", "=", "{", "{", "maxHeight", ":", "'calc(100% - 32px)'", ",", "overflow", ":", "'auto'", ",", "borderRadius", ":", "0", "}", "}", "placement", "=", "\"top\"", "offset", "=", "{", "[", "0", ",", "16", "]", "}", ">", "{", "_", ".", "range", "(", "100", ")", ".", "map", "(", "(", "i", ")", "=>", "(", "<", "p", "key", "=", "{", "i", "}", "style", "=", "{", "{", "margin", ":", "0", ",", "padding", ":", "8", ",", "background", ":", "colors", "[", "i", "%", "colors", ".", "length", "]", "}", "}", ">", "line", "{", "i", "+", "1", "}", "<", "/p>))}", "<", "/Dialog>", "<", "/div>);", "}", "export", "function", "Minimal", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开对话框", "<", "/Button>", "<", "Dialog", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "style", "=", "{", "{", "width", ":", "300", ",", "height", ":", "250", ",", "padding", ":", "'1rem 2rem 1rem 1rem'", "}", "}", "canCloseByOutSideClick", "canCloseByEsc", "canCloseByIcon", "renderChildren", "=", "{", "(", "{", "ref", "}", ")", "=>", "(", "<", "Dialog", ".", "Panel", "ref", "=", "{", "ref", "as", "React", ".", "Ref", "<", "HTMLDivElement", ">", "}", "style", "=", "{", "{", "width", ":", "'80%'", ",", "padding", ":", "16", "}", "}", ">", "{", "hippoIntroduction", "}", "<", "/Dialog.Panel>)}/", ">", "<", "/div>);", "}", "export", "function", "QuickTools", "(", ")", "{", "return", "(", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "16", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "Dialog", ".", "show", "(", "{", "title", ":", "'确认删除'", ",", "content", ":", "'你确认要删除这些内容吗?'", ",", "canCloseByEsc", ":", "true", ",", "onOk", "(", ")", "{", "console", ".", "log", "(", "'继续删除'", ")", ";", "}", ",", "onCancel", "(", ")", "{", "console", ".", "log", "(", "'取消'", ")", ";", "}", ",", "}", ")", ";", "}", "}", ">", "打开对话框", "show", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "Dialog", ".", "alert", "(", "{", "title", ":", "'删除失败'", ",", "content", ":", "'关闭文件后再重新尝试删除文件'", ",", "}", ")", ".", "then", "(", "(", "alertResult", ")", "=>", "{", "console", ".", "log", "(", "'alertResult:'", ",", "alertResult", ")", ";", "}", ")", ";", "}", "}", ">", "打开", "alert", "对话框", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "Dialog", ".", "confirm", "(", "{", "title", ":", "'确认删除'", ",", "content", ":", "'是否要删除《小作坊的自我修养》这个文件夹么?该操作无法撤销.'", ",", "}", ")", ".", "then", "(", "(", "confirmResult", ")", "=>", "{", "console", ".", "log", "(", "'confirmResult'", ",", "confirmResult", ")", ";", "}", ")", ";", "}", "}", ">", "打开", "confirm", "对话框", "<", "/Button>", "<", "Button", "onClick", "=", "{", "Dialog", ".", "closeAll", "}", ">", "关闭所有对话框", "<", "/Button>", "<", "/div>);", "}", "export", "function", "AttachedQuickTools", "(", ")", "{", "const", "[", "dialog", ",", "contextHolder", "]", "=", "Dialog", ".", "useDialog", "(", ")", ";", "const", "[", "count", ",", "setCount", "]", "=", "useState", "(", "0", ")", ";", "return", "(", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "16", "}", "}", ">", "{", "contextHolder", "}", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "dialog", ".", "show", "(", "{", "title", ":", "`确认删除 ${", "count", "}`", ",", "content", ":", "'你确认要删除这些内容吗?'", ",", "canCloseByEsc", ":", "true", ",", "}", ")", ";", "setCount", "(", "count", "+", "1", ")", ";", "}", "}", ">", "打开对话框", "show", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "dialog", ".", "closeAll", "(", ")", ";", "}", "}", ">", "关闭所有对话框", "<", "/Button>", "<", "/div>);", "}", "export", "function", "Test", "(", ")", "{", "const", "[", "dialogVisible", ",", "setDialogVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "drawerVisible", ",", "setDrawerVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "16", ",", "flexWrap", ":", "'wrap'", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setDialogVisible", "(", "true", ")", "}", ">", "打开对话框", "(", "300", "px", ")", "<", "/Button>", "<", "/div>", "<", "Dialog", "title", "=", "\"阿里巴巴\"", "visible", "=", "{", "dialogVisible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setDialogVisible", "(", "false", ")", "}", "style", "=", "{", "{", "width", ":", "300", "}", "}", "disableScroll", "=", "{", "false", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setDrawerVisible", "(", "true", ")", "}", ">", "打开嵌套抽屉", "<", "/Button>", "<", "p", ">", "{", "alibabaIntroduction", "}", "<", "/p>", "<", "/Dialog>", "<", "Drawer", "title", "=", "\"盒马\"", "visible", "=", "{", "drawerVisible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setDrawerVisible", "(", "false", ")", "}", "disableScroll", "=", "{", "false", "}", "footer", "=", "{", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setDrawerVisible", "(", "false", ")", "}", "type", "=", "\"primary\"", "size", "=", "\"small\"", ">", "关闭", "<", "/Button>}>", "{", "hippoIntroduction", "}", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "/Drawer>", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "div", "style", "=", "{", "{", "margin", ":", "20", ",", "background", ":", "'#ccc'", ",", "height", ":", "300", "}", "}", "/>", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, 2, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1212
[ "import", "{", "Button", ",", "Drawer", ",", "DrawerProps", ",", "Overlay", ",", "RadioGroup", "}", "from", "'@rexd/core'", ";", "import", "_", "from", "'lodash-es'", ";", "import", "React", ",", "{", "useState", "}", "from", "'react'", ";", "export", "default", "{", "title", ":", "'overlays / Drawer'", "}", ";", "const", "alibabaIntroduction", "=", "'阿里巴巴集团创立于1999年,是一家提供电子商务在线交易平台的中国公司,实行位于杭州与北京的双总部制度。\\n'", "+", "'服务范围包括B2B贸易、网上零售、购物搜索引擎、第三方支付和云计算服务。'", ";", "const", "hippoIntroduction", "=", "'盒马是阿里巴巴集团旗下,以数据和技术驱动的新零售平台。盒马希望为消费者打造社区化的一站式新零售体验中心,用科技和人情味带给人们“鲜美生活”。'", ";", "export", "function", "Basic", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "!", "visible", ")", "}", ">", "打开抽屉", "<", "/Button>", "<", "Drawer", "title", "=", "\"页面抽屉\"", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "footer", "=", "{", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", ">", "关闭", "<", "/Button>} canCloseByIcon>", "{", "hippoIntroduction", "}", "<", "/Drawer>", "<", "/div>);", "}", "export", "function", "Placements", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "placement", ",", "setPlacement", "]", "=", "useState", "<", "DrawerProps", "[", "'placement'", "]", ">", "(", "'right'", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "display", ":", "'grid'", ",", "grid", ":", "'repeat(3, auto) / repeat(3, 1fr)'", ",", "gap", ":", "16", "}", "}", ">", "<", "Button", "style", "=", "{", "{", "gridRow", ":", "'1'", ",", "gridColumn", ":", "'2'", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "setVisible", "(", "true", ")", ";", "setPlacement", "(", "'top'", ")", ";", "}", "}", ">", "打开抽屉", "placement", "=", "top", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "gridRow", ":", "'2'", ",", "gridColumn", ":", "'3'", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "setVisible", "(", "true", ")", ";", "setPlacement", "(", "'right'", ")", ";", "}", "}", ">", "打开抽屉", "placement", "=", "right", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "gridRow", ":", "'3'", ",", "gridColumn", ":", "'2'", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "setVisible", "(", "true", ")", ";", "setPlacement", "(", "'bottom'", ")", ";", "}", "}", ">", "打开抽屉", "placement", "=", "bottom", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "gridRow", ":", "'2'", ",", "gridColumn", ":", "'1'", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "setVisible", "(", "true", ")", ";", "setPlacement", "(", "'left'", ")", ";", "}", "}", ">", "打开抽屉", "placement", "=", "left", "<", "/Button>", "<", "/div>", "<", "Drawer", "title", "=", "\"盒马\"", "visible", "=", "{", "visible", "}", "placement", "=", "{", "placement", "}", "footer", "=", "{", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", ">", "关闭弹层", "<", "/Button>} onRequestClose={() => {", "setVisible", "(", "false", ")", ";", "}", "}", ">", "{", "_", ".", "range", "(", "20", ")", ".", "map", "(", "(", "i", ")", "=>", "(", "<", "p", "key", "=", "{", "i", "}", ">", "{", "hippoIntroduction", "}", "<", "/p>))}", "<", "/Drawer>", "<", "/div>);", "}", "export", "function", "Nested", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "innerVisible", ",", "setInnerVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开抽屉", "<", "/Button>", "<", "Drawer", "title", "=", "\"外层抽屉标题\"", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "style", "=", "{", "{", "width", ":", "600", "}", "}", "footer", "=", "{", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "type", "=", "\"primary\"", ">", "关闭", "<", "/Button>}>", "<", "p", ">", "{", "alibabaIntroduction", "}", "<", "/p>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setInnerVisible", "(", "true", ")", "}", ">", "打开内层抽屉", "<", "/Button>", "<", "Drawer", "title", "=", "\"内层抽屉标题\"", "visible", "=", "{", "innerVisible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setInnerVisible", "(", "false", ")", "}", "style", "=", "{", "{", "width", ":", "400", "}", "}", "footer", "=", "{", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setInnerVisible", "(", "false", ")", "}", "type", "=", "\"primary\"", ">", "关闭", "<", "/Button>}>", "{", "hippoIntroduction", "}", "<", "/Drawer>", "<", "/Drawer>", "<", "/div>);", "}", "export", "function", "Minimal", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开抽屉", "<", "/Button>", "<", "Drawer", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "style", "=", "{", "{", "paddingRight", ":", "16", ",", "paddingLeft", ":", "12", "}", "}", "renderChildren", "=", "{", "(", "arg", ")", "=>", "(", "<", "Drawer", ".", "Panel", "{", "...", "arg", "}", ">", "<", "p", ">", "{", "alibabaIntroduction", "}", "<", "/p>", "<", "p", ">", "{", "alibabaIntroduction", "}", "<", "/p>", "<", "p", ">", "{", "alibabaIntroduction", "}", "<", "/p>", "<", "/Drawer.Panel>)}/", ">", "<", "/div>);", "}", "export", "function", "Fullscreen", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "!", "visible", ")", "}", ">", "打开抽屉", "<", "/Button>", "<", "Drawer", "title", "=", "\"页面抽屉\"", "visible", "=", "{", "visible", "}", "style", "=", "{", "{", "width", ":", "'100%'", ",", "maxWidth", ":", "'100%'", "}", "}", "animation", "=", "{", "{", "in", ":", "Overlay", ".", "animations", ".", "zoomIn", ",", "out", ":", "Overlay", ".", "animations", ".", "fadeOut", "}", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "disableScroll", "=", "\"force\"", "footer", "=", "{", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "type", "=", "\"primary\"", ">", "关闭", "<", "/Button>}>", "{", "hippoIntroduction", "}", "<", "/Drawer>", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, 2, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1213
[ "import", "{", "Button", ",", "Dialog", ",", "Drawer", ",", "OverlayBehaviorProvider", ",", "Popup", ",", "PositionPlacement", ",", "Toaster", ",", "Tooltip", ",", "VirtualList", ",", "}", "from", "'@rexd/core'", ";", "import", "_", "from", "'lodash-es'", ";", "import", "React", ",", "{", "useEffect", ",", "useState", "}", "from", "'react'", ";", "import", "{", "fromEvent", "}", "from", "'rxjs'", ";", "import", "styled", "from", "'styled-components'", ";", "import", "{", "getDialogOffsetFromPlacement", ",", "getNextPlacement", "}", "from", "'./story-helpers'", ";", "export", "default", "{", "title", ":", "'overlays / Multiple Containers'", "}", ";", "const", "standards", "=", "[", "'#4E7EF5'", ",", "'#42ABFC'", ",", "'#32CEE6'", ",", "'#46CF9F'", ",", "'#FFC147'", ",", "'#FF7161'", ",", "'#6782B5'", ",", "'#FA82BA'", ",", "'#977FF5'", "]", ";", "const", "colors", "=", "[", "0", ",", "3", ",", "4", ",", "6", ",", "5", ",", "8", ",", "2", ",", "1", ",", "7", "]", ".", "map", "(", "(", "index", ")", "=>", "standards", "[", "index", "]", ")", ";", "function", "HoldTallTall", "(", "{", "estimatedRowHeight", "}", ")", "{", "return", "(", "<", "VirtualList", "virtualThreshold", "=", "{", "0", "}", "estimatedRowHeight", "=", "{", "estimatedRowHeight", "}", "renderRow", "=", "{", "(", "i", ",", "_", ",", "listRowDataset", ")", "=>", "(", "<", "p", "key", "=", "{", "i", "}", "style", "=", "{", "{", "margin", ":", "0", ",", "padding", ":", "8", ",", "background", ":", "colors", "[", "i", "%", "colors", ".", "length", "]", "}", "}", "{", "...", "listRowDataset", "}", ">", "line", "{", "i", "+", "1", "}", "<", "/p>)} rows={_.range(100)}/", ">", ")", ";", "}", "function", "MiniApp", "(", "{", "name", ",", "container", "}", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "tallVisible", ",", "setTallVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "innerDrawerVisible", ",", "setInnerDrawerVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "dialogVisible1", ",", "setDialogVisible1", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "placement", ",", "setPlacement", "]", "=", "useState", "<", "PositionPlacement", ">", "(", "'center'", ")", ";", "const", "[", "toaster", ",", "contextHolder", "]", "=", "Toaster", ".", "useToaster", "(", ")", ";", "useEffect", "(", "(", ")", "=>", "{", "const", "subscription", "=", "fromEvent", "<", "KeyboardEvent", ">", "(", "container", ",", "'keypress'", ")", ".", "subscribe", "(", "(", "event", ")", "=>", "{", "if", "(", "event", ".", "key", ".", "toLowerCase", "(", ")", "===", "'c'", ")", "{", "setPlacement", "(", "getNextPlacement", ")", ";", "}", "}", ")", ";", "return", "(", ")", "=>", "{", "subscription", ".", "unsubscribe", "(", ")", ";", "}", ";", "}", ",", "[", "container", "]", ")", ";", "return", "(", "<", "OverlayBehaviorProvider", "portalContainer", "=", "{", "container", "}", ">", "{", "contextHolder", "}", "<", "div", "className", "=", "\"scroll-container\"", ">", "<", "h1", ">", "{", "name", "}", "<", "/h1>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开drawer", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "toaster", ".", "show", "(", "{", "content", ":", "'hello~'", "}", ")", ";", "}", "}", ">", "toast", "~", "~", "<", "/Button>", "<", "Drawer", "style", "=", "{", "{", "width", ":", "250", "}", "}", "title", "=", "{", "`${", "name", "} title`", "}", "visible", "=", "{", "visible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", ">", "<", "p", ">", "我是", "{", "name", "}", "抽屉中的内容", "<", "/p>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setInnerDrawerVisible", "(", "true", ")", "}", ">", "打开", "嵌套抽屉", "<", "/Button>", "<", "/Drawer>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setDialogVisible1", "(", "true", ")", "}", ">", "打开dialog", "<", "/Button>", "<", "Dialog", "style", "=", "{", "{", "width", ":", "250", ",", "transition", ":", "'inset 200ms cubic-bezier(0.51, 1, 0.68, 1)'", "}", "}", "title", "=", "{", "`${", "name", "} title`", "}", "visible", "=", "{", "dialogVisible1", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setDialogVisible1", "(", "false", ")", "}", "canCloseByEsc", "placement", "=", "{", "placement", "}", "offset", "=", "{", "getDialogOffsetFromPlacement", "(", "placement", ")", "}", ">", "<", "p", ">", "我是", "{", "name", "}", "对话框中的内容", "<", "/p>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setInnerDrawerVisible", "(", "true", ")", "}", ">", "打开", "嵌套抽屉", "<", "/Button>", "<", "br", "/", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setPlacement", "(", "getNextPlacement", ")", "}", ">", "改变方位", "(", "快捷键", "<", "code", ">", "C", "<", "/code>)", "<", "/Button>", "<", "/Dialog>", "<", "Drawer", "style", "=", "{", "{", "width", ":", "200", "}", "}", "visible", "=", "{", "innerDrawerVisible", "}", "onRequestClose", "=", "{", "(", ")", "=>", "setInnerDrawerVisible", "(", "false", ")", "}", ">", "我是", "{", "name", "}", "的嵌套抽屉", "<", "/Drawer>", "<", "Tooltip", "title", "=", "\"点击进行举高高\"", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setTallVisible", "(", "true", ")", "}", ">", "举高高", "<", "/Button>", "<", "/Tooltip>", "<", "Dialog", "title", "=", "\"举高高对话框\"", "visible", "=", "{", "tallVisible", "}", "canCloseByEsc", "onRequestClose", "=", "{", "(", ")", "=>", "setTallVisible", "(", "false", ")", "}", "style", "=", "{", "{", "maxHeight", ":", "'90%'", ",", "overflow", ":", "'auto'", ",", "borderRadius", ":", "0", "}", "}", ">", "<", "p", ">", "虚拟滚动", "...", "<", "/p>", "<", "HoldTallTall", "estimatedRowHeight", "=", "{", "34", "}", "/", ">", "<", "/Dialog>", "<", "/div>", "<", "/OverlayBehaviorProvider>);", "}", "function", "MiniAppShape2", "(", "{", "name", ",", "container", "}", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "toaster", ",", "contextHolder", "]", "=", "Toaster", ".", "useToaster", "(", ")", ";", "return", "(", "<", "OverlayBehaviorProvider", "portalContainer", "=", "{", "container", "}", ">", "{", "contextHolder", "}", "<", "div", "className", "=", "\"scroll-container\"", ">", "<", "h1", ">", "{", "name", "}", "<", "/h1>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开drawer", "<", "/Button>", "<", "Popup", "interactionKind", "=", "\"click\"", "target", "=", "{", "<", "Button", ">", "click", "me", "<", "/Button>}>", "<", "div", "style", "=", "{", "{", "padding", ":", "8", ",", "background", ":", "'#f8dadd'", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "打开drawer", "<", "/Button>", "<", "/div>", "<", "/Popup>", "<", "Drawer", "title", "=", "{", "`${", "name", "} title`", "}", "visible", "=", "{", "visible", "}", "style", "=", "{", "{", "height", ":", "350", "}", "}", "placement", "=", "\"bottom\"", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", ">", "<", "p", ">", "我是", "{", "name", "}", "抽屉中的内容", "<", "/p>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", ">", "关闭", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "toaster", ".", "show", "(", "{", "content", ":", "'world~~'", "}", ")", "}", ">", "hello", "~", "<", "/Button>", "<", "/Drawer>", "<", "div", ">", "<", "h3", ">", "{", "name", "}", "下的其他内容", "(", "虚拟滚动", ")", "<", "/h3>", "<", "HoldTallTall", "estimatedRowHeight", "=", "{", "40", "}", "/", ">", "<", "/div>", "<", "/div>", "<", "/OverlayBehaviorProvider>);", "}", "const", "AppContainerDiv", "=", "styled", ".", "div", "`\n height: 400px;\n position: relative;\n overflow: hidden;\n border: 2px solid #aaa;\n\n .scroll-container {\n height: 100%;\n padding: 8px;\n overflow: auto;\n }\n`", ";", "export", "function", "多容器", "(", ")", "{", "const", "[", "app1Container", ",", "setApp1Container", "]", "=", "useState", "<", "HTMLDivElement", ">", "(", ")", ";", "const", "[", "app2Container", ",", "setApp2Container", "]", "=", "useState", "<", "HTMLDivElement", ">", "(", ")", ";", "const", "[", "app3Container", ",", "setApp3Container", "]", "=", "useState", "<", "HTMLDivElement", ">", "(", ")", ";", "const", "[", "app4Container", ",", "setApp4Container", "]", "=", "useState", "<", "HTMLDivElement", ">", "(", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "display", ":", "'grid'", ",", "gap", ":", "16", ",", "grid", ":", "'auto-flow / repeat(auto-fill, minmax(500px, 1fr))'", "}", "}", ">", "<", "AppContainerDiv", "ref", "=", "{", "setApp1Container", "}", "tabIndex", "=", "{", "0", "}", ">", "{", "app1Container", "?", "<", "MiniApp", "name", "=", "\"APP-111\"", "container", "=", "{", "app1Container", "}", "/", ">", ":", "'loading...'", "}", "<", "/AppContainerDiv>", "<", "AppContainerDiv", "ref", "=", "{", "setApp2Container", "}", "tabIndex", "=", "{", "0", "}", ">", "{", "app2Container", "?", "<", "MiniAppShape2", "name", "=", "\"APP-222\"", "container", "=", "{", "app2Container", "}", "/", ">", ":", "'loading...'", "}", "<", "/AppContainerDiv>", "<", "AppContainerDiv", "ref", "=", "{", "setApp3Container", "}", "tabIndex", "=", "{", "0", "}", ">", "{", "app3Container", "?", "<", "MiniAppShape2", "name", "=", "\"APP-333\"", "container", "=", "{", "app3Container", "}", "/", ">", ":", "'loading...'", "}", "<", "/AppContainerDiv>", "<", "AppContainerDiv", "tabIndex", "=", "{", "0", "}", "ref", "=", "{", "setApp4Container", "}", ">", "{", "app4Container", "?", "<", "MiniApp", "name", "=", "\"APP-444\"", "container", "=", "{", "app4Container", "}", "/", ">", ":", "'loading...'", "}", "<", "/AppContainerDiv>", "<", "/div>", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1214
[ "import", "{", "Button", ",", "Link", ",", "Notice", "}", "from", "'@rexd/core'", ";", "import", "React", "from", "'react'", ";", "export", "default", "{", "title", ":", "'overlays / Notice Quick Tools'", "}", ";", "export", "function", "Basic", "(", ")", "{", "return", "(", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "8", ",", "flexFlow", ":", "'wrap'", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "Notice", ".", "show", "(", "{", "status", ":", "'error'", ",", "title", ":", "'您当前的浏览器已过期,请使用最新版的浏览器!'", ",", "extra", ":", "<", "Link", ">", "查看详情", "<", "/Link>,", "closeable", ":", "true", ",", "}", ")", ";", "}", "}", ">", "show", "notice", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "Notice", ".", "success", "(", "{", "title", ":", "'文件已上传成功'", ",", "extra", ":", "<", "Link", ">", "查看详情", "<", "/Link>,", "closeable", ":", "true", ",", "}", ")", ";", "}", "}", ">", "notice", ".", "success", "(", "...", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "Notice", ".", "info", "(", "{", "title", ":", "'文件已上传成功'", ",", "extra", ":", "<", "Link", ">", "查看详情", "<", "/Link>,", "closeable", ":", "true", ",", "}", ")", ";", "}", "}", ">", "notice", ".", "info", "(", "...", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "Notice", ".", "warning", "(", "{", "title", ":", "'你的密码已过期,请尽快更换'", ",", "extra", ":", "<", "Link", ">", "更换密码", "<", "/Link>,", "closeable", ":", "true", ",", "}", ")", ";", "}", "}", ">", "notice", ".", "warning", "(", "...", ")", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "marginLeft", ":", "8", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "Notice", ".", "closeAll", "(", ")", ";", "}", "}", ">", "关闭所有消息", "<", "/Button>", "<", "/div>);", "}", "export", "function", "Attached", "(", ")", "{", "const", "[", "notice", ",", "contextHolder", "]", "=", "Notice", ".", "useNotice", "(", ")", ";", "return", "(", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "8", ",", "flexFlow", ":", "'wrap'", "}", "}", ">", "{", "contextHolder", "}", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "notice", ".", "show", "(", "{", "status", ":", "'error'", ",", "title", ":", "'您当前的浏览器已过期,请使用最新版的浏览器!'", ",", "extra", ":", "<", "Link", ">", "查看详情", "<", "/Link>,", "closeable", ":", "true", ",", "}", ")", ";", "}", "}", ">", "show", "notice", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "notice", ".", "success", "(", "{", "title", ":", "'文件已上传成功'", ",", "extra", ":", "<", "Link", ">", "查看详情", "<", "/Link>,", "closeable", ":", "true", ",", "}", ")", ";", "}", "}", ">", "notice", ".", "success", "(", "...", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "notice", ".", "info", "(", "{", "title", ":", "'文件已上传成功'", ",", "extra", ":", "<", "Link", ">", "查看详情", "<", "/Link>,", "closeable", ":", "true", ",", "}", ")", ";", "}", "}", ">", "notice", ".", "info", "(", "...", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "notice", ".", "warning", "(", "{", "title", ":", "'你的密码已过期,请尽快更换'", ",", "extra", ":", "<", "Link", ">", "更换密码", "<", "/Link>,", "closeable", ":", "true", ",", "}", ")", ";", "}", "}", ">", "notice", ".", "warning", "(", "...", ")", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "marginLeft", ":", "8", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "notice", ".", "closeAll", "(", ")", ";", "}", "}", ">", "关闭所有消息", "<", "/Button>", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1215
[ "import", "{", "Placement", "}", "from", "'@popperjs/core'", ";", "import", "{", "Button", ",", "Group", ",", "Panel", ",", "Popup", "}", "from", "'@rexd/core'", ";", "import", "React", ",", "{", "useState", "}", "from", "'react'", ";", "import", "styled", "from", "'styled-components'", ";", "export", "default", "{", "title", ":", "'overlays / Popup'", "}", ";", "const", "ShadowedDiv", "=", "styled", "(", "Panel", ")", "`\n min-width: 300px;\n min-height: 100px;\n padding: 10px;\n`", ";", "function", "SomeText", "(", ")", "{", "return", "(", "<", ">", "最近工作", ":", "高级经理", "|", "招商银行丨杭州分行", "|", "2009", "-", "07", "-", "01", "至今", "<", "br", "/", ">", "工作职责", ":", "巴拉巴拉小魔仙", "<", "br", "/", ">", "联系方式", ":", "67676767", "|", "1212121", "@", "163.", "con", "<", "br", "/", ">", "教育经理", ":", "北京大学", "|", "工商管理", "|", "2007", "-", "09", "-", "01", "至", "2006", "-", "06", "-", "01", "<", "br", "/", ">", "中央财经大学", "|", "2004", "-", "09", "-", "01", "至", "2007", "-", "06", "-", "01", "<", "/>);", "}", "export", "function", "Basic", "(", ")", "{", "return", "(", "<", "Popup", "target", "=", "{", "<", "Button", ">", "点击查看详情", "<", "/Button>}>", "<", "div", "style", "=", "{", "{", "border", ":", "'1px solid #999'", ",", "padding", ":", "8", ",", "background", ":", "'var(--rex-colors-emphasis-10)'", "}", "}", ">", "<", "SomeText", "/>", "<", "/div>", "<", "/Popup>);", "}", "export", "function", "Controlled", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "const", "onClose", "=", "(", ")", "=>", "{", "setVisible", "(", "false", ")", ";", "}", ";", "return", "(", "<", "Popup", "target", "=", "{", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "true", ")", "}", ">", "点击查看详情", "<", "/Button>} visible={visible} onRequestClose={onClose}>", "<", "Panel", "style", "=", "{", "{", "padding", ":", "8", "}", "}", ">", "<", "Button", "onClick", "=", "{", "onClose", "}", ">", "手动关闭", "<", "/Button>", "<", "p", ">", "<", "SomeText", "/>", "<", "/p>", "<", "/Panel>", "<", "/Popup>);", "}", "export", "function", "InteractionKind", "(", ")", "{", "return", "(", "<", "Group", ">", "<", "Popup", "interactionKind", "=", "\"hover-target\"", "target", "=", "{", "<", "Button", ">", "<", "code", ">", "hover", "-", "target", "<", "/code>", "<", "/Button>}>", "<", "div", "style", "=", "{", "{", "border", ":", "'1px solid #999'", ",", "padding", ":", "8", "}", "}", ">", "<", "SomeText", "/>", "<", "/div>", "<", "/Popup>", "<", "Popup", "interactionKind", "=", "\"hover\"", "target", "=", "{", "<", "Button", ">", "<", "code", ">", "hover", "<", "/code>", "<", "/Button>}>", "<", "div", "style", "=", "{", "{", "border", ":", "'1px solid #999'", ",", "padding", ":", "8", "}", "}", ">", "<", "SomeText", "/>", "<", "/div>", "<", "/Popup>", "<", "Popup", "interactionKind", "=", "\"hover\"", "canOpenByFocus", "canCloseByBlur", "target", "=", "{", "<", "Button", ">", "<", "code", ">", "hover", "&", "focus", "&", "blur", "<", "/code>", "<", "/Button>}>", "<", "div", "style", "=", "{", "{", "border", ":", "'1px solid #999'", ",", "padding", ":", "8", "}", "}", ">", "<", "SomeText", "/>", "<", "/div>", "<", "/Popup>", "<", "Popup", "interactionKind", "=", "\"click\"", "target", "=", "{", "<", "Button", ">", "<", "code", ">", "click", "<", "/code>", "<", "/Button>}>", "<", "div", "style", "=", "{", "{", "border", ":", "'1px solid #999'", ",", "padding", ":", "8", "}", "}", ">", "<", "SomeText", "/>", "<", "/div>", "<", "/Popup>", "<", "Popup", "interactionKind", "=", "\"click\"", "canCloseByOutSideClick", "=", "{", "false", "}", "target", "=", "{", "<", "Button", ">", "<", "code", ">", "{", "`canCloseByOutSideClick={false}`", "}", "<", "/code>", "<", "/Button>}>", "<", "div", "style", "=", "{", "{", "border", ":", "'1px solid #999'", ",", "padding", ":", "8", "}", "}", ">", "<", "SomeText", "/>", "<", "/div>", "<", "/Popup>", "<", "/Group>);", "}", "export", "function", "SwitchTargetOnTheFly", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "true", ")", ";", "const", "[", "reference", ",", "setReference", "]", "=", "useState", "(", "'A'", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "16", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "!", "visible", ")", "}", ">", "显示", "/", "隐藏", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setReference", "(", "reference", "===", "'A'", "?", "'B'", ":", "'A'", ")", "}", ">", "切换弹层参考元素", "(", "当前", ":", "{", "reference", "}", ")", "<", "/Button>", "<", "/div>", "<", "Popup", "hasArrow", "canCloseByOutSideClick", "=", "{", "false", "}", "visible", "=", "{", "visible", "}", "renderTarget", "=", "{", "(", "{", "ref", "}", ")", "=>", "(", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "gap", ":", "32", ",", "marginTop", ":", "16", "}", "}", ">", "<", "Button", "ref", "=", "{", "reference", "===", "'A'", "?", "ref", ":", "null", "}", ">", "按钮A", "<", "/Button>", "<", "Button", "ref", "=", "{", "reference", "===", "'B'", "?", "ref", ":", "null", "}", ">", "按钮B", "<", "/Button>", "<", "/div>)}>", "<", "ShadowedDiv", ">", "<", "SomeText", "/>", "<", "/ShadowedDiv>", "<", "/Popup>", "<", "/div>);", "}", "const", "StyledButton", "=", "styled", "(", "Button", ")", "`\n &[data-rex-popup-open] {\n background: rgba(255, 0, 0, 0.2) !important;\n }\n`", ";", "const", "ButtonGrid", "=", "styled", ".", "div", "`\n margin: 100px;\n display: grid;\n grid: repeat(5, 40px) / repeat(5, auto);\n gap: 8px;\n justify-content: center;\n align-items: center;\n`", ";", "export", "function", "Placements", "(", ")", "{", "const", "renderButtons", "=", "(", "placements", ",", "getStyle", ")", "=>", "{", "return", "placements", ".", "map", "(", "(", "placement", ",", "index", ")", "=>", "(", "<", "Popup", "key", "=", "{", "placement", "}", "flip", "=", "{", "false", "}", "hasArrow", "renderTarget", "=", "{", "(", "pass", ")", "=>", "(", "<", "StyledButton", "{", "...", "pass", "}", "style", "=", "{", "getStyle", "(", "index", ")", "}", ">", "{", "placement", "}", "<", "/StyledButton>)} placement={placement} interactionKind=\"click\">", "<", "ShadowedDiv", ">", "<", "SomeText", "/>", "<", "/ShadowedDiv>", "<", "/Popup>));", "}", ";", "return", "(", "<", "div", ">", "<", "ButtonGrid", ">", "{", "renderButtons", "(", "[", "'top-end'", ",", "'top'", ",", "'top-start'", "]", ",", "(", "index", ")", "=>", "(", "{", "gridRow", ":", "1", ",", "gridColumn", ":", "index", "+", "2", ",", "}", ")", ")", "}", "{", "renderButtons", "(", "[", "'left-end'", ",", "'left'", ",", "'left-start'", "]", ",", "(", "index", ")", "=>", "(", "{", "gridColumn", ":", "1", ",", "gridRow", ":", "index", "+", "2", ",", "}", ")", ")", "}", "{", "renderButtons", "(", "[", "'right-end'", ",", "'right'", ",", "'right-start'", "]", ",", "(", "index", ")", "=>", "(", "{", "gridColumn", ":", "5", ",", "gridRow", ":", "index", "+", "2", ",", "}", ")", ")", "}", "{", "renderButtons", "(", "[", "'bottom-end'", ",", "'bottom'", ",", "'bottom-start'", "]", ",", "(", "index", ")", "=>", "(", "{", "gridRow", ":", "5", ",", "gridColumn", ":", "index", "+", "2", ",", "}", ")", ")", "}", "<", "/ButtonGrid>", "<", "/div>);", "}", "export", "function", "PopupInScrollContainer", "(", ")", "{", "return", "(", "<", "div", "style", "=", "{", "{", "height", ":", "300", ",", "width", ":", "600", ",", "marginLeft", ":", "100", ",", "marginTop", ":", "100", ",", "border", ":", "'1px solid #ccc'", ",", "overflow", ":", "'scroll'", ",", "}", "}", ">", "<", "div", "style", "=", "{", "{", "height", ":", "600", ",", "padding", ":", "'200px 0 0 180px'", ",", "position", ":", "'relative'", ",", "}", "}", ">", "<", "Popup", "usePortal", "=", "{", "false", "}", "target", "=", "{", "<", "Button", ">", "click", "me", "<", "/Button>}>", "<", "ShadowedDiv", ">", "<", "SomeText", "/>", "<", "/ShadowedDiv>", "<", "/Popup>", "<", "/div>", "<", "/div>);", "}", "export", "function", "SimplifiedDOMStructure", "(", ")", "{", "return", "(", "<", "Popup", "renderTarget", "=", "{", "(", "args", ")", "=>", "(", "<", "Button", "ref", "=", "{", "args", ".", "ref", "}", "onClick", "=", "{", "args", ".", "onClick", "}", ">", "点击触发弹层", "<", "/Button>)} renderChildren={({ ref }) => (<div ref={ref as React.RefObject<HTMLDivElement>} style={{", "padding", ":", "8", ",", "width", ":", "300", ",", "border", ":", "'1px solid var(--rex-colors-emphasis-30)'", ",", "color", ":", "'var(--rex-colors-text-body)'", ",", "}", "}", ">", "通过", "render", "callback", "的调用形式", ",", "可以精简弹层的", "DOM", "层级", "<", "/div>)}/", ">", ")", ";", "}", "export", "function", "Nested", "(", ")", "{", "return", "(", "<", "Popup", "target", "=", "{", "<", "Button", ">", "查看详情", "<", "/Button>}>", "<", "ShadowedDiv", ">", "<", "p", ">", "最近工作", ":", "高级经理", "|", "招商银行丨杭州分行", "|", "2009", "-", "07", "-", "01", "至今", "<", "br", "/", ">", "工作职责", ":", "巴拉巴拉小魔仙", "<", "br", "/", ">", "联系方式", ":", "67676767", "|", "1212121", "@", "163.", "con", "<", "br", "/", ">", "<", "/p>", "<", "Popup", "target", "=", "{", "<", "Button", ">", "查看教育经历", "<", "/Button>}>", "<", "ShadowedDiv", ">", "1.", "北京大学", "|", "工商管理", "|", "2007", "-", "09", "-", "01", "至", "2006", "-", "06", "-", "01", "<", "br", "/", ">", "2.", "中央财经大学", "|", "2004", "-", "09", "-", "01", "至", "2007", "-", "06", "-", "01", "<", "/ShadowedDiv>", "<", "/Popup>", "<", "/ShadowedDiv>", "<", "/Popup>);", "}", "export", "function", "NestedPopupInTallPage", "(", ")", "{", "return", "(", "<", "div", ">", "<", "div", ">", "tips", ":", "按钮在页面下方", ",", "往下滚一段吧", "<", "/div>", "<", "div", "style", "=", "{", "{", "height", ":", "'150vh'", "}", "}", "/>", "<", "Popup", "target", "=", "{", "<", "Button", "size", "=", "\"large\"", ">", "打开外层弹框", "<", "/Button>}>", "<", "div", "style", "=", "{", "{", "padding", ":", "8", ",", "width", ":", "300", ",", "border", ":", "'1px solid #ccc'", "}", "}", ">", "<", "h1", ">", "外层弹框内容", "<", "/h1>", "<", "Popup", "target", "=", "{", "<", "Button", "style", "=", "{", "{", "marginLeft", ":", "50", "}", "}", "size", "=", "\"large\"", ">", "打开内层弹框", "<", "/Button>} placement=\"right-start\">", "<", "div", "style", "=", "{", "{", "padding", ":", "8", ",", "width", ":", "300", ",", "border", ":", "'1px solid #ccc'", "}", "}", ">", "<", "h1", ">", "内层弹框", "<", "/h1>", "<", "div", "style", "=", "{", "{", "height", ":", "250", ",", "background", ":", "'rgba(255, 0, 0, 0.2)'", "}", "}", "/>", "<", "/div>", "<", "/Popup>", "<", "/div>", "<", "/Popup>", "<", "div", "style", "=", "{", "{", "height", ":", "'150vh'", "}", "}", "/>", "<", "/div>);", "}", "export", "function", "Arrow", "(", ")", "{", "return", "(", "<", "Popup", "target", "=", "{", "<", "Button", ">", "点击查看详情", "<", "/Button>} hasArrow wrapperStyle={{ '--rex-popup-arrow-color': '#333' } as any}>", "<", "div", "style", "=", "{", "{", "color", ":", "'white'", ",", "background", ":", "'#333'", ",", "padding", ":", "12", ",", "fontSize", ":", "14", "}", "}", ">", "最近工作", ":", "高级经理", "|", "招商银行丨杭州分行", "|", "2009", "-", "07", "-", "01", "至今", "<", "br", "/", ">", "工作职责", ":", "巴拉巴拉小魔仙", "<", "/div>", "<", "/Popup>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1216
[ "import", "React", "from", "'react'", ";", "import", "styled", "from", "'styled-components'", ";", "export", "default", "{", "title", ":", "'overlays / Position'", ",", "}", ";", "const", "StyledDiv", "=", "styled", ".", "div", "`\n height: 400px;\n border: 2px solid var(--ifm-color-emphasis-300, #dadde1);\n position: relative;\n display: grid;\n grid: repeat(3, 1fr) / repeat(3, 1fr);\n\n .h-line {\n position: absolute;\n top: calc(50% - 1px);\n height: 2px;\n width: 100%;\n border-top: var(--ifm-color-emphasis-400, #ccd0d5) dashed 2px;\n }\n\n .v-line {\n position: absolute;\n left: calc(50% - 1px);\n width: 2px;\n height: 100%;\n border-left: var(--ifm-color-emphasis-400, #ccd0d5) dashed 2px;\n }\n\n .placement {\n display: flex;\n align-items: center;\n justify-content: center;\n\n > * {\n width: 75%;\n height: 75%;\n border-radius: 6px;\n font-weight: bold;\n padding: 8px;\n\n code {\n font-size: 14px;\n }\n }\n }\n`", ";", "export", "function", "PlacementDiagram", "(", ")", "{", "return", "(", "<", "div", "style", "=", "{", "{", "paddingTop", ":", "'1rem'", ",", "marginBottom", ":", "'1rem'", "}", "}", ">", "<", "StyledDiv", ">", "<", "span", "style", "=", "{", "{", "position", ":", "'absolute'", ",", "top", ":", "'-1rem'", ",", "left", ":", "8", "}", "}", ">", "<", "code", ">", "container", "<", "/code>", "<", "/span>", "<", "div", "className", "=", "\"h-line\"", "/", ">", "<", "div", "className", "=", "\"v-line\"", "/", ">", "{", "[", "'top-left'", ",", "'top'", ",", "'top-right'", ",", "'left'", ",", "'center'", ",", "'right'", ",", "'bottom-left'", ",", "'bottom'", ",", "'bottom-right'", "]", ".", "map", "(", "(", "placement", ")", "=>", "(", "<", "div", "className", "=", "\"placement\"", "key", "=", "{", "placement", "}", ">", "<", "div", "style", "=", "{", "{", "background", ":", "'var(--ifm-color-emphasis-200, #ebedf0)'", "}", "}", ">", "<", "code", ">", "{", "placement", "}", "<", "/code>", "<", "/div>", "<", "/div>))}", "<", "/StyledDiv>", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1217
[ "import", "{", "Button", ",", "PositionPlacement", ",", "Toaster", "}", "from", "'@rexd/core'", ";", "import", "React", ",", "{", "useReducer", ",", "useState", "}", "from", "'react'", ";", "export", "default", "{", "title", ":", "'overlays / Toast'", "}", ";", "export", "function", "Basic", "(", ")", "{", "const", "[", "toaster", ",", "contextHolder", "]", "=", "Toaster", ".", "useToaster", "(", "{", "placement", ":", "'top-right'", "}", ")", ";", "return", "(", "<", "div", ">", "{", "contextHolder", "}", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "toaster", ".", "show", "(", "{", "content", ":", "'hello!'", "}", ")", ";", "}", "}", ">", "toaster", ".", "show", "(", "...", ")", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "marginLeft", ":", "8", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "toaster", ".", "closeAll", "(", ")", ";", "}", "}", ">", "关闭所有消息", "<", "/Button>", "<", "/div>);", "}", "export", "function", "BasicDetached", "(", ")", "{", "return", "(", "<", "div", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "Toaster", ".", "show", "(", "{", "content", ":", "'hello!'", "}", ")", ";", "}", "}", ">", "Toaster", ".", "show", "(", "...", ")", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "marginLeft", ":", "8", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "Toaster", ".", "closeAll", "(", ")", ";", "}", "}", ">", "关闭所有消息", "<", "/Button>", "<", "/div>);", "}", "export", "function", "DynamicPlacement", "(", ")", "{", "const", "[", "placement", ",", "setPlacement", "]", "=", "useState", "<", "PositionPlacement", ">", "(", "'top-right'", ")", ";", "const", "[", "toaster", ",", "contextPlaceholder", "]", "=", "Toaster", ".", "useToaster", "(", "{", "placement", "}", ")", ";", "return", "(", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "flexFlow", ":", "'column'", ",", "alignItems", ":", "'flex-start'", ",", "gap", ":", "16", "}", "}", ">", "{", "contextPlaceholder", "}", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "toaster", ".", "show", "(", "{", "content", ":", "'hello!'", "}", ")", "}", "style", "=", "{", "{", "fontFamily", ":", "'monospace'", "}", "}", ">", "show", "(", "'hello!'", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "toaster", ".", "closeAll", "(", ")", "}", ">", "关闭所有消息", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "if", "(", "placement", "===", "'top-right'", ")", "{", "setPlacement", "(", "'top'", ")", ";", "}", "else", "if", "(", "placement", "===", "'top'", ")", "{", "setPlacement", "(", "'top-left'", ")", ";", "}", "else", "{", "setPlacement", "(", "'top-right'", ")", ";", "}", "}", "}", ">", "切换位置", "(", "{", "placement", "}", ")", "<", "/Button>", "<", "/div>);", "}", "export", "function", "MultipleToaster", "(", ")", "{", "const", "[", "toaster1", ",", "node1", "]", "=", "Toaster", ".", "useToaster", "(", "{", "placement", ":", "'top-right'", "}", ")", ";", "const", "[", "toaster2", ",", "node2", "]", "=", "Toaster", ".", "useToaster", "(", "{", "placement", ":", "'top'", "}", ")", ";", "return", "(", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "flexFlow", ":", "'column'", ",", "alignItems", ":", "'flex-start'", ",", "gap", ":", "16", "}", "}", ">", "{", "node1", "}", "{", "node2", "}", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "toaster1", ".", "show", "(", "{", "content", ":", "'hello!'", "}", ")", "}", "style", "=", "{", "{", "fontFamily", ":", "'monospace'", "}", "}", ">", "toaster1", ".", "show", "(", "'hello!'", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "toaster1", ".", "closeAll", "(", ")", "}", "style", "=", "{", "{", "fontFamily", ":", "'monospace'", "}", "}", ">", "toaster1", ".", "closeAll", "(", ")", "<", "/Button>", "<", "div", "style", "=", "{", "{", "margin", ":", "'12px 0'", ",", "width", ":", "'100%'", ",", "height", ":", "1", ",", "borderTop", ":", "'1px solid var(--rex-colors-emphasis-30)'", ",", "}", "}", "/>", "<", "Button", "style", "=", "{", "{", "fontFamily", ":", "'monospace'", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "toaster2", ".", "show", "(", "{", "content", ":", "'hello!'", "}", ")", ";", "}", "}", ">", "toaster2", ".", "show", "(", "'world!'", ")", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "fontFamily", ":", "'monospace'", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "toaster2", ".", "show", "(", "{", "content", ":", "<", "h1", "style", "=", "{", "{", "height", ":", "250", "}", "}", ">", "BIG", "<", "/h1>,", "canCloseByClick", ":", "false", ",", "}", ")", ";", "}", "}", ">", "toaster2", ".", "show", "(", "big", ")", "<", "/Button>", "<", "Button", "style", "=", "{", "{", "fontFamily", ":", "'monospace'", "}", "}", "onClick", "=", "{", "(", ")", "=>", "{", "toaster2", ".", "closeAll", "(", ")", ";", "}", "}", ">", "toaster2", ".", "closeAll", "(", ")", "<", "/Button>", "<", "/div>);", "}", "export", "function", "DetachedToasterWithDynamicPlacements", "(", ")", "{", "const", "[", "_", ",", "forceUpdate", "]", "=", "useReducer", "(", "(", "t", ")", "=>", "t", "+", "1", ",", "0", ")", ";", "return", "(", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "flexFlow", ":", "'column'", ",", "alignItems", ":", "'flex-start'", ",", "gap", ":", "16", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "Toaster", ".", "show", "(", "{", "content", ":", "'hello!'", "}", ")", "}", "style", "=", "{", "{", "fontFamily", ":", "'monospace'", "}", "}", ">", "show", "(", "'hello!'", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "Toaster", ".", "closeAll", "(", ")", "}", ">", "关闭所有消息", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "if", "(", "Toaster", ".", "getConfig", "(", ")", ".", "placement", "===", "'top-right'", ")", "{", "Toaster", ".", "config", "(", "{", "placement", ":", "'top'", "}", ")", ";", "}", "else", "if", "(", "Toaster", ".", "getConfig", "(", ")", ".", "placement", "===", "'top'", ")", "{", "Toaster", ".", "config", "(", "{", "placement", ":", "'top-left'", "}", ")", ";", "}", "else", "{", "Toaster", ".", "config", "(", "{", "placement", ":", "'top-right'", "}", ")", ";", "}", "forceUpdate", "(", ")", ";", "}", "}", ">", "切换位置", "(", "{", "Toaster", ".", "getConfig", "(", ")", ".", "placement", "}", ")", "<", "/Button>", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1218
[ "import", "{", "Button", ",", "PopupPlacement", ",", "Tooltip", "}", "from", "'@rexd/core'", ";", "import", "{", "styled", "}", "from", "'@storybook/theming'", ";", "import", "React", ",", "{", "useState", "}", "from", "'react'", ";", "export", "default", "{", "title", ":", "'overlays / Tooltip'", "}", ";", "export", "function", "Basic", "(", ")", "{", "return", "(", "<", "Tooltip", "title", "=", "{", "<", "div", "style", "=", "{", "{", "width", ":", "160", "}", "}", ">", "Lorem", ",", "ipsum", "dolor", "sit", "amet", "consectetur", "adipisicing", "elit", ".", "Alias", "quas", "nisi", "maiores", "odio", "...", "<", "/div>}>", "<", "Button", ">", "hover", "me", "<", "/Button>", "<", "/Tooltip>);", "}", "const", "ButtonGrid", "=", "styled", ".", "div", "`\n margin: 100px;\n display: grid;\n grid: repeat(5, 40px) / repeat(5, auto);\n gap: 8px;\n justify-content: center;\n align-items: center;\n`", ";", "export", "function", "Placements", "(", ")", "{", "const", "renderButtons", "=", "(", "placements", ",", "getStyle", ")", "=>", "{", "return", "placements", ".", "map", "(", "(", "placement", ",", "index", ")", "=>", "(", "<", "Tooltip", "key", "=", "{", "placement", "}", "flip", "=", "{", "false", "}", "renderTarget", "=", "{", "(", "pass", ")", "=>", "(", "<", "Button", "{", "...", "pass", "}", "style", "=", "{", "getStyle", "(", "index", ")", "}", ">", "{", "placement", "}", "<", "/Button>)} placement={placement} title={<div style={{ width: 150, height: 60 }}>tooltip content</div", ">", "}", "/>));", "}", ";", "return", "(", "<", "ButtonGrid", ">", "{", "renderButtons", "(", "[", "'top-end'", ",", "'top'", ",", "'top-start'", "]", ",", "(", "index", ")", "=>", "(", "{", "gridRow", ":", "1", ",", "gridColumn", ":", "index", "+", "2", ",", "}", ")", ")", "}", "{", "renderButtons", "(", "[", "'left-end'", ",", "'left'", ",", "'left-start'", "]", ",", "(", "index", ")", "=>", "(", "{", "gridColumn", ":", "1", ",", "gridRow", ":", "index", "+", "2", ",", "}", ")", ")", "}", "{", "renderButtons", "(", "[", "'right-end'", ",", "'right'", ",", "'right-start'", "]", ",", "(", "index", ")", "=>", "(", "{", "gridColumn", ":", "5", ",", "gridRow", ":", "index", "+", "2", ",", "}", ")", ")", "}", "{", "renderButtons", "(", "[", "'bottom-end'", ",", "'bottom'", ",", "'bottom-start'", "]", ",", "(", "index", ")", "=>", "(", "{", "gridRow", ":", "5", ",", "gridColumn", ":", "index", "+", "2", ",", "}", ")", ")", "}", "<", "/ButtonGrid>);", "}", "export", "function", "Controlled", "(", ")", "{", "const", "[", "visible", ",", "setVisible", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "Tooltip", "visible", "=", "{", "visible", "}", "interactionKind", "=", "\"click\"", "onRequestClose", "=", "{", "(", ")", "=>", "setVisible", "(", "false", ")", "}", "title", "=", "{", "<", "div", "style", "=", "{", "{", "width", ":", "200", ",", "height", ":", "100", "}", "}", ">", "tooltip", "content", "<", "/div>}>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setVisible", "(", "!", "visible", ")", "}", ">", "点击弹出提示信息", "<", "/Button>", "<", "/Tooltip>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 14, null, null, null, null, null, null, null, null, 9, null, null, null, null, 5, null, null, 5, null, 6, null, null, null, null, null, null, null, null, null, 2079, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1219
[ "import", "{", "AppProvider", ",", "Box", ",", "Button", ",", "Text", ",", "useColorMode", ",", "useDevice", "}", "from", "'@rexd/core'", ";", "import", "*", "as", "React", "from", "'react'", ";", "import", "{", "useState", "}", "from", "'react'", ";", "export", "default", "{", "title", ":", "'AppProvider'", ",", "}", ";", "export", "const", "Basic", "=", "(", ")", "=>", "(", "<", "AppProvider", ">", "<", "Box", ">", "hello", "world", "<", "/Box>", "<", "/AppProvider>);", "export", "const", "ChangeColorMode", "=", "(", ")", "=>", "{", "const", "[", "colorMode", ",", "setColorMode", "]", "=", "useState", "(", "useColorMode", "(", ")", ")", ";", "return", "(", "<", "Box", ">", "<", "AppProvider", "colorMode", "=", "{", "colorMode", "}", ">", "<", "Box", "height", "=", "\"400px\"", "color", "=", "\"emphasis.10\"", "bg", "=", "\"emphasis.10\"", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "setColorMode", "(", "colorMode", "===", "'light'", "?", "'dark'", ":", "'light'", ")", "}", ">", "切换色彩模式", "<", "/Button>", "<", "Box", "mt", "=", "\"l\"", ">", "当前色彩模式", ":", "{", "colorMode", "}", "<", "/Box>", "<", "Box", "data", "-", "innerbox", "height", "=", "\"250px\"", "m", "=", "\"l\"", "p", "=", "\"l\"", "bg", "=", "\"emphasis.30\"", ">", "<", "AppProvider", "colorMode", "=", "\"light\"", ">", "<", "Button", ">", "Always", "light", "<", "/Button>", "<", "/AppProvider>", "<", "/Box>", "<", "/Box>", "<", "/AppProvider>", "<", "/Box>);", "}", ";", "export", "const", "ChangeDeviceMode", "=", "(", ")", "=>", "{", "const", "device", "=", "useDevice", "(", ")", ";", "return", "(", "<", "Box", ">", "<", "Text", "as", "=", "\"mark\"", ">", "切换", "storybook", "的视图切换选项查看效果", "<", "/Text>", "<", "Text", "as", "=", "\"p\"", ">", "name", ":", "{", "device", ".", "name", "}", "<", "/Text>", "<", "Text", "as", "=", "\"p\"", ">", "breakpoint", ":", "{", "device", ".", "breakpoint", "}", "<", "/Text>", "<", "/Box>);", "}", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1220
[ "import", "{", "TreeItem", ",", "TreeSelect", ",", "TreeSelectItem", "}", "from", "'@rexd/core'", ";", "import", "{", "makeRecursiveMapper", "}", "from", "'ali-react-table'", ";", "import", "React", ",", "{", "useState", "}", "from", "'react'", ";", "import", "{", "useCateTree", "}", "from", "'../test-tree-data'", ";", "export", "default", "{", "title", ":", "'Select / TreeSelect'", ",", "excludeStories", ":", "[", "'bigTreeDataSource'", "]", ",", "}", ";", "export", "const", "bigTreeDataSource", "=", "[", "{", "value", ":", "'1'", ",", "label", ":", "'Option 1'", "}", ",", "{", "value", ":", "'2'", ",", "label", ":", "'Option 2'", ",", "disabled", ":", "true", "}", ",", "{", "value", ":", "'4'", ",", "label", ":", "'动物园'", "}", ",", "{", "value", ":", "'zoo'", ",", "label", ":", "'阿里动物园'", ",", "children", ":", "[", "{", "value", ":", "'盒马'", ",", "label", ":", "'盒马'", "}", ",", "{", "value", ":", "'淘宝'", ",", "label", ":", "'淘宝'", "}", ",", "{", "value", ":", "'天猫'", ",", "label", ":", "'天猫'", "}", ",", "{", "value", ":", "'foo-4'", ",", "label", ":", "'其他小朋友'", ",", "children", ":", "[", "{", "value", ":", "'小红红'", ",", "label", ":", "'小红红'", "}", ",", "{", "value", ":", "'小蓝蓝'", ",", "label", ":", "'小蓝蓝'", "}", ",", "{", "value", ":", "'小灰灰'", ",", "label", ":", "'小灰灰'", "}", ",", "]", ",", "}", ",", "]", ",", "}", ",", "{", "value", ":", "'2号动物园'", ",", "label", ":", "'2号动物园'", ",", "children", ":", "[", "{", "value", ":", "'小脑虎'", ",", "label", ":", "'小脑虎'", "}", ",", "{", "value", ":", "'小狮子'", ",", "label", ":", "'小狮子'", "}", ",", "{", "value", ":", "'小企鹅'", ",", "label", ":", "'小企鹅'", "}", ",", "{", "value", ":", "'bar-4'", ",", "label", ":", "'小朋友'", ",", "children", ":", "[", "{", "value", ":", "'bar-4-小红红'", ",", "label", ":", "'小红红'", "}", ",", "{", "value", ":", "'bar-4-小蓝蓝'", ",", "label", ":", "'小蓝蓝'", "}", ",", "{", "value", ":", "'bar-4-小灰灰'", ",", "label", ":", "'小灰灰'", "}", ",", "]", ",", "}", ",", "]", ",", "}", ",", "]", ";", "export", "function", "Basic", "(", ")", "{", "const", "[", "value", ",", "onChange", "]", "=", "useState", "(", "''", ")", ";", "return", "<", "TreeSelect", ".", "Single", "defaultExpandAll", "onChange", "=", "{", "onChange", "}", "value", "=", "{", "value", "}", "dataSource", "=", "{", "bigTreeDataSource", "}", "/", ">", ";", "}", "export", "function", "ShowSearch", "(", ")", "{", "const", "[", "value", ",", "onChange", "]", "=", "useState", "(", "''", ")", ";", "return", "(", "<", "TreeSelect", ".", "Single", "fill", "defaultExpandAll", "showSearch", "onChange", "=", "{", "onChange", "}", "value", "=", "{", "value", "}", "dataSource", "=", "{", "bigTreeDataSource", "}", "/", ">", ")", ";", "}", "export", "function", "HippoCategoryTree", "(", ")", "{", "const", "cateTree", "=", "useCateTree", "(", ")", ";", "const", "dataSource", "=", "(", "makeRecursiveMapper", "<", "TreeItem", ">", "(", "(", "item", ")", "=>", "(", "{", "...", "item", ",", "value", ":", "item", ".", "key", "}", ")", ")", "(", "cateTree", ")", "as", "unknown", ")", "as", "TreeSelectItem", "[", "]", ";", "if", "(", "dataSource", ".", "length", "===", "0", ")", "{", "return", "'loading...'", ";", "}", "return", "(", "<", "TreeSelect", ".", "Single", "style", "=", "{", "{", "width", ":", "200", "}", "}", "popupProps", "=", "{", "{", "style", ":", "{", "width", ":", "350", "}", "}", "}", "dataSource", "=", "{", "dataSource", "}", "defaultExpandAll", "showSearch", "placeholder", "=", "\"请选择一个项目\"", "/", ">", ")", ";", "}", "export", "function", "MultiHippoCategoryTree", "(", ")", "{", "const", "cateTree", "=", "useCateTree", "(", ")", ";", "const", "dataSource", "=", "(", "makeRecursiveMapper", "<", "TreeItem", ">", "(", "(", "item", ")", "=>", "(", "{", "...", "item", ",", "value", ":", "item", ".", "key", "}", ")", ")", "(", "cateTree", ")", "as", "unknown", ")", "as", "TreeSelectItem", "[", "]", ";", "const", "[", "value", ",", "onChange", "]", "=", "useState", "<", "string", "[", "]", ">", "(", "[", "]", ")", ";", "if", "(", "dataSource", ".", "length", "===", "0", ")", "{", "return", "'loading...'", ";", "}", "return", "(", "<", "TreeSelect", ".", "Multi", "style", "=", "{", "{", "width", ":", "300", "}", "}", "value", "=", "{", "value", "}", "onChange", "=", "{", "onChange", "}", "dataSource", "=", "{", "dataSource", "}", "showSearch", "placeholder", "=", "\"请选择类目\"", "defaultExpandAll", "/", ">", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1221
[ "import", "{", "CascaderSelect", "}", "from", "'@rexd/core'", ";", "import", "React", "from", "'react'", ";", "import", "{", "bigTreeDataSource", "}", "from", "'./tree-select.stories'", ";", "export", "default", "{", "title", ":", "'Select / CascaderSelect'", ",", "excludeStories", ":", "[", "'bigTreeDataSource'", "]", ",", "}", ";", "export", "function", "Basic", "(", ")", "{", "return", "<", "CascaderSelect", ".", "Single", "dataSource", "=", "{", "bigTreeDataSource", "}", "/>;", "}", "export", "function", "Fill", "(", ")", "{", "return", "<", "CascaderSelect", ".", "Single", "fill", "autoWidth", "=", "{", "false", "}", "dataSource", "=", "{", "bigTreeDataSource", "}", "/", ">", ";", "}", "export", "function", "Multiple", "(", ")", "{", "return", "<", "CascaderSelect", ".", "Multi", "dataSource", "=", "{", "bigTreeDataSource", "}", "/>;", "}", "export", "function", "Search", "(", ")", "{", "return", "<", "CascaderSelect", ".", "Multi", "showSearch", "dataSource", "=", "{", "bigTreeDataSource", "}", "/", ">", ";", "}", "export", "function", "Status", "(", ")", "{", "return", "<", "CascaderSelect", ".", "Multi", "status", "=", "\"error\"", "dataSource", "=", "{", "bigTreeDataSource", "}", "/", ">", ";", "}", "export", "function", "Disabled", "(", ")", "{", "return", "<", "CascaderSelect", ".", "Multi", "disabled", "dataSource", "=", "{", "bigTreeDataSource", "}", "value", "=", "{", "[", "'1'", ",", "'淘宝'", "]", "}", "/", ">", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1222
[ "import", "{", "Cascader", ",", "RadioGroup", "}", "from", "'@rexd/core'", ";", "import", "React", ",", "{", "useEffect", ",", "useState", "}", "from", "'react'", ";", "import", "{", "bigTreeDataSource", "}", "from", "'./tree-select.stories'", ";", "export", "default", "{", "title", ":", "'Select / Cascader'", ",", "}", ";", "function", "getLast", "(", "value", ")", "{", "return", "value", ".", "length", "===", "0", "?", "null", ":", "value", "[", "value", ".", "length", "-", "1", "]", ";", "}", "function", "useDistrictsTreeData", "(", ")", "{", "const", "[", "data", ",", "setData", "]", "=", "useState", "<", "any", "[", "]", ">", "(", "[", "]", ")", ";", "useEffect", "(", "(", ")", "=>", "{", "fetch", "(", "'https://os.alipayobjects.com/rmsportal/ODDwqcDFTLAguOvWEolX.json'", ")", ".", "then", "(", "(", "response", ")", "=>", "response", ".", "json", "(", ")", ")", ".", "then", "(", "(", "data", ")", "=>", "{", "data", "[", "1", "]", ".", "disabled", "=", "true", ";", "setData", "(", "data", ")", ";", "}", ")", ".", "catch", "(", "(", "e", ")", "=>", "console", ".", "log", "(", "e", ")", ")", ";", "}", ",", "[", "]", ")", ";", "return", "data", ";", "}", "export", "function", "Basic", "(", ")", "{", "return", "<", "Cascader", "style", "=", "{", "{", "border", ":", "'1px solid var(--rex-colors-emphasis-20)'", "}", "}", "dataSource", "=", "{", "bigTreeDataSource", "}", "/", ">", ";", "}", "export", "function", "Controlled", "(", ")", "{", "const", "dataSource", "=", "useDistrictsTreeData", "(", ")", ";", "const", "[", "selectedKey", ",", "setSelectedKey", "]", "=", "useState", "(", "'4204'", ")", ";", "return", "(", "<", "div", ">", "<", "div", ">", "(", "受控单选", ")", "当前", "selectedKey", ":", "{", "selectedKey", "}", "<", "/div>", "<", "Cascader", "key", "=", "{", "dataSource", ".", "length", "}", "style", "=", "{", "{", "border", ":", "'1px solid var(--rex-colors-emphasis-20)'", "}", "}", "selectedKeys", "=", "{", "[", "selectedKey", "]", "}", "onSelect", "=", "{", "(", "keys", ")", "=>", "setSelectedKey", "(", "getLast", "(", "keys", ")", ")", "}", "dataSource", "=", "{", "dataSource", "}", "/", ">", "<", "/div>);", "}", "export", "function", "MaxDepth", "(", ")", "{", "const", "dataSource", "=", "useDistrictsTreeData", "(", ")", ";", "const", "[", "maxDepth", ",", "setMaxDepth", "]", "=", "useState", "(", "2", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "alignItems", ":", "'center'", ",", "marginBottom", ":", "8", "}", "}", ">", "最大深度", ":", "<", "RadioGroup", "value", "=", "{", "String", "(", "maxDepth", ")", "}", "onChange", "=", "{", "(", "d", ")", "=>", "setMaxDepth", "(", "Number", "(", "d", ")", ")", "}", "dataSource", "=", "{", "[", "0", ",", "1", ",", "2", "]", ".", "map", "(", "(", "d", ")", "=>", "(", "{", "value", ":", "String", "(", "d", ")", ",", "label", ":", "String", "(", "d", ")", "}", ")", ")", "}", "/", ">", "<", "/div>", "<", "Cascader", "key", "=", "{", "dataSource", ".", "length", "}", "style", "=", "{", "{", "border", ":", "'1px solid var(--rex-colors-emphasis-20)'", "}", "}", "dataSource", "=", "{", "dataSource", "}", "maxDepth", "=", "{", "maxDepth", "}", "defaultSelectedKeys", "=", "{", "[", "'4204'", "]", "}", "/", ">", "<", "/div>);", "}", "export", "function", "Multiple", "(", ")", "{", "const", "[", "selectedKeys", ",", "onSelect", "]", "=", "useState", "(", "[", "'1'", "]", ")", ";", "return", "(", "<", "div", ">", "<", "div", ">", "(", "受控多选", ")", "当前", "selectedKeys", ":", "<", "code", ">", "{", "selectedKeys", ".", "join", "(", "','", ")", "}", "<", "/code>", "<", "/div>", "<", "Cascader", "style", "=", "{", "{", "border", ":", "'1px solid var(--rex-colors-emphasis-20)'", "}", "}", "selectedKeys", "=", "{", "selectedKeys", "}", "onSelect", "=", "{", "onSelect", "}", "dataSource", "=", "{", "bigTreeDataSource", "}", "/", ">", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 16, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1223
[ "import", "{", "Button", ",", "Flex", ",", "Select", "}", "from", "'@rexd/core'", ";", "import", "_", "from", "'lodash-es'", ";", "import", "React", ",", "{", "useState", "}", "from", "'react'", ";", "export", "default", "{", "title", ":", "'Select / Select'", "}", ";", "const", "basicSelectDataSource", "=", "[", "'盒马'", ",", "'淘宝'", ",", "'天猫'", ",", "{", "value", ":", "'飞猪'", ",", "label", ":", "'飞猪'", ",", "disabled", ":", "true", "}", "]", ";", "export", "function", "Basic", "(", ")", "{", "const", "[", "value", ",", "onChange", "]", "=", "useState", "(", "''", ")", ";", "return", "<", "Select", ".", "Single", "value", "=", "{", "value", "}", "onChange", "=", "{", "onChange", "}", "hasClear", "hasArrow", "dataSource", "=", "{", "basicSelectDataSource", "}", "/", ">", ";", "}", "export", "function", "Fill", "(", ")", "{", "return", "<", "Select", ".", "Single", "fill", "dataSource", "=", "{", "basicSelectDataSource", "}", "/", ">", ";", "}", "export", "function", "Minimum", "(", ")", "{", "return", "<", "Select", ".", "Single", "shape", "=", "\"simple\"", "dataSource", "=", "{", "basicSelectDataSource", "}", "/", ">", ";", "}", "export", "function", "Search", "(", ")", "{", "return", "(", "<", "Select", ".", "Single", "showSearch", "dataSource", "=", "{", "[", "{", "value", ":", "'1'", ",", "label", ":", "'Option 1'", "}", ",", "{", "value", ":", "'2'", ",", "label", ":", "'Option 2'", ",", "disabled", ":", "true", "}", ",", "{", "value", ":", "'4'", ",", "label", ":", "'阿里动物园'", "}", ",", "{", "value", ":", "'盒马'", ",", "label", ":", "'盒马'", "}", ",", "{", "value", ":", "'淘宝'", ",", "label", ":", "'淘宝'", "}", ",", "{", "value", ":", "'天猫'", ",", "label", ":", "'天猫'", "}", ",", "{", "value", ":", "'foo-4'", ",", "label", ":", "'其他小朋友'", "}", ",", "{", "value", ":", "'2号动物园'", ",", "label", ":", "'2号动物园'", "}", ",", "{", "value", ":", "'小脑虎'", ",", "label", ":", "'小脑虎'", "}", ",", "{", "value", ":", "'小狮子'", ",", "label", ":", "'小狮子'", "}", ",", "{", "value", ":", "'小企鹅'", ",", "label", ":", "'小企鹅'", "}", ",", "{", "value", ":", "'bar-4'", ",", "label", ":", "'小朋友'", "}", ",", "{", "value", ":", "'bar-4-小红红'", ",", "label", ":", "'小红红'", "}", ",", "{", "value", ":", "'bar-4-小蓝蓝'", ",", "label", ":", "'小蓝蓝'", "}", ",", "{", "value", ":", "'bar-4-小灰灰'", ",", "label", ":", "'小灰灰'", "}", ",", "]", "}", "/", ">", ")", ";", "}", "export", "function", "BigData", "(", ")", "{", "return", "<", "Select", ".", "Single", "dataSource", "=", "{", "_", ".", "range", "(", "0", ",", "20000", ")", ".", "map", "(", "(", "i", ")", "=>", "`选项-${", "i", "+", "1", "}`", ")", "}", "/>;", "}", "export", "function", "Status", "(", ")", "{", "return", "<", "Select", "status", "=", "\"error\"", "dataSource", "=", "{", "basicSelectDataSource", "}", "/", ">", ";", "}", "export", "function", "Multiple", "(", ")", "{", "return", "(", "<", "Select", ".", "Multi", "style", "=", "{", "{", "width", ":", "300", "}", "}", "hasClear", "hasArrow", "dataSource", "=", "{", "[", "'盒马1'", ",", "'淘宝1'", ",", "'天猫1'", ",", "{", "value", ":", "'飞猪1'", ",", "label", ":", "'飞猪1'", ",", "disabled", ":", "true", "}", ",", "'盒马2'", ",", "'淘宝2'", ",", "'天猫2'", ",", "{", "value", ":", "'飞猪2'", ",", "label", ":", "'飞猪2'", ",", "disabled", ":", "true", "}", ",", "]", "}", "/", ">", ")", ";", "}", "export", "function", "Disabled", "(", ")", "{", "return", "(", "<", "Select", "hasClear", "hasArrow", "disabled", "value", "=", "\"淘宝2\"", "dataSource", "=", "{", "[", "'盒马1'", ",", "'淘宝1'", ",", "'天猫1'", ",", "{", "value", ":", "'飞猪1'", ",", "label", ":", "'飞猪1'", ",", "disabled", ":", "true", "}", ",", "'盒马2'", ",", "'淘宝2'", ",", "'天猫2'", ",", "{", "value", ":", "'飞猪2'", ",", "label", ":", "'飞猪2'", ",", "disabled", ":", "true", "}", ",", "]", "}", "/", ">", ")", ";", "}", "export", "function", "PlaceWithButtons", "(", ")", "{", "return", "(", "<", "Flex", "spacing", "=", "{", "8", "}", ">", "<", "Button", ">", "left", "<", "/Button>", "<", "Select", "hasArrow", "dataSource", "=", "{", "[", "'盒马1'", ",", "'淘宝1'", ",", "'天猫1'", ",", "{", "value", ":", "'飞猪1'", ",", "label", ":", "'飞猪1'", ",", "disabled", ":", "true", "}", ",", "'盒马2'", ",", "'淘宝2'", ",", "'天猫2'", ",", "{", "value", ":", "'飞猪2'", ",", "label", ":", "'飞猪2'", ",", "disabled", ":", "true", "}", ",", "]", "}", "/", ">", "<", "Button", ">", "right", "<", "/Button>", "<", "/Flex>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1224
[ "import", "{", "Button", ",", "FlattenTreeItem", ",", "Flex", ",", "Input", ",", "searchTreeByKeyword", ",", "Tree", ",", "TreeItem", ",", "VirtualList", ",", "VirtualListAlign", ",", "}", "from", "'@rexd/core'", ";", "import", "{", "collectNodes", "}", "from", "'ali-react-table'", ";", "import", "React", ",", "{", "useMemo", ",", "useRef", ",", "useState", "}", "from", "'react'", ";", "import", "styled", "from", "'styled-components'", ";", "import", "{", "useCateTree", "}", "from", "'../test-tree-data'", ";", "export", "default", "{", "title", ":", "'Select / Tree'", "}", ";", "const", "StyledTree", "=", "styled", "(", "Tree", ")", "`\n width: 200px;\n border: 1px dashed var(--rex-colors-emphasis-40);\n`", ";", "const", "bigTreeDataSource", "=", "[", "{", "key", ":", "'1'", ",", "label", ":", "'Option 1'", "}", ",", "{", "key", ":", "'2'", ",", "label", ":", "'Option 2'", ",", "disabled", ":", "true", "}", ",", "{", "key", ":", "'4'", ",", "label", ":", "'动物园'", "}", ",", "{", "key", ":", "'zoo'", ",", "label", ":", "'阿里动物园'", ",", "children", ":", "[", "{", "key", ":", "'盒马'", ",", "label", ":", "'盒马'", "}", ",", "{", "key", ":", "'淘宝'", ",", "label", ":", "'淘宝'", "}", ",", "{", "key", ":", "'天猫'", ",", "label", ":", "'天猫'", "}", ",", "{", "key", ":", "'foo-4'", ",", "label", ":", "'其他小朋友'", ",", "children", ":", "[", "{", "key", ":", "'小红红'", ",", "label", ":", "'小红红'", "}", ",", "{", "key", ":", "'小蓝蓝'", ",", "label", ":", "'小蓝蓝'", "}", ",", "{", "key", ":", "'小灰灰'", ",", "label", ":", "'小灰灰'", "}", ",", "]", ",", "}", ",", "]", ",", "}", ",", "{", "key", ":", "'2号动物园'", ",", "label", ":", "'2号动物园'", ",", "children", ":", "[", "{", "key", ":", "'小脑虎'", ",", "label", ":", "'小脑虎'", "}", ",", "{", "key", ":", "'小狮子'", ",", "label", ":", "'小狮子'", "}", ",", "{", "key", ":", "'小企鹅'", ",", "label", ":", "'小企鹅'", "}", ",", "{", "key", ":", "'bar-4'", ",", "label", ":", "'小朋友'", ",", "children", ":", "[", "{", "key", ":", "'bar-4-小红红'", ",", "label", ":", "'小红红'", "}", ",", "{", "key", ":", "'bar-4-小蓝蓝'", ",", "label", ":", "'小蓝蓝'", "}", ",", "{", "key", ":", "'bar-4-小灰灰'", ",", "label", ":", "'小灰灰'", "}", ",", "]", ",", "}", ",", "]", ",", "}", ",", "]", ";", "export", "function", "Basic", "(", ")", "{", "return", "<", "StyledTree", "defaultExpandedKeys", "=", "{", "[", "'zoo'", "]", "}", "dataSource", "=", "{", "bigTreeDataSource", "}", "/", ">", ";", "}", "export", "function", "Checkable", "(", ")", "{", "return", "<", "StyledTree", "checkable", "dataSource", "=", "{", "bigTreeDataSource", "}", "onCheck", "=", "{", "(", "...", "args", ")", "=>", "console", ".", "log", "(", "'onCheck'", ",", "...", "args", ")", "}", "/>;", "}", "function", "makeBigTreeItems", "(", ")", "{", "function", "makeNestedChildren", "(", "prefix", ",", "level", ",", "count", ")", "{", "const", "result", "=", "[", "]", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "count", ";", "i", "++", ")", "{", "const", "key", "=", "`${", "prefix", "}-${", "i", "}`", ";", "result", ".", "push", "(", "{", "key", ",", "label", ":", "(", "<", "span", ">", "第", "{", "level", "}", "层节点", "{", "' '", "}", "<", "span", "style", "=", "{", "{", "fontFamily", ":", "'monospace'", "}", "}", ">", "(", "{", "prefix", "}", "-", "{", "i", "}", ")", "<", "/span>", "<", "/span>),", "children", ":", "count", ">", "0", "?", "makeNestedChildren", "(", "key", ",", "level", "+", "1", ",", "count", "-", "6", ")", ":", "null", ",", "}", ")", ";", "}", "return", "result", ";", "}", "const", "big", "=", "[", "]", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "5", ";", "i", "++", ")", "{", "big", ".", "push", "(", "{", "key", ":", "`key_${", "i", "}`", ",", "label", ":", "`顶层节点${", "i", "}`", ",", "children", ":", "makeNestedChildren", "(", "String", "(", "i", ")", ",", "1", ",", "15", ")", ",", "}", ")", ";", "}", "return", "big", ";", "}", "export", "function", "Virtualization", "(", ")", "{", "const", "bigDataSource", "=", "useMemo", "(", "makeBigTreeItems", ",", "[", "]", ")", ";", "const", "virtualListRef", "=", "useRef", "<", "VirtualList", "<", "FlattenTreeItem", ">", ">", "(", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "display", ":", "'flex'", ",", "alignItems", ":", "'center'", ",", "gap", ":", "8", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "virtualListRef", ".", "current", ".", "scrollToRow", "(", "100", ")", ";", "}", "}", ">", "滚动到第100条数据", "(", "默认情况下为", "0", "-", "2", "-", "6", ")", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "virtualListRef", ".", "current", ".", "scrollToRow", "(", "0", ",", "VirtualListAlign", ".", "start", ")", ";", "}", "}", ">", "滚动到第一条", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "virtualListRef", ".", "current", ".", "scrollToRow", "(", "Infinity", ")", ";", "}", "}", ">", "滚动到最后一条", "<", "/Button>", "<", "/div>", "<", "StyledTree", "style", "=", "{", "{", "width", ":", "400", ",", "height", ":", "400", ",", "overflow", ":", "'auto'", ",", "marginTop", ":", "16", "}", "}", "virtualListRef", "=", "{", "virtualListRef", "}", "dataSource", "=", "{", "bigDataSource", "}", "checkable", "defaultExpandAll", "/", ">", "<", "/div>);", "}", "const", "shopTree", "=", "[", "{", "key", ":", "'021'", ",", "label", ":", "'上海子公司'", ",", "children", ":", "[", "{", "key", ":", "'021-fresh-shop'", ",", "label", ":", "'盒马鲜生门店'", ",", "children", ":", "[", "{", "key", ":", "'8043'", ",", "label", ":", "'上海189购物中心店'", "}", ",", "{", "key", ":", "'8056'", ",", "label", ":", "'上海白玉兰广场店'", "}", ",", "{", "key", ":", "'8005'", ",", "label", ":", "'上海宝地店'", "}", ",", "{", "key", ":", "'8055'", ",", "label", ":", "'上海宝山新业坊店'", "}", ",", "{", "key", ":", "'8079'", ",", "label", ":", "'上海北洋泾菜场店'", "}", ",", "{", "key", ":", "'8007'", ",", "label", ":", "'上海曹家渡店'", "}", ",", "]", ",", "}", ",", "{", "key", ":", "'021-F2'", ",", "label", ":", "'盒马F2门店'", ",", "children", ":", "[", "{", "key", ":", "'8020'", ",", "label", ":", "'上海F2白金湾店'", "}", ",", "{", "key", ":", "'8068'", ",", "label", ":", "'上海长宁来福士店'", "}", ",", "{", "key", ":", "'8011'", ",", "label", ":", "'上海长泰店'", "}", ",", "{", "key", ":", "'8049'", ",", "label", ":", "'上海大场老街店'", "}", ",", "]", ",", "}", ",", "]", ",", "}", ",", "{", "key", ":", "'0571'", ",", "label", ":", "'浙江子公司'", ",", "children", ":", "[", "{", "key", ":", "'0571-fresh-shop'", ",", "label", ":", "'盒马鲜生门店'", ",", "children", ":", "[", "{", "key", ":", "'13004'", ",", "label", ":", "'盒马杭州解百店'", "}", ",", "{", "key", ":", "'8050'", ",", "label", ":", "'杭州临平中都店'", "}", ",", "{", "key", ":", "'8028'", ",", "label", ":", "'杭州亲橙里店'", "}", ",", "{", "key", ":", "'8057'", ",", "label", ":", "'杭州庆春店'", "}", ",", "{", "key", ":", "'8029'", ",", "label", ":", "'杭州萧山万象汇店'", "}", ",", "]", ",", "}", ",", "{", "key", ":", "'0571-qzc'", ",", "label", ":", "'盒马小站'", ",", "children", ":", "[", "{", "key", ":", "'QZCHZ002'", ",", "label", ":", "'杭州盒马小站闲林山水站'", "}", ",", "{", "key", ":", "'QZCHZ001'", ",", "label", ":", "'杭州盒马小站西城广场站'", "}", ",", "{", "key", ":", "'QZCHZ008'", ",", "label", ":", "'杭州盒马小站西溪谷站'", "}", ",", "{", "key", ":", "'QZCHZ015'", ",", "label", ":", "'杭州盒马小站涌江站'", "}", ",", "{", "key", ":", "'QZCHZ0010'", ",", "label", ":", "'杭州盒马小站资福站'", "}", ",", "]", ",", "}", ",", "{", "key", ":", "'0571-f2'", ",", "label", ":", "'盒马F2'", "}", ",", "{", "key", ":", "'0571-xmcc'", ",", "label", ":", "'鲜美菜场'", "}", ",", "]", ",", "}", ",", "]", ";", "export", "function", "父子节点选中不关联", "(", ")", "{", "return", "(", "<", "StyledTree", "checkable", "checkStrictly", "style", "=", "{", "{", "width", ":", "400", ",", "maxHeight", ":", "400", ",", "overflow", ":", "'auto'", "}", "}", "dataSource", "=", "{", "shopTree", "}", "/", ">", ")", ";", "}", "export", "function", "可点击的树节点", "(", ")", "{", "return", "(", "<", "StyledTree", "style", "=", "{", "{", "width", ":", "400", ",", "maxHeight", ":", "400", ",", "overflow", ":", "'auto'", "}", "}", "selectable", "checkable", "defaultExpandAll", "defaultSelectedKeys", "=", "{", "[", "'8043'", ",", "'8056'", ",", "'8005'", ",", "'8055'", ",", "'8079'", ",", "'8007'", ",", "'QZCHZ002'", ",", "'QZCHZ001'", ",", "'QZCHZ008'", ",", "'QZCHZ015'", ",", "]", "}", "dataSource", "=", "{", "shopTree", "}", "/", ">", ")", ";", "}", "export", "function", "业务示例_类目搜索与多选", "(", ")", "{", "const", "[", "checkedKeys", ",", "onCheck", "]", "=", "useState", "<", "string", "[", "]", ">", "(", "[", "]", ")", ";", "const", "dataSource", "=", "useCateTree", "(", ")", ";", "const", "[", "keyword", ",", "_setKeyword", "]", "=", "useState", "(", "''", ")", ";", "const", "[", "expandedKeys", ",", "onExpand", "]", "=", "useState", "<", "string", "[", "]", ">", "(", "[", "]", ")", ";", "const", "setKeyword", "=", "(", "word", ")", "=>", "{", "_setKeyword", "(", "word", ")", ";", "const", "searchResult", "=", "searchTreeByKeyword", "(", "word", ",", "dataSource", ")", ";", "if", "(", "!", "searchResult", ".", "skipped", ")", "{", "onExpand", "(", "searchResult", ".", "preferredExpandedKeys", ")", ";", "}", "}", ";", "const", "nameMap", "=", "new", "Map", "(", "collectNodes", "(", "dataSource", ")", ".", "map", "(", "(", "item", ")", "=>", "[", "item", ".", "key", ",", "item", ".", "label", "]", ")", ")", ";", "const", "recommendations", "=", "[", "'肉'", ",", "'鱼'", ",", "'中餐'", ",", "'火锅'", ",", "'红'", ",", "'菜'", "]", ";", "const", "filteredDataSource", "=", "searchTreeByKeyword", "(", "keyword", ",", "dataSource", ")", ".", "filteredDataSource", ";", "return", "(", "<", "div", ">", "<", "Flex", "style", "=", "{", "{", "gap", ":", "16", ",", "alignItems", ":", "'center'", "}", "}", ">", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "{", "onExpand", "(", "collectNodes", "(", "dataSource", ")", ".", "map", "(", "(", "item", ")", "=>", "item", ".", "key", ")", ")", ";", "}", "}", ">", "展开全部", "<", "/Button>", "<", "Button", "onClick", "=", "{", "(", ")", "=>", "onExpand", "(", "[", "]", ")", "}", ">", "收拢全部", "<", "/Button>", "<", "/Flex>", "<", "Flex", "style", "=", "{", "{", "margin", ":", "'8px 0'", ",", "gap", ":", "8", ",", "alignItems", ":", "'center'", "}", "}", ">", "<", "Input", "value", "=", "{", "keyword", "}", "onChange", "=", "{", "setKeyword", "}", "placeholder", "=", "\"类目搜索\"", "style", "=", "{", "{", "width", ":", "300", "}", "}", "hasClear", "/", ">", "<", "span", ">", "推荐搜索", ":", "<", "/span>", "{", "recommendations", ".", "map", "(", "(", "word", ")", "=>", "(", "<", "Button", "key", "=", "{", "word", "}", "size", "=", "\"small\"", "onClick", "=", "{", "(", ")", "=>", "setKeyword", "(", "word", ")", "}", "style", "=", "{", "{", "cursor", ":", "'pointer'", ",", "borderRadius", ":", "4", ",", "border", ":", "'1px solid #ccc'", ",", "fontSize", ":", "12", "}", "}", ">", "{", "word", "}", "<", "/Button>))}", "<", "/Flex>", "<", "Flex", "style", "=", "{", "{", "gap", ":", "8", "}", "}", ">", "<", "StyledTree", "style", "=", "{", "{", "width", ":", "300", ",", "minWidth", ":", "300", ",", "height", ":", "400", ",", "overflow", ":", "'auto'", "}", "}", "checkable", "checkedStrategy", "=", "\"child\"", "checkedKeys", "=", "{", "checkedKeys", "}", "onCheck", "=", "{", "onCheck", "}", "dataSource", "=", "{", "filteredDataSource", "}", "expandedKeys", "=", "{", "expandedKeys", "}", "onExpand", "=", "{", "onExpand", "}", "/", ">", "<", "div", "style", "=", "{", "{", "wordBreak", ":", "'break-all'", ",", "fontSize", ":", "12", ",", "lineHeight", ":", "1.5", "}", "}", ">", "已选类目", ":", "{", "checkedKeys", ".", "map", "(", "(", "key", ")", "=>", "nameMap", ".", "get", "(", "key", ")", ")", ".", "slice", "(", "0", ",", "30", ")", ".", "join", "(", "','", ")", "}", "{", "checkedKeys", ".", "length", ">", "30", "&&", "(", "<", "span", "style", "=", "{", "{", "fontSize", ":", "'150%'", ",", "marginLeft", ":", "4", ",", "color", ":", "'indianred'", "}", "}", ">", "等", "{", "checkedKeys", ".", "length", "}", "项", "<", "/span>)}", "<", "/div>", "<", "/Flex>", "<", "/div>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1225
[ "import", "{", "BaseTable", ",", "Checkbox", ",", "Column", ",", "Menu", ",", "Popup", "}", "from", "'@rexd/core'", ";", "import", "cx", "from", "'classnames'", ";", "import", "React", ",", "{", "useState", "}", "from", "'react'", ";", "import", "styled", "from", "'styled-components'", ";", "export", "default", "{", "title", ":", "'Table / BaseTable'", "}", ";", "function", "repeat", "<", "T", ">", "(", "arr", ",", "n", ")", "{", "let", "result", "=", "[", "]", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "n", ";", "i", "++", ")", "{", "result", "=", "result", ".", "concat", "(", "arr", ")", ";", "}", "return", "result", ";", "}", "function", "CaretDown", "(", "props", ")", "{", "return", "(", "<", "svg", "focusable", "=", "\"false\"", "preserveAspectRatio", "=", "\"xMidYMid meet\"", "fill", "=", "\"currentColor\"", "width", "=", "\"16\"", "height", "=", "\"16\"", "viewBox", "=", "\"0 0 32 32\"", "{", "...", "props", "}", ">", "<", "path", "d", "=", "\"M24 12L16 22 8 12z\"", "/", ">", "<", "/svg>);", "}", "const", "OperationsDiv", "=", "styled", ".", "div", "`\n display: flex;\n height: 20px;\n align-items: center;\n\n .item {\n height: 20px;\n cursor: pointer;\n color: #3858cf;\n display: flex;\n align-items: center;\n\n &.danger {\n color: #eb4141;\n }\n }\n\n .sep {\n height: 10px;\n width: 1px;\n margin-left: 12px;\n margin-right: 12px;\n background: #eeeeee;\n }\n`", ";", "function", "renderOptions", "(", ")", "{", "return", "(", "<", "OperationsDiv", ">", "<", "div", "className", "=", "\"item\"", ">", "编辑", "<", "/div>", "<", "div", "className", "=", "\"sep\"", "/", ">", "<", "div", "className", "=", "\"item danger\"", ">", "删除", "<", "/div>", "<", "div", "className", "=", "\"sep\"", "/", ">", "<", "Popup", "target", "=", "{", "<", "div", "className", "=", "\"item\"", ">", "更多", "<", "CaretDown", "style", "=", "{", "{", "color", ":", "'#A6A6A6'", "}", "}", "/>", "<", "/div>}>", "<", "Menu", "autoDismissPopup", "dataSource", "=", "{", "'1,2,3,4'", ".", "split", "(", "','", ")", ".", "map", "(", "(", "n", ")", "=>", "(", "{", "key", ":", "`Option ${", "n", "}`", ",", "label", ":", "`Option ${", "n", "}`", ",", "}", ")", ")", "}", "/", ">", "<", "/Popup>", "<", "/OperationsDiv>);", "}", "const", "operationCol", "=", "{", "lock", ":", "true", ",", "name", ":", "'操作'", ",", "render", ":", "renderOptions", ",", "width", ":", "200", "}", ";", "const", "dataSource1", "=", "[", "{", "id", ":", "'1'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨杭州分行'", ",", "applier", ":", "'James Collier'", "}", ",", "{", "id", ":", "'2'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'建设银行丨未来科技城'", ",", "applier", ":", "'Philip Burke'", "}", ",", "{", "id", ":", "'3'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'交通银行丨浙大路支行'", ",", "applier", ":", "'Wesley Cruz'", "}", ",", "{", "id", ":", "'4'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨庆春路支行'", ",", "applier", ":", "'Billy Horton'", "}", ",", "{", "id", ":", "'5'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨文一路分行'", ",", "applier", ":", "'Paul Tran'", "}", ",", "{", "id", ":", "'6'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'农业银行丨杭州分行'", ",", "applier", ":", "'Anna Poole'", "}", ",", "]", ";", "const", "columns1", "=", "[", "{", "code", ":", "'name'", ",", "width", ":", "220", ",", "name", ":", "'公司名称'", "}", ",", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "operationCol", ",", "]", ";", "const", "dataSource2", "=", "[", "{", "name", ":", "'蚂蚁金服'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'South Maddison'", ",", "guide", ":", "'Don Moreno'", "}", ",", "{", "name", ":", "'阿里巴巴(中国)有限公司'", ",", "dept", ":", "'航旅事业部-酒店业务'", ",", "dest", ":", "'Emilhaven'", ",", "guide", ":", "'Douglas Richards'", "}", ",", "{", "name", ":", "'菜鸟网络'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", "}", ",", "{", "name", ":", "'蚂蚁金服'", ",", "dept", ":", "'信息平台部-用户体验部'", ",", "dest", ":", "'杭州千岛湖'", ",", "guide", ":", "'Eric Castillo'", "}", ",", "{", "name", ":", "'阿里巴巴(中国)有限公司'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'East Karl'", ",", "guide", ":", "'Herbert Patton'", "}", ",", "]", ";", "const", "columns2", "=", "[", "{", "code", ":", "'name'", ",", "name", ":", "'公司名称'", ",", "width", ":", "200", "}", ",", "{", "code", ":", "'dept'", ",", "name", ":", "'部门名称'", ",", "width", ":", "180", "}", ",", "{", "code", ":", "'dest'", ",", "name", ":", "'团建目的地'", ",", "width", ":", "160", "}", ",", "{", "code", ":", "'guide'", ",", "name", ":", "'当地导游'", ",", "width", ":", "160", "}", ",", "]", ";", "export", "function", "Basic", "(", ")", "{", "return", "<", "BaseTable", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", "}", "/", ">", ";", "}", "export", "function", "BasicMobile", "(", ")", "{", "return", "(", "<", "BaseTable", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "[", "{", "code", ":", "'name'", ",", "width", ":", "120", ",", "name", ":", "'公司名称'", "}", ",", "{", "code", ":", "'amount'", ",", "width", ":", "120", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "80", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "80", ",", "name", ":", "'申请人'", "}", ",", "{", "...", "operationCol", ",", "width", ":", "170", ",", "lock", ":", "false", "}", ",", "]", "}", "/", ">", ")", ";", "}", "export", "function", "表格样式", "(", ")", "{", "const", "[", "compact", ",", "setCompact", "]", "=", "useState", "(", "true", ")", ";", "const", "[", "zebra", ",", "setZebra", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "bordered", ",", "setBordered", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "hasHeader", ",", "setHasHeader", "]", "=", "useState", "(", "true", ")", ";", "const", "[", "isLoading", ",", "setIsLoading", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "marginBottom", ":", "16", "}", "}", ">", "<", "Checkbox", "checked", "=", "{", "compact", "}", "onChange", "=", "{", "(", ")", "=>", "setCompact", "(", "!", "compact", ")", "}", ">", "紧凑型", "<", "/Checkbox>", "<", "Checkbox", "style", "=", "{", "{", "marginLeft", ":", "16", "}", "}", "checked", "=", "{", "zebra", "}", "onChange", "=", "{", "(", ")", "=>", "setZebra", "(", "!", "zebra", ")", "}", ">", "斑马线", "<", "/Checkbox>", "<", "Checkbox", "style", "=", "{", "{", "marginLeft", ":", "16", "}", "}", "checked", "=", "{", "bordered", "}", "onChange", "=", "{", "(", ")", "=>", "setBordered", "(", "!", "bordered", ")", "}", ">", "边框", "<", "/Checkbox>", "<", "Checkbox", "style", "=", "{", "{", "marginLeft", ":", "40", "}", "}", "checked", "=", "{", "hasHeader", "}", "onChange", "=", "{", "(", ")", "=>", "setHasHeader", "(", "!", "hasHeader", ")", "}", ">", "展示表头", "<", "/Checkbox>", "<", "Checkbox", "style", "=", "{", "{", "marginLeft", ":", "16", "}", "}", "checked", "=", "{", "isLoading", "}", "onChange", "=", "{", "(", ")", "=>", "setIsLoading", "(", "!", "isLoading", ")", "}", ">", "加载状态", "<", "/Checkbox>", "<", "/div>", "<", "pre", ">", "{", "`<Table`", "+", "`\\n dataSource={dataSource}`", "+", "`\\n columns={columns}`", "+", "`\\n className=\"${", "cx", "(", "{", "compact", ",", "zebra", ",", "bordered", "}", ")", "}\" `", "+", "`\\n hasHeader={${", "hasHeader", "}} `", "+", "`\\n isLoading={${", "isLoading", "}} `", "+", "`\\n/>`", "}", "<", "/pre>", "<", "BaseTable", "className", "=", "{", "cx", "(", "{", "compact", ",", "zebra", ",", "bordered", "}", ")", "}", "isLoading", "=", "{", "isLoading", "}", "hasHeader", "=", "{", "hasHeader", "}", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", "}", "/", ">", "<", "/div>);", "}", "export", "function", "数据为空", "(", ")", "{", "return", "<", "BaseTable", "dataSource", "=", "{", "[", "]", "}", "columns", "=", "{", "columns2", "}", "/", ">", ";", "}", "export", "function", "表格数据加载", "(", ")", "{", "return", "<", "BaseTable", "isLoading", "dataSource", "=", "{", "dataSource2", "}", "columns", "=", "{", "columns2", "}", "/", ">", ";", "}", "export", "function", "空数据加载", "(", ")", "{", "return", "<", "BaseTable", "isLoading", "dataSource", "=", "{", "[", "]", "}", "columns", "=", "{", "columns2", "}", "/", ">", ";", "}", "export", "function", "表头分组与左右锁列", "(", ")", "{", "const", "repeats", "=", "[", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ";", "return", "(", "<", "BaseTable", "style", "=", "{", "{", "'--header-row-height'", ":", "'40px'", "}", "}", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "[", "{", "lock", ":", "true", ",", "code", ":", "'name'", ",", "width", ":", "200", ",", "name", ":", "'公司名称'", "}", ",", "{", "name", ":", "'分组1'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组2'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组3'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组4'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组5'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组6'", ",", "children", ":", "repeats", "}", ",", "operationCol", ",", "]", "}", "/", ">", ")", ";", "}", "export", "function", "限定表格容器大小", "(", ")", "{", "const", "nameCol", "=", "{", "lock", ":", "true", ",", "code", ":", "'name'", ",", "width", ":", "200", ",", "name", ":", "'公司名称'", "}", ";", "const", "repeats", "=", "[", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ";", "return", "(", "<", "BaseTable", "style", "=", "{", "{", "width", ":", "800", ",", "height", ":", "385", ",", "overflow", ":", "'auto'", "}", "}", "dataSource", "=", "{", "repeat", "(", "dataSource1", ",", "10", ")", "}", "columns", "=", "{", "[", "{", "name", ":", "'序号'", ",", "width", ":", "70", ",", "align", ":", "'right'", ",", "lock", ":", "true", ",", "getValue", "(", "_", ",", "rowIndex", ")", "{", "return", "String", "(", "rowIndex", "+", "1", ")", ";", "}", ",", "}", ",", "nameCol", ",", "...", "repeat", "(", "repeats", ",", "5", ")", ",", "operationCol", ",", "]", "}", "/", ">", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, 5, null, 3, null, null, null, 5, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1226
[ "import", "{", "Checkbox", ",", "Column", ",", "Menu", ",", "Popup", ",", "ProTable", "}", "from", "'@rexd/core'", ";", "import", "{", "proto", "}", "from", "'ali-react-table'", ";", "import", "cx", "from", "'classnames'", ";", "import", "React", ",", "{", "useState", "}", "from", "'react'", ";", "import", "styled", "from", "'styled-components'", ";", "export", "default", "{", "title", ":", "'Table / ProTable'", "}", ";", "function", "repeat", "<", "T", ">", "(", "arr", ",", "n", ")", "{", "let", "result", "=", "[", "]", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "n", ";", "i", "++", ")", "{", "result", "=", "result", ".", "concat", "(", "arr", ")", ";", "}", "return", "result", ";", "}", "function", "CaretDown", "(", "props", ")", "{", "return", "(", "<", "svg", "focusable", "=", "\"false\"", "preserveAspectRatio", "=", "\"xMidYMid meet\"", "fill", "=", "\"currentColor\"", "width", "=", "\"16\"", "height", "=", "\"16\"", "viewBox", "=", "\"0 0 32 32\"", "{", "...", "props", "}", ">", "<", "path", "d", "=", "\"M24 12L16 22 8 12z\"", "/", ">", "<", "/svg>);", "}", "const", "OperationsDiv", "=", "styled", ".", "div", "`\n display: flex;\n height: 20px;\n align-items: center;\n\n .item {\n height: 20px;\n cursor: pointer;\n color: #3858cf;\n display: flex;\n align-items: center;\n\n &.danger {\n color: #eb4141;\n }\n }\n\n .sep {\n height: 10px;\n width: 1px;\n margin-left: 12px;\n margin-right: 12px;\n background: #eeeeee;\n }\n`", ";", "function", "renderOptions", "(", ")", "{", "return", "(", "<", "OperationsDiv", ">", "<", "div", "className", "=", "\"item\"", ">", "编辑", "<", "/div>", "<", "div", "className", "=", "\"sep\"", "/", ">", "<", "div", "className", "=", "\"item danger\"", ">", "删除", "<", "/div>", "<", "div", "className", "=", "\"sep\"", "/", ">", "<", "Popup", "target", "=", "{", "<", "div", "className", "=", "\"item\"", ">", "更多", "<", "CaretDown", "style", "=", "{", "{", "color", ":", "'#A6A6A6'", "}", "}", "/>", "<", "/div>}>", "<", "Menu", "autoDismissPopup", "style", "=", "{", "{", "minWidth", ":", "100", "}", "}", "dataSource", "=", "{", "'1,2,3,4'", ".", "split", "(", "','", ")", ".", "map", "(", "(", "n", ")", "=>", "(", "{", "key", ":", "`Option ${", "n", "}`", ",", "label", ":", "`Option ${", "n", "}`", ",", "}", ")", ")", "}", "/", ">", "<", "/Popup>", "<", "/OperationsDiv>);", "}", "const", "operationCol", "=", "{", "lock", ":", "true", ",", "name", ":", "'操作'", ",", "render", ":", "renderOptions", ",", "width", ":", "200", ",", "}", ";", "const", "dataSource1", "=", "[", "{", "id", ":", "'1'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨杭州分行'", ",", "applier", ":", "'James Collier'", "}", ",", "{", "id", ":", "'2'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'建设银行丨未来科技城'", ",", "applier", ":", "'Philip Burke'", "}", ",", "{", "id", ":", "'3'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'交通银行丨浙大路支行'", ",", "applier", ":", "'Wesley Cruz'", "}", ",", "{", "id", ":", "'4'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨庆春路支行'", ",", "applier", ":", "'Billy Horton'", "}", ",", "{", "id", ":", "'5'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨文一路分行'", ",", "applier", ":", "'Paul Tran'", "}", ",", "{", "id", ":", "'6'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'农业银行丨杭州分行'", ",", "applier", ":", "'Anna Poole'", "}", ",", "]", ";", "const", "columns1", "=", "[", "{", "code", ":", "'name'", ",", "width", ":", "220", ",", "name", ":", "'公司名称'", "}", ",", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ";", "const", "dataSource2", "=", "[", "{", "name", ":", "'蚂蚁金服'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'South Maddison'", ",", "guide", ":", "'Don Moreno'", "}", ",", "{", "name", ":", "'阿里巴巴(中国)有限公司'", ",", "dept", ":", "'航旅事业部-酒店业务'", ",", "dest", ":", "'Emilhaven'", ",", "guide", ":", "'Douglas Richards'", "}", ",", "{", "name", ":", "'菜鸟网络'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", "}", ",", "{", "name", ":", "'蚂蚁金服'", ",", "dept", ":", "'信息平台部-用户体验部'", ",", "dest", ":", "'杭州千岛湖'", ",", "guide", ":", "'Eric Castillo'", "}", ",", "{", "name", ":", "'阿里巴巴(中国)有限公司'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'East Karl'", ",", "guide", ":", "'Herbert Patton'", "}", ",", "]", ";", "const", "columns2", "=", "[", "{", "code", ":", "'name'", ",", "name", ":", "'公司名称'", ",", "width", ":", "200", "}", ",", "{", "code", ":", "'dept'", ",", "name", ":", "'部门名称'", ",", "width", ":", "180", "}", ",", "{", "code", ":", "'dest'", ",", "name", ":", "'团建目的地'", ",", "width", ":", "160", "}", ",", "{", "code", ":", "'guide'", ",", "name", ":", "'当地导游'", ",", "width", ":", "160", "}", ",", "]", ";", "const", "dataSource3", "=", "[", "{", "name", ":", "'阿里巴巴网络技术有限公司1'", ",", "entity", ":", "'蚂蚁金服(中国)'", ",", "dept", ":", "'招商银行丨杭州分行'", ",", "applier", ":", "'Don Moreno'", "}", ",", "{", "name", ":", "'阿里巴巴网络技术有限公司2'", ",", "entity", ":", "'蚂蚁金服(中国)'", ",", "dept", ":", "'建设银行丨未来科技城'", ",", "applier", ":", "'Douglas Richards'", "}", ",", "{", "name", ":", "'阿里巴巴网络技术有限公司3'", ",", "entity", ":", "'蚂蚁金服(中国)'", ",", "dept", ":", "'交通银行丨浙大路支行'", ",", "applier", ":", "'Douglas Lee'", "}", ",", "{", "name", ":", "'阿里巴巴网络技术有限公司4'", ",", "entity", ":", "'蚂蚁金服(中国)'", ",", "dept", ":", "'招商银行丨庆春路支行'", ",", "applier", ":", "'Eric Castillo'", "}", ",", "{", "name", ":", "'阿里巴巴网络技术有限公司5'", ",", "entity", ":", "'蚂蚁金服(中国)'", ",", "dept", ":", "'招商银行丨文一路分行'", ",", "applier", ":", "'Herbert Patton'", "}", ",", "]", ";", "const", "columns3", "=", "[", "{", "code", ":", "'name'", ",", "name", ":", "'公司名称'", ",", "width", ":", "200", ",", "features", ":", "{", "sortable", ":", "true", "}", ",", "}", ",", "{", "code", ":", "'entity'", ",", "name", ":", "'支付实体'", ",", "width", ":", "160", "}", ",", "{", "code", ":", "'dept'", ",", "name", ":", "'金融机构'", ",", "width", ":", "160", ",", "features", ":", "{", "sortable", ":", "true", "}", ",", "}", ",", "{", "code", ":", "'applier'", ",", "name", ":", "'申请人'", ",", "width", ":", "160", ",", "features", ":", "{", "sortable", ":", "true", "}", ",", "}", ",", "operationCol", ",", "]", ";", "function", "makeChildren", "(", "prefix", ")", "{", "return", "[", "{", "id", ":", "`${", "prefix", "}-1`", ",", "title", ":", "'二级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "children", ":", "[", "{", "id", ":", "`${", "prefix", "}-1-1`", ",", "title", ":", "'三级标题'", ",", "dept", ":", "'盒马产品技术部-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "{", "id", ":", "`${", "prefix", "}-1-2`", ",", "title", ":", "'三级标题'", ",", "dept", ":", "'盒马产品技术部-前端'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "]", ",", "}", ",", "{", "id", ":", "`${", "prefix", "}-2`", ",", "title", ":", "'二级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "children", ":", "[", "{", "id", ":", "`${", "prefix", "}-2-1`", ",", "title", ":", "'三级标题'", ",", "dept", ":", "'盒马产品技术部-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "{", "id", ":", "`${", "prefix", "}-2-2`", ",", "title", ":", "'三级标题'", ",", "dept", ":", "'盒马产品技术部-前端'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "]", ",", "}", ",", "{", "id", ":", "`${", "prefix", "}-3`", ",", "title", ":", "'二级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "]", ";", "}", "const", "dataSource4", "=", "[", "{", "id", ":", "'1'", ",", "title", ":", "'一级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'South Maddison'", ",", "guide", ":", "'Don Moreno'", ",", "children", ":", "makeChildren", "(", "'1'", ")", "}", ",", "{", "id", ":", "'2'", ",", "title", ":", "'一级标题'", ",", "dept", ":", "'航旅事业部-酒店业务'", ",", "dest", ":", "'Emilhaven'", ",", "guide", ":", "'Douglas Richards'", ",", "children", ":", "makeChildren", "(", "'2'", ")", "}", ",", "{", "id", ":", "'3'", ",", "title", ":", "'一级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "children", ":", "makeChildren", "(", "'3'", ")", "}", ",", "{", "id", ":", "'4'", ",", "title", ":", "'一级标题'", ",", "dept", ":", "'信息平台部-用户体验部'", ",", "dest", ":", "'杭州千岛湖'", ",", "guide", ":", "'Eric Castillo'", ",", "children", ":", "makeChildren", "(", "'4'", ")", "}", ",", "{", "id", ":", "'5'", ",", "title", ":", "'一级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'East Karl'", ",", "guide", ":", "'Herbert Patton'", "}", ",", "]", ";", "const", "columns4", "=", "[", "{", "code", ":", "'title'", ",", "name", ":", "'标题'", ",", "width", ":", "200", "}", ",", "{", "code", ":", "'dept'", ",", "name", ":", "'部门名称'", ",", "width", ":", "180", "}", ",", "{", "code", ":", "'dest'", ",", "name", ":", "'团建目的地'", ",", "width", ":", "160", "}", ",", "{", "code", ":", "'guide'", ",", "name", ":", "'当地导游'", ",", "width", ":", "160", "}", ",", "operationCol", ",", "]", ";", "const", "occupations", "=", "[", "'UED'", ",", "'客服'", ",", "'产品'", ",", "'运营'", ",", "'前端'", ",", "'数据'", "]", ";", "const", "dataSource6", "=", "occupations", ".", "map", "(", "(", "occupation", ")", "=>", "(", "{", "occupation", ",", "hc_2014", ":", "104", ",", "hc_2015", ":", "168", ",", "hc_lfl", ":", "50", ",", "age_2014", ":", "30", ",", "age_2015", ":", "32", ",", "age_lfl", ":", "15", ",", "rate_2014", ":", "0.3", ",", "rate_2015", ":", "0.45", ",", "rate2_2014", ":", "0.33", ",", "rate2_2015", ":", "0.48", ",", "}", ")", ")", ";", "const", "col", "=", "proto", ".", "array", "<", "Column", "&", "{", "code", "?", ":", "string", ";", "}", ">", "(", "{", "align", ":", "'center'", ",", "width", ":", "80", ",", "headerCellProps", ":", "{", "style", ":", "{", "textAlign", ":", "'center'", ",", "padding", ":", "0", "}", "}", ",", "}", ")", ";", "const", "columns6", "=", "col", "(", "[", "{", "lock", ":", "true", ",", "code", ":", "'occupation'", ",", "name", ":", "'职务'", ",", "width", ":", "120", "}", ",", "{", "name", ":", "'人数'", ",", "children", ":", "col", "(", "[", "{", "code", ":", "'hc_2014'", ",", "name", ":", "'2014年'", "}", ",", "{", "code", ":", "'hc_2015'", ",", "name", ":", "'2015年'", "}", ",", "{", "code", ":", "'hc_lfl'", ",", "name", ":", "'同比增长'", "}", ",", "]", ")", ",", "}", ",", "{", "name", ":", "'年龄'", ",", "children", ":", "col", "(", "[", "{", "code", ":", "'age_2014'", ",", "name", ":", "'2014年'", "}", ",", "{", "code", ":", "'age_2015'", ",", "name", ":", "'2015年'", "}", ",", "{", "code", ":", "'age_lfl'", ",", "name", ":", "'同比增长'", "}", ",", "]", ")", ",", "}", ",", "{", "name", ":", "'占比'", ",", "children", ":", "col", "(", "[", "{", "code", ":", "'rate_2014'", ",", "name", ":", "'2014年'", "}", ",", "{", "code", ":", "'rate_2015'", ",", "name", ":", "'2015年'", "}", ",", "]", ")", ",", "}", ",", "{", "name", ":", "'占比2'", ",", "children", ":", "col", "(", "[", "{", "code", ":", "'rate_2014'", ",", "name", ":", "'2014年'", "}", ",", "{", "code", ":", "'rate_2015'", ",", "name", ":", "'2015年'", "}", ",", "]", ")", ",", "}", ",", "]", ")", ";", "const", "dataSource7", "=", "[", "{", "merchant_name", ":", "'盒马商家'", ",", "subsidiary_name", ":", "'东北子公司'", ",", "city_code", ":", "'all_subsidiary_from_store_024'", ",", "shop_name", ":", "'整体-东北子公司'", ",", "sku_code", ":", "'160782029'", ",", "sku_name", ":", "'鲜鸡蛋 10枚'", ",", "merge_cate_level1_id", ":", "'126196004'", ",", "merge_cate_level1_name", ":", "'肉类禽蛋'", ",", "merge_cate_level2_id", ":", "'126198028'", ",", "merge_cate_level2_name", ":", "'蛋类'", ",", "merge_cate_level3_id", ":", "'31300103'", ",", "merge_cate_level3_name", ":", "'鲜鸡蛋'", ",", "kind_code", ":", "'白羽鸡蛋'", ",", "app_trd_amt_1d", ":", "15.43", ",", "app_trd_amt_pct", ":", "1", ",", "app_trd_pbt", ":", "0.14", ",", "imp_uv_dau_pct", ":", "0.3456", ",", "all_imp_uv", ":", "580", ",", "search_imp_uv", ":", "8", ",", "classis_imp_uv", ":", "10", ",", "detail_imp_uv", ":", "11", ",", "cart_imp_uv", ":", "268", ",", "my_page_imp_uv", ":", "12", ",", "pq_act_imp_uv", ":", "50", ",", "other_imp_uv", ":", "420", ",", "all_clk_uv", ":", "16", ",", "search_clk_uv", ":", "1", ",", "classis_clk_uv", ":", "0", ",", "detail_clk_uv", ":", "0", ",", "cart_clk_uv", ":", "3", ",", "my_page_clk_uv", ":", "0", ",", "pq_act_clk_uv", ":", "0", ",", "other_clk_uv", ":", "9", ",", "all_ipv_uv", ":", "5", ",", "search_ipv_uv", ":", "0", ",", "classis_ipv_uv", ":", "0", ",", "detail_ipv_uv", ":", "0", ",", "cart_ipv_uv", ":", "1", ",", "my_page_ipv_uv", ":", "0", ",", "pq_act_ipv_uv", ":", "0", ",", "other_ipv_uv", ":", "4", ",", "all_cart_uv", ":", "6", ",", "search_cart_uv", ":", "1", ",", "classis_cart_uv", ":", "0", ",", "detail_cart_uv", ":", "0", ",", "cart_cart_uv", ":", "3", ",", "my_page_cart_uv", ":", "0", ",", "pq_act_cart_uv", ":", "0", ",", "other_cart_uv", ":", "2", ",", "all_pay_uv", ":", "2", ",", "search_pay_uv", ":", "1", ",", "classis_pay_uv", ":", "0", ",", "detail_pay_uv", ":", "0", ",", "cart_pay_uv", ":", "1", ",", "my_page_pay_uv", ":", "0", ",", "pq_act_pay_uv", ":", "0", ",", "other_pay_uv", ":", "0", ",", "all_imp2pay_rate", ":", "0.0034", ",", "search_imp2pay_rate", ":", "0.125", ",", "classis_imp2pay_rate", ":", "0", ",", "detail_imp2pay_rate", ":", "0", ",", "cart_imp2pay_rate", ":", "0.0037", ",", "my_page_imp2pay_rate", ":", "0", ",", "pq_act_imp2pay_rate", ":", "0", ",", "other_imp2pay_rate", ":", "0", ",", "app_qty_pbt", ":", "'0.14元/盒'", ",", "all_app_trd_amt_1d", ":", "15.43", ",", "app_trd_usr_cnt_1d", ":", "110", "}", ",", "{", "merchant_name", ":", "'盒马商家'", ",", "subsidiary_name", ":", "'海南子公司'", ",", "city_code", ":", "'all_subsidiary_from_store_0898'", ",", "shop_name", ":", "'整体-海南子公司'", ",", "sku_code", ":", "'140560002'", ",", "sku_name", ":", "'光明新鲜牧场高品质牛乳950ml'", ",", "merge_cate_level1_id", ":", "'126196008'", ",", "merge_cate_level1_name", ":", "'冷藏'", ",", "merge_cate_level2_id", ":", "'127530076'", ",", "merge_cate_level2_name", ":", "'鲜奶'", ",", "merge_cate_level3_id", ":", "'127530168'", ",", "merge_cate_level3_name", ":", "'国产鲜牛奶'", ",", "app_trd_amt_1d", ":", "536.18", ",", "app_trd_amt_pct", ":", "0.6112", ",", "app_trd_pbt", ":", "22.66", ",", "imp_uv_dau_pct", ":", "0.2976", ",", "all_imp_uv", ":", "1417", ",", "search_imp_uv", ":", "214", ",", "classis_imp_uv", ":", "351", ",", "detail_imp_uv", ":", "25", ",", "cart_imp_uv", ":", "163", ",", "my_page_imp_uv", ":", "90", ",", "pq_act_imp_uv", ":", "553", ",", "other_imp_uv", ":", "508", ",", "all_clk_uv", ":", "61", ",", "search_clk_uv", ":", "20", ",", "classis_clk_uv", ":", "15", ",", "detail_clk_uv", ":", "0", ",", "cart_clk_uv", ":", "2", ",", "my_page_clk_uv", ":", "2", ",", "pq_act_clk_uv", ":", "10", ",", "other_clk_uv", ":", "16", ",", "all_ipv_uv", ":", "30", ",", "search_ipv_uv", ":", "7", ",", "classis_ipv_uv", ":", "4", ",", "detail_ipv_uv", ":", "1", ",", "cart_ipv_uv", ":", "1", ",", "my_page_ipv_uv", ":", "1", ",", "pq_act_ipv_uv", ":", "5", ",", "other_ipv_uv", ":", "13", ",", "all_cart_uv", ":", "46", ",", "search_cart_uv", ":", "16", ",", "classis_cart_uv", ":", "13", ",", "detail_cart_uv", ":", "1", ",", "cart_cart_uv", ":", "1", ",", "my_page_cart_uv", ":", "1", ",", "pq_act_cart_uv", ":", "7", ",", "other_cart_uv", ":", "10", ",", "all_pay_uv", ":", "19", ",", "search_pay_uv", ":", "7", ",", "classis_pay_uv", ":", "5", ",", "detail_pay_uv", ":", "0", ",", "cart_pay_uv", ":", "1", ",", "my_page_pay_uv", ":", "1", ",", "pq_act_pay_uv", ":", "2", ",", "other_pay_uv", ":", "4", ",", "all_imp2pay_rate", ":", "0.0134", ",", "search_imp2pay_rate", ":", "0.0327", ",", "classis_imp2pay_rate", ":", "0.0142", ",", "detail_imp2pay_rate", ":", "0.0133", ",", "cart_imp2pay_rate", ":", "0.0041", ",", "my_page_imp2pay_rate", ":", "0.0074", ",", "pq_act_imp2pay_rate", ":", "0.003", ",", "other_imp2pay_rate", ":", "0.0072", ",", "app_qty_pbt", ":", "'11.83元/盒'", ",", "all_app_trd_amt_1d", ":", "1608.53", ",", "app_trd_usr_cnt_1d", ":", "24", "}", ",", "{", "merchant_name", ":", "'盒马商家'", ",", "subsidiary_name", ":", "'武汉子公司'", ",", "city_code", ":", "'all_subsidiary_from_store_027'", ",", "shop_name", ":", "'整体-武汉子公司'", ",", "sku_code", ":", "'133616021'", ",", "sku_name", ":", "'山东羊角蜜2粒装700g'", ",", "merge_cate_level1_id", ":", "'126196002'", ",", "merge_cate_level1_name", ":", "'水果'", ",", "merge_cate_level2_id", ":", "'126198012'", ",", "merge_cate_level2_name", ":", "'瓜类'", ",", "merge_cate_level3_id", ":", "'127532105'", ",", "merge_cate_level3_name", ":", "'蜜瓜'", ",", "kind_code", ":", "'羊角蜜瓜'", ",", "app_trd_amt_1d", ":", "344.04", ",", "app_trd_amt_pct", ":", "0.749", ",", "app_trd_pbt", ":", "21.33", ",", "imp_uv_dau_pct", ":", "0.2937", ",", "all_imp_uv", ":", "1976", ",", "search_imp_uv", ":", "90", ",", "classis_imp_uv", ":", "1097", ",", "detail_imp_uv", ":", "60", ",", "cart_imp_uv", ":", "69", ",", "my_page_imp_uv", ":", "32", ",", "pq_act_imp_uv", ":", "808", ",", "other_imp_uv", ":", "134", ",", "all_clk_uv", ":", "42", ",", "search_clk_uv", ":", "4", ",", "classis_clk_uv", ":", "27", ",", "detail_clk_uv", ":", "0", ",", "cart_clk_uv", ":", "1", ",", "my_page_clk_uv", ":", "0", ",", "pq_act_clk_uv", ":", "5", ",", "other_clk_uv", ":", "4", ",", "all_ipv_uv", ":", "20", ",", "search_ipv_uv", ":", "2", ",", "classis_ipv_uv", ":", "12", ",", "detail_ipv_uv", ":", "0", ",", "cart_ipv_uv", ":", "0", ",", "my_page_ipv_uv", ":", "0", ",", "pq_act_ipv_uv", ":", "3", ",", "other_ipv_uv", ":", "3", ",", "all_cart_uv", ":", "26", ",", "search_cart_uv", ":", "3", ",", "classis_cart_uv", ":", "18", ",", "detail_cart_uv", ":", "0", ",", "cart_cart_uv", ":", "0", ",", "my_page_cart_uv", ":", "0", ",", "pq_act_cart_uv", ":", "2", ",", "other_cart_uv", ":", "2", ",", "all_pay_uv", ":", "14", ",", "search_pay_uv", ":", "2", ",", "classis_pay_uv", ":", "10", ",", "detail_pay_uv", ":", "0", ",", "cart_pay_uv", ":", "0", ",", "my_page_pay_uv", ":", "0", ",", "pq_act_pay_uv", ":", "1", ",", "other_pay_uv", ":", "1", ",", "all_imp2pay_rate", ":", "0.0069", ",", "search_imp2pay_rate", ":", "0.0185", ",", "classis_imp2pay_rate", ":", "0.0091", ",", "detail_imp2pay_rate", ":", "0.0007", ",", "cart_imp2pay_rate", ":", "0.0013", ",", "my_page_imp2pay_rate", ":", "0.0027", ",", "pq_act_imp2pay_rate", ":", "0.0006", ",", "other_imp2pay_rate", ":", "0.0084", ",", "app_qty_pbt", ":", "'19.68元/份'", ",", "all_app_trd_amt_1d", ":", "7912.84", ",", "app_trd_usr_cnt_1d", ":", "16", "}", ",", "{", "merchant_name", ":", "'盒马商家'", ",", "subsidiary_name", ":", "'东北子公司'", ",", "city_code", ":", "'all_subsidiary_from_store_024'", ",", "shop_name", ":", "'整体-东北子公司'", ",", "sku_code", ":", "'133784123'", ",", "sku_name", ":", "'大连美早樱桃240g/盒'", ",", "merge_cate_level1_id", ":", "'126196002'", ",", "merge_cate_level1_name", ":", "'水果'", ",", "merge_cate_level2_id", ":", "'31330200'", ",", "merge_cate_level2_name", ":", "'车厘子/樱桃类'", ",", "merge_cate_level3_id", ":", "'31330201'", ",", "merge_cate_level3_name", ":", "'国产樱桃'", ",", "kind_code", ":", "'国产红樱桃'", ",", "app_trd_amt_1d", ":", "438.37", ",", "app_trd_amt_pct", ":", "0.6741", ",", "app_trd_pbt", ":", "32.71", ",", "imp_uv_dau_pct", ":", "0.2913", ",", "all_imp_uv", ":", "1276", ",", "search_imp_uv", ":", "74", ",", "classis_imp_uv", ":", "649", ",", "detail_imp_uv", ":", "26", ",", "cart_imp_uv", ":", "23", ",", "my_page_imp_uv", ":", "4", ",", "pq_act_imp_uv", ":", "651", ",", "other_imp_uv", ":", "93", ",", "all_clk_uv", ":", "42", ",", "search_clk_uv", ":", "4", ",", "classis_clk_uv", ":", "28", ",", "detail_clk_uv", ":", "0", ",", "cart_clk_uv", ":", "0", ",", "my_page_clk_uv", ":", "0", ",", "pq_act_clk_uv", ":", "7", ",", "other_clk_uv", ":", "3", ",", "all_ipv_uv", ":", "28", ",", "search_ipv_uv", ":", "3", ",", "classis_ipv_uv", ":", "17", ",", "detail_ipv_uv", ":", "0", ",", "cart_ipv_uv", ":", "0", ",", "my_page_ipv_uv", ":", "0", ",", "pq_act_ipv_uv", ":", "5", ",", "other_ipv_uv", ":", "3", ",", "all_cart_uv", ":", "22", ",", "search_cart_uv", ":", "2", ",", "classis_cart_uv", ":", "15", ",", "detail_cart_uv", ":", "0", ",", "cart_cart_uv", ":", "0", ",", "my_page_cart_uv", ":", "0", ",", "pq_act_cart_uv", ":", "3", ",", "other_cart_uv", ":", "1", ",", "all_pay_uv", ":", "12", ",", "search_pay_uv", ":", "1", ",", "classis_pay_uv", ":", "9", ",", "detail_pay_uv", ":", "0", ",", "cart_pay_uv", ":", "0", ",", "my_page_pay_uv", ":", "0", ",", "pq_act_pay_uv", ":", "1", ",", "other_pay_uv", ":", "1", ",", "all_imp2pay_rate", ":", "0.0091", ",", "search_imp2pay_rate", ":", "0.019", ",", "classis_imp2pay_rate", ":", "0.0136", ",", "detail_imp2pay_rate", ":", "0", ",", "cart_imp2pay_rate", ":", "0", ",", "my_page_imp2pay_rate", ":", "0", ",", "pq_act_imp2pay_rate", ":", "0.0012", ",", "other_imp2pay_rate", ":", "0.0064", ",", "app_qty_pbt", ":", "'29.62元/盒'", ",", "all_app_trd_amt_1d", ":", "2191.87", ",", "app_trd_usr_cnt_1d", ":", "13", "}", ",", "{", "merchant_name", ":", "'盒马商家'", ",", "subsidiary_name", ":", "'昆明子公司'", ",", "city_code", ":", "'all_subsidiary_from_store_0871'", ",", "shop_name", ":", "'整体-昆明子公司'", ",", "sku_code", ":", "'135816014'", ",", "sku_name", ":", "'小龙虾神鲜桶(麻辣)'", ",", "merge_cate_level1_id", ":", "'34020000'", ",", "merge_cate_level1_name", ":", "'盒马鲜厨'", ",", "merge_cate_level2_id", ":", "'34020400'", ",", "merge_cate_level2_name", ":", "'盒马鲜厨_鲜厨水产'", ",", "merge_cate_level3_id", ":", "'34020401'", ",", "merge_cate_level3_name", ":", "'鲜厨水产_小龙虾'", ",", "app_trd_amt_1d", ":", "1157.52", ",", "app_trd_amt_pct", ":", "0.4667", ",", "app_trd_pbt", ":", "108.52", ",", "imp_uv_dau_pct", ":", "0.29", ",", "all_imp_uv", ":", "1835", ",", "search_imp_uv", ":", "137", ",", "classis_imp_uv", ":", "661", ",", "detail_imp_uv", ":", "38", ",", "cart_imp_uv", ":", "189", ",", "my_page_imp_uv", ":", "51", ",", "pq_act_imp_uv", ":", "681", ",", "other_imp_uv", ":", "520", ",", "all_clk_uv", ":", "105", ",", "search_clk_uv", ":", "24", ",", "classis_clk_uv", ":", "45", ",", "detail_clk_uv", ":", "0", ",", "cart_clk_uv", ":", "3", ",", "my_page_clk_uv", ":", "1", ",", "pq_act_clk_uv", ":", "27", ",", "other_clk_uv", ":", "11", ",", "all_ipv_uv", ":", "87", ",", "search_ipv_uv", ":", "21", ",", "classis_ipv_uv", ":", "37", ",", "detail_ipv_uv", ":", "0", ",", "cart_ipv_uv", ":", "2", ",", "my_page_ipv_uv", ":", "1", ",", "pq_act_ipv_uv", ":", "19", ",", "other_ipv_uv", ":", "11", ",", "all_cart_uv", ":", "35", ",", "search_cart_uv", ":", "9", ",", "classis_cart_uv", ":", "17", ",", "detail_cart_uv", ":", "0", ",", "cart_cart_uv", ":", "1", ",", "my_page_cart_uv", ":", "0", ",", "pq_act_cart_uv", ":", "5", ",", "other_cart_uv", ":", "4", ",", "all_pay_uv", ":", "10", ",", "search_pay_uv", ":", "2", ",", "classis_pay_uv", ":", "5", ",", "detail_pay_uv", ":", "0", ",", "cart_pay_uv", ":", "0", ",", "my_page_pay_uv", ":", "0", ",", "pq_act_pay_uv", ":", "1", ",", "other_pay_uv", ":", "0", ",", "all_imp2pay_rate", ":", "0.0053", ",", "search_imp2pay_rate", ":", "0.0158", ",", "classis_imp2pay_rate", ":", "0.0071", ",", "detail_imp2pay_rate", ":", "0", ",", "cart_imp2pay_rate", ":", "0.0009", ",", "my_page_imp2pay_rate", ":", "0", ",", "pq_act_imp2pay_rate", ":", "0.0012", ",", "other_imp2pay_rate", ":", "0.0006", ",", "app_qty_pbt", ":", "'99.22元/份'", ",", "all_app_trd_amt_1d", ":", "6945.14", ",", "app_trd_usr_cnt_1d", ":", "11", "}", ",", "]", ";", "/**\n * 通过 dataSource 设置表格的数据源,通过 columns 设置表格的列。\n * 注意 column.code 要与 dataSource 中的数据字段相对应。\n */", "export", "function", "Basic", "(", ")", "{", "const", "dataSource1", "=", "[", "{", "id", ":", "'1'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨杭州分行'", ",", "applier", ":", "'James Collier'", ",", "}", ",", "{", "id", ":", "'2'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'建设银行丨未来科技城'", ",", "applier", ":", "'Philip Burke'", ",", "}", ",", "{", "id", ":", "'3'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'交通银行丨浙大路支行'", ",", "applier", ":", "'Wesley Cruz'", ",", "}", ",", "{", "id", ":", "'4'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨庆春路支行'", ",", "applier", ":", "'Billy Horton'", ",", "}", ",", "{", "id", ":", "'5'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨文一路分行'", ",", "applier", ":", "'Paul Tran'", ",", "}", ",", "{", "id", ":", "'6'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'农业银行丨杭州分行'", ",", "applier", ":", "'Anna Poole'", ",", "}", ",", "]", ";", "const", "columns1", "=", "[", "{", "code", ":", "'name'", ",", "width", ":", "220", ",", "name", ":", "'公司名称'", "}", ",", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ";", "return", "<", "ProTable", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", "}", "/", ">", ";", "}", "Basic", ".", "storyName", "=", "'基本表格'", ";", "/** ProTable 提供了 compact、zebra、bordered 三种可选样式,可以通过 className 来使用这些样式 */", "export", "function", "TableStyles", "(", ")", "{", "const", "[", "compact", ",", "setCompact", "]", "=", "useState", "(", "true", ")", ";", "const", "[", "zebra", ",", "setZebra", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "bordered", ",", "setBordered", "]", "=", "useState", "(", "false", ")", ";", "const", "[", "hasHeader", ",", "setHasHeader", "]", "=", "useState", "(", "true", ")", ";", "const", "[", "isLoading", ",", "setIsLoading", "]", "=", "useState", "(", "false", ")", ";", "return", "(", "<", "div", ">", "<", "div", "style", "=", "{", "{", "marginBottom", ":", "16", "}", "}", ">", "<", "Checkbox", "checked", "=", "{", "compact", "}", "onChange", "=", "{", "(", ")", "=>", "setCompact", "(", "!", "compact", ")", "}", ">", "紧凑型", "<", "/Checkbox>", "<", "Checkbox", "style", "=", "{", "{", "marginLeft", ":", "16", "}", "}", "checked", "=", "{", "zebra", "}", "onChange", "=", "{", "(", ")", "=>", "setZebra", "(", "!", "zebra", ")", "}", ">", "斑马线", "<", "/Checkbox>", "<", "Checkbox", "style", "=", "{", "{", "marginLeft", ":", "16", "}", "}", "checked", "=", "{", "bordered", "}", "onChange", "=", "{", "(", ")", "=>", "setBordered", "(", "!", "bordered", ")", "}", ">", "边框", "<", "/Checkbox>", "<", "Checkbox", "style", "=", "{", "{", "marginLeft", ":", "40", "}", "}", "checked", "=", "{", "hasHeader", "}", "onChange", "=", "{", "(", ")", "=>", "setHasHeader", "(", "!", "hasHeader", ")", "}", ">", "展示表头", "<", "/Checkbox>", "<", "Checkbox", "style", "=", "{", "{", "marginLeft", ":", "16", "}", "}", "checked", "=", "{", "isLoading", "}", "onChange", "=", "{", "(", ")", "=>", "setIsLoading", "(", "!", "isLoading", ")", "}", ">", "加载状态", "<", "/Checkbox>", "<", "/div>", "<", "pre", ">", "{", "`<ProTable`", "+", "`\\n dataSource={dataSource}`", "+", "`\\n columns={columns}`", "+", "`\\n className=\"${", "cx", "(", "{", "compact", ",", "zebra", ",", "bordered", "}", ")", "}\" `", "+", "`\\n hasHeader={${", "hasHeader", "}} `", "+", "`\\n isLoading={${", "isLoading", "}} `", "+", "`\\n/>`", "}", "<", "/pre>", "<", "ProTable", "className", "=", "{", "cx", "(", "{", "compact", ",", "zebra", ",", "bordered", "}", ")", "}", "isLoading", "=", "{", "isLoading", "}", "hasHeader", "=", "{", "hasHeader", "}", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", "}", "/", ">", "<", "/div>);", "}", "TableStyles", ".", "storyName", "=", "'表格样式'", ";", "title", "export", "function", "Empty", "(", ")", "{", "return", "<", "ProTable", "dataSource", "=", "{", "[", "]", "}", "columns", "=", "{", "columns2", "}", "/", ">", ";", "}", "Empty", ".", "storyName", "=", "'数据为空'", ";", "title", "export", "function", "Loading", "(", ")", "{", "return", "<", "ProTable", "isLoading", "dataSource", "=", "{", "dataSource2", "}", "columns", "=", "{", "columns2", "}", "/", ">", ";", "}", "Loading", ".", "storyName", "=", "'表格数据加载'", ";", "/** 设置 `footerDataSource` 后可以展示表格页脚, footerDataSource 中的字段一般与 dataSource 相同 */", "export", "function", "TableFooter", "(", ")", "{", "return", "(", "<", "ProTable", "style", "=", "{", "{", "height", ":", "385", ",", "overflow", ":", "'auto'", "}", "}", "dataSource", "=", "{", "repeat", "(", "dataSource1", ",", "10", ")", "}", "footerDataSource", "=", "{", "[", "{", "footerRow", ":", "true", ",", "id", ":", "'all'", ",", "name", ":", "'阿里巴巴网络技术有限公司'", ",", "amount", ":", "'600,000.00(CNY)'", ",", "dept", ":", "'招商银行丨杭州分行'", ",", "applier", ":", "'James Collier'", ",", "}", ",", "]", "}", "getRowProps", "=", "{", "(", "row", ")", "=>", "{", "if", "(", "row", ".", "footerRow", ")", "{", "return", "{", "style", ":", "{", "'--bgcolor'", ":", "'var(--hover-bgcolor)'", "}", "as", "any", "}", ";", "}", "}", "}", "columns", "=", "{", "[", "{", "name", ":", "'序号'", ",", "width", ":", "70", ",", "align", ":", "'right'", ",", "lock", ":", "true", ",", "getValue", "(", "row", ",", "rowIndex", ")", "{", "if", "(", "row", ".", "footerRow", ")", "{", "return", "'合计'", ";", "}", "return", "String", "(", "rowIndex", "+", "1", ")", ";", "}", ",", "}", ",", "{", "lock", ":", "true", ",", "code", ":", "'name'", ",", "width", ":", "200", ",", "name", ":", "'公司名称'", "}", ",", "...", "repeat", "<", "Column", ">", "(", "[", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ",", "5", ")", ",", "{", "...", "operationCol", ",", "render", "(", "v", ",", "row", ",", "rowIndex", ")", "{", "if", "(", "row", ".", "footerRow", ")", "{", "return", "'批量操作'", ";", "}", "return", "operationCol", ".", "render", "(", "v", ",", "row", ",", "rowIndex", ")", ";", "}", ",", "}", ",", "]", "}", "/>);", "}", "TableFooter", ".", "storyName", "=", "'表格页脚'", ";", "/** 提供排序功能,便于查看数据。 */", "export", "function", "Sort", "(", ")", "{", "return", "(", "<", "ProTable", "dataSource", "=", "{", "dataSource3", "}", "columns", "=", "{", "columns3", "}", "sort", "=", "{", "{", "highlightColumnWhenActive", ":", "true", ",", "mode", ":", "'single'", ",", "defaultSorts", ":", "[", "{", "code", ":", "'name'", ",", "order", ":", "'desc'", "}", "]", ",", "}", "}", "/>);", "}", "Sort", ".", "storyName", "=", "'表格排序'", ";", "export", "function", "SingleSelect", "(", ")", "{", "const", "[", "value", ",", "onChange", "]", "=", "useState", "(", "'1'", ")", ";", "return", "(", "<", "ProTable", "primaryKey", "=", "\"id\"", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", "}", "singleSelect", "=", "{", "{", "value", ",", "onChange", ",", "isDisabled", "(", "row", ")", "{", "return", "Number", "(", "row", ".", "id", ")", "%", "3", "===", "0", ";", "}", ",", "clickArea", ":", "'cell'", ",", "}", "}", "/>);", "}", "SingleSelect", ".", "storyName", "=", "'表格行单选'", ";", "title", "export", "function", "MultipleSelect", "(", ")", "{", "const", "[", "value", ",", "onChange", "]", "=", "useState", "(", "[", "'1'", ",", "'3'", "]", ")", ";", "return", "(", "<", "ProTable", "primaryKey", "=", "\"id\"", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", "}", "multiSelect", "=", "{", "{", "value", ",", "onChange", ",", "isDisabled", "(", "row", ")", "{", "return", "row", ".", "id", "===", "'4'", ";", "}", ",", "highlightRowWhenSelected", ":", "true", ",", "clickArea", ":", "'row'", ",", "}", "}", "/>);", "}", "MultipleSelect", ".", "storyName", "=", "'表格行多选'", ";", "title", "export", "function", "TreeTable", "(", ")", "{", "return", "(", "<", "ProTable", "primaryKey", "=", "\"id\"", "dataSource", "=", "{", "dataSource4", "}", "columns", "=", "{", "columns4", "}", "treeMode", "=", "{", "{", "defaultOpenKeys", ":", "[", "'4'", ",", "'4-2'", "]", ",", "}", "}", "/>);", "}", "TreeTable", ".", "storyName", "=", "'树形表格'", ";", "export", "function", "TreeSelectTable", "(", ")", "{", "return", "(", "<", "ProTable", "dataSource", "=", "{", "dataSource4", "}", "columns", "=", "{", "columns4", "}", "primaryKey", "=", "\"id\"", "treeMode", "=", "{", "{", "defaultOpenKeys", ":", "[", "'4'", ",", "'4-2'", "]", "}", "}", "treeSelect", "=", "{", "{", "tree", ":", "dataSource4", ",", "defaultValue", ":", "[", "'1'", ",", "'3'", "]", ",", "rootKey", ":", "'root'", ",", "checkboxColumn", ":", "{", "lock", ":", "true", "}", ",", "}", "}", "/>);", "}", "TreeSelectTable", ".", "storyName", "=", "'树形可选择表格'", ";", "export", "function", "ColumnGroupAndLock", "(", ")", "{", "const", "repeats", "=", "[", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ";", "return", "(", "<", "ProTable", "style", "=", "{", "{", "'--header-row-height'", ":", "'40px'", "}", "}", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "[", "{", "lock", ":", "true", ",", "code", ":", "'name'", ",", "width", ":", "200", ",", "name", ":", "'公司名称'", "}", ",", "{", "name", ":", "'分组1'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组2'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组3'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组4'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组5'", ",", "children", ":", "repeats", "}", ",", "{", "name", ":", "'分组6'", ",", "children", ":", "repeats", "}", ",", "operationCol", ",", "]", "}", "/", ">", ")", ";", "}", "ColumnGroupAndLock", ".", "storyName", "=", "'表头分组与左右锁列'", ";", "title", "export", "function", "LimitedSize", "(", ")", "{", "const", "nameCol", "=", "{", "lock", ":", "true", ",", "code", ":", "'name'", ",", "width", ":", "200", ",", "name", ":", "'公司名称'", "}", ";", "const", "repeats", "=", "[", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ";", "return", "(", "<", "ProTable", "style", "=", "{", "{", "width", ":", "800", ",", "height", ":", "385", ",", "overflow", ":", "'auto'", "}", "}", "dataSource", "=", "{", "repeat", "(", "dataSource1", ",", "10", ")", "}", "columns", "=", "{", "[", "{", "name", ":", "'序号'", ",", "width", ":", "70", ",", "align", ":", "'right'", ",", "lock", ":", "true", ",", "getValue", "(", "_", ",", "rowIndex", ")", "{", "return", "String", "(", "rowIndex", "+", "1", ")", ";", "}", ",", "}", ",", "nameCol", ",", "...", "repeat", "(", "repeats", ",", "5", ")", ",", "operationCol", ",", "]", "}", "/", ">", ")", ";", "}", "LimitedSize", ".", "storyName", "=", "'限定表格容器大小'", ";", "export", "function", "RowGrouping", "(", ")", "{", "const", "dataSource5", "=", "[", "{", "id", ":", "'1'", ",", "title", ":", "'阿里巴巴网络技术有限公司'", ",", "children", ":", "[", "{", "id", ":", "`1-1`", ",", "title", ":", "'二级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "{", "id", ":", "`1-2`", ",", "title", ":", "'二级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "]", ",", "}", ",", "{", "id", ":", "'2'", ",", "title", ":", "'蚂蚁金服有限公司'", ",", "children", ":", "[", "{", "id", ":", "`2-1`", ",", "title", ":", "'二级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "{", "id", ":", "`2-2`", ",", "title", ":", "'二级标题'", ",", "dept", ":", "'消费者事业部-淘宝-UED'", ",", "dest", ":", "'云南大理'", ",", "guide", ":", "'Douglas Lee'", ",", "}", ",", "]", ",", "}", ",", "{", "id", ":", "'3'", ",", "title", ":", "'其他'", "}", ",", "]", ";", "const", "columns5", "=", "[", "{", "code", ":", "'title'", ",", "name", ":", "'标题'", ",", "width", ":", "200", "}", ",", "{", "code", ":", "'dept'", ",", "name", ":", "'部门名称'", ",", "width", ":", "180", "}", ",", "{", "code", ":", "'dest'", ",", "name", ":", "'团建目的地'", ",", "width", ":", "160", "}", ",", "{", "code", ":", "'guide'", ",", "name", ":", "'当地导游'", ",", "width", ":", "160", "}", ",", "]", ";", "return", "(", "<", "ProTable", "primaryKey", "=", "\"id\"", "dataSource", "=", "{", "dataSource5", "}", "columns", "=", "{", "columns5", "}", "rowGrouping", "=", "{", "{", "defaultOpenKeys", ":", "[", "'1'", ",", "'2'", "]", "}", "}", "/>);", "}", "RowGrouping", ".", "storyName", "=", "'行分组'", ";", "export", "function", "ColumnGroupingAndHighlight", "(", ")", "{", "return", "(", "<", "ProTable", "style", "=", "{", "{", "'--header-row-height'", ":", "'40px'", "}", "}", "className", "=", "\"bordered\"", "dataSource", "=", "{", "dataSource6", "}", "columns", "=", "{", "columns6", "}", "columnRangeHover", "/", ">", ")", ";", "}", "ColumnGroupingAndHighlight", ".", "storyName", "=", "'表头分组与列高亮'", ";", "export", "function", "RowDetail", "(", ")", "{", "return", "(", "<", "ProTable", "primaryKey", "=", "\"id\"", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", ".", "slice", "(", "0", ",", "4", ")", "}", "rowDetail", "=", "{", "{", "defaultOpenKeys", ":", "[", "'1'", ",", "'3'", "]", ",", "renderDetail", ":", "(", "row", ")", "=>", "{", "return", "(", "<", "div", "style", "=", "{", "{", "padding", ":", "16", ",", "display", ":", "'flex'", ",", "minWidth", ":", "800", ",", "}", "}", ">", "<", "div", "style", "=", "{", "{", "lineHeight", ":", "'20px'", "}", "}", ">", "<", "div", ">", "最近工作", ":", "高级经理", "|", "{", "row", ".", "dept", "}", "|", "2009", "-", "07", "-", "01", "至今", "<", "/div>", "<", "div", ">", "工作职责", ":", "巴拉巴拉小魔仙", "<", "/div>", "<", "div", ">", "联系方式", ":", "67676767", "|", "1212121", "@", "163.", "con", "<", "/div>", "<", "/div>", "<", "div", "style", "=", "{", "{", "marginLeft", ":", "48", ",", "lineHeight", ":", "'20px'", "}", "}", ">", "<", "div", ">", "教育经理", ":", "北京大学", "|", "工商管理", "|", "2007", "-", "09", "-", "01", "至", "2006", "-", "06", "-", "01", "<", "/div>", "<", "div", ">", "中央财经大学", "|", "2004", "-", "09", "-", "01", "至", "2007", "-", "06", "-", "01", "<", "/div>", "<", "/div>", "<", "/div>);", "}", ",", "}", "}", "/>);", "}", "RowDetail", ".", "storyName", "=", "'行详情'", ";", "export", "function", "NestedTable", "(", ")", "{", "return", "(", "<", "ProTable", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", ".", "slice", "(", "0", ",", "4", ")", "}", "primaryKey", "=", "\"id\"", "rowDetail", "=", "{", "{", "defaultOpenKeys", ":", "[", "'2'", "]", ",", "renderDetail", "(", ")", "{", "return", "(", "<", "ProTable", "style", "=", "{", "{", "margin", ":", "16", ",", "'--bgcolor'", ":", "'#fbfbfb'", ",", "'--header-bgcolor'", ":", "'var(--bgcolor)'", ",", "'--hover-bgcolor'", ":", "'var(--bgcolor)'", ",", "}", "}", "dataSource", "=", "{", "dataSource1", ".", "slice", "(", "0", ",", "3", ")", "}", "columns", "=", "{", "columns1", ".", "slice", "(", "0", ",", "4", ")", "}", "/", ">", ")", ";", "}", ",", "}", "}", "/>);", "}", "NestedTable", ".", "storyName", "=", "'表格嵌套'", ";", "/** 在嵌套的表格内继续嵌套,可以实现套娃效果 */", "export", "function", "MatryoshkaDollTable", "(", "{", "depth", "=", "0", "}", ")", "{", "return", "(", "<", "ProTable", "dataSource", "=", "{", "dataSource1", ".", "slice", "(", "0", ",", "3", ")", "}", "columns", "=", "{", "columns1", ".", "slice", "(", "0", ",", "4", ")", "}", "primaryKey", "=", "\"id\"", "className", "=", "{", "cx", "(", "'compact'", ",", "{", "bordered", ":", "depth", "%", "2", "===", "1", "}", ")", "}", "isStickyHeader", "=", "{", "false", "}", "rowDetail", "=", "{", "{", "renderDetail", "(", ")", "{", "let", "msg", ";", "if", "(", "depth", "<", "2", ")", "{", "msg", "=", "''", ";", "}", "else", "if", "(", "depth", "<=", "4", ")", "{", "msg", "=", "'加油,马上就到底了'", ";", "}", "else", "if", "(", "depth", "<=", "6", ")", "{", "msg", "=", "'还剩最后几层了'", ";", "}", "else", "if", "(", "depth", "<=", "8", ")", "{", "msg", "=", "'加油,还差一点点'", ";", "}", "else", "{", "return", "<", "div", ">", "到底了", "~", "<", "/div>;", "}", "return", "(", "<", "div", "style", "=", "{", "{", "margin", ":", "8", "}", "}", ">", "{", "msg", "}", "<", "MatryoshkaDollTable", "depth", "=", "{", "depth", "+", "1", "}", "/>", "<", "/div>);", "}", ",", "}", "}", "/>);", "}", "MatryoshkaDollTable", ".", "storyName", "=", "'表格套娃'", ";", "/** toolbar 非空时,将在表格上方渲染一个工具栏。 toolbar 将作为 `<Toolbar />` 组件的 props。 */", "export", "function", "WithToolbar", "(", ")", "{", "return", "(", "<", "ProTable", "className", "=", "\"bordered\"", "dataSource", "=", "{", "dataSource1", "}", "columns", "=", "{", "columns1", "}", "toolbar", "=", "{", "{", "totalCount", ":", "dataSource1", ".", "length", ",", "leftActions", ":", "[", "{", "key", ":", "'add'", ",", "component", ":", "'button'", ",", "label", ":", "'新建商品'", ",", "icon", ":", "'add'", ",", "props", ":", "{", "type", ":", "'primary'", "}", ",", "}", ",", "{", "key", ":", "'import-good'", ",", "component", ":", "'button'", ",", "label", ":", "'导入商品'", "}", ",", "]", ",", "rightActions", ":", "[", "{", "key", ":", "'print'", "}", ",", "{", "key", ":", "'export'", "}", ",", "{", "key", ":", "'refresh'", "}", "]", ",", "onActionClick", "(", "action", ")", "{", "console", ".", "log", "(", "'Toolbar click'", ",", "action", ")", ";", "}", ",", "}", "}", "/>);", "}", "WithToolbar", ".", "storyName", "=", "'集成表格工具栏'", ";", "title", "export", "function", "WithPagination", "(", ")", "{", "const", "dataSource", "=", "repeat", "(", "dataSource1", ",", "10", ")", ".", "map", "(", "(", "row", ",", "i", ")", "=>", "(", "{", "...", "row", ",", "order", ":", "i", "+", "1", ",", "}", ")", ")", ";", "const", "columns", "=", "[", "{", "lock", ":", "true", ",", "name", ":", "'序号'", ",", "width", ":", "70", ",", "align", ":", "'right'", ",", "code", ":", "'order'", "}", ",", "{", "lock", ":", "true", ",", "code", ":", "'name'", ",", "width", ":", "200", ",", "name", ":", "'公司名称'", "}", ",", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ";", "return", "(", "<", "ProTable", "primaryKey", "=", "\"order\"", "dataSource", "=", "{", "dataSource", "}", "columns", "=", "{", "columns", "}", "footer", "=", "{", "{", "onActionClick", "(", "key", ")", "{", "console", ".", "log", "(", "'ProTable footer action click:'", ",", "key", ")", ";", "}", ",", "leftActions", ":", "[", "{", "key", ":", "'remove'", ",", "label", ":", "'批量删除'", ",", "shape", ":", "'solid'", ",", "type", ":", "'normal'", "}", ",", "{", "key", ":", "'more'", ",", "label", ":", "'更多'", ",", "shape", ":", "'solid'", ",", "type", ":", "'normal'", ",", "children", ":", "[", "{", "key", ":", "'new'", ",", "label", ":", "'新建'", "}", ",", "{", "key", ":", "'move-to'", ",", "label", ":", "'移动到...'", "}", ",", "{", "key", ":", "'copy'", ",", "label", ":", "'复制到...'", "}", ",", "]", ",", "}", ",", "]", ",", "}", "}", "pagination", "=", "{", "{", "showJump", ":", "false", "}", "}", "/>);", "}", "WithPagination", ".", "storyName", "=", "'集成翻页器'", ";", "export", "function", "ColumnResize", "(", ")", "{", "const", "nameCol", "=", "{", "lock", ":", "true", ",", "code", ":", "'name'", ",", "width", ":", "200", ",", "name", ":", "'公司名称'", "}", ";", "const", "repeats", "=", "[", "{", "code", ":", "'amount'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "name", ":", "'金额'", "}", ",", "{", "code", ":", "'dept'", ",", "width", ":", "160", ",", "name", ":", "'金融机构'", "}", ",", "{", "code", ":", "'applier'", ",", "width", ":", "120", ",", "name", ":", "'申请人'", "}", ",", "]", ";", "return", "(", "<", "ProTable", "className", "=", "\"bordered\"", "style", "=", "{", "{", "width", ":", "800", ",", "height", ":", "385", ",", "overflow", ":", "'auto'", "}", "}", "useOuterBorder", "dataSource", "=", "{", "[", "...", "dataSource1", ",", "...", "dataSource1", "]", "}", "columnResize", "=", "{", "{", "handleBackground", ":", "'#ddd'", ",", "handleHoverBackground", ":", "'#aaa'", ",", "handleActiveBackground", ":", "'#89bff7'", ",", "}", "}", "columns", "=", "{", "[", "nameCol", ",", "...", "repeats", ",", "...", "repeats", ",", "...", "repeats", "]", "}", "/", ">", ")", ";", "}", "ColumnResize", ".", "storyName", "=", "'拖拽调整列宽'", ";", "title", "export", "function", "ColumnCollapse", "(", ")", "{", "const", "columns", "=", "[", "{", "lock", ":", "true", ",", "name", ":", "'商品信息'", ",", "children", ":", "[", "{", "code", ":", "'sku_code'", ",", "name", ":", "'SKU code'", "}", ",", "{", "code", ":", "'sku_name'", ",", "name", ":", "'SKU名称'", ",", "width", ":", "200", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'机构信息'", ",", "code", ":", "'institute'", ",", "features", ":", "{", "collapsible", ":", "false", "}", ",", "children", ":", "[", "{", "code", ":", "'subsidiary_name'", ",", "name", ":", "'子公司'", "}", ",", "{", "code", ":", "'shop_name'", ",", "name", ":", "'门店'", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'类目信息'", ",", "code", ":", "'category'", ",", "features", ":", "{", "collapsible", ":", "true", "}", ",", "children", ":", "[", "{", "code", ":", "'merge_cate_level1_name'", ",", "name", ":", "'一级类目'", "}", ",", "{", "code", ":", "'merge_cate_level2_name'", ",", "name", ":", "'二级类目'", "}", ",", "{", "code", ":", "'merge_cate_level3_name'", ",", "name", ":", "'三级类目'", ",", "features", ":", "{", "primaryColumn", ":", "true", "}", ",", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'APP指标'", ",", "code", ":", "'app_indicators'", ",", "features", ":", "{", "collapsible", ":", "true", "}", ",", "children", ":", "[", "{", "code", ":", "'imp_uv_dau_pct'", ",", "name", ":", "'曝光UV占DAU比例'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'app_trd_amt_1d'", ",", "name", ":", "'日店均APP成交金额'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'app_qty_pbt'", ",", "name", ":", "'APP件单价'", ",", "width", ":", "160", ",", "align", ":", "'right'", "}", ",", "{", "code", ":", "'all_app_trd_amt_1d'", ",", "name", ":", "'店均APP成交金额汇总'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'app_trd_usr_cnt_1d'", ",", "name", ":", "'APP成交用户数'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'app_trd_amt_pct'", ",", "name", ":", "'APP成交金额占比'", ",", "width", ":", "160", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'app_trd_pbt'", ",", "name", ":", "'APP客单价'", ",", "width", ":", "160", ",", "align", ":", "'right'", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'转换率'", ",", "code", ":", "'convert_rate'", ",", "features", ":", "{", "collapsible", ":", "true", "}", ",", "children", ":", "[", "{", "code", ":", "'all_imp2pay_rate'", ",", "name", ":", "'整体曝光至成交转化率'", ",", "width", ":", "170", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'search_imp2pay_rate'", ",", "name", ":", "'搜索曝光至成交转化率'", ",", "width", ":", "170", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'classis_imp2pay_rate'", ",", "name", ":", "'分类曝光至成交转化率'", ",", "width", ":", "170", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'cart_imp2pay_rate'", ",", "name", ":", "'购物车曝光至成交转化率'", ",", "width", ":", "170", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'my_page_imp2pay_rate'", ",", "name", ":", "'我的曝光至成交转化率'", ",", "width", ":", "170", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'pq_act_imp2pay_rate'", ",", "name", ":", "'活动页曝光至成交转化率'", ",", "width", ":", "170", ",", "align", ":", "'right'", ",", "}", ",", "{", "code", ":", "'other_imp2pay_rate'", ",", "name", ":", "'其他曝光至成交转化率'", ",", "width", ":", "170", ",", "align", ":", "'right'", ",", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'曝光UV'", ",", "code", ":", "'imp'", ",", "features", ":", "{", "collapsible", ":", "true", "}", ",", "children", ":", "[", "{", "code", ":", "'all_imp_uv'", ",", "name", ":", "'整体UV'", "}", ",", "{", "code", ":", "'search_imp_uv'", ",", "name", ":", "'搜索UV'", "}", ",", "{", "code", ":", "'classis_imp_uv'", ",", "name", ":", "'分类UV'", "}", ",", "{", "code", ":", "'detail_imp_uv'", ",", "name", ":", "'详情UV'", "}", ",", "{", "code", ":", "'cart_imp_uv'", ",", "name", ":", "'购物车UV'", "}", ",", "{", "code", ":", "'my_page_imp_uv'", ",", "name", ":", "'我的页面UV'", "}", ",", "{", "code", ":", "'pq_act_imp_uv'", ",", "name", ":", "'佩琦活动UV'", "}", ",", "{", "code", ":", "'other_imp_uv'", ",", "name", ":", "'其他页面UV'", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'点击UV'", ",", "code", ":", "'clk'", ",", "features", ":", "{", "collapsible", ":", "true", "}", ",", "children", ":", "[", "{", "code", ":", "'all_clk_uv'", ",", "name", ":", "'整体UV'", "}", ",", "{", "code", ":", "'search_clk_uv'", ",", "name", ":", "'搜索UV'", "}", ",", "{", "code", ":", "'classis_clk_uv'", ",", "name", ":", "'分类UV'", "}", ",", "{", "code", ":", "'detail_clk_uv'", ",", "name", ":", "'详情UV'", "}", ",", "{", "code", ":", "'cart_clk_uv'", ",", "name", ":", "'购物车UV'", "}", ",", "{", "code", ":", "'my_page_clk_uv'", ",", "name", ":", "'我的页面UV'", "}", ",", "{", "code", ":", "'pq_act_clk_uv'", ",", "name", ":", "'佩琦活动UV'", "}", ",", "{", "code", ":", "'other_clk_uv'", ",", "name", ":", "'其他页面UV'", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'ipvUV'", ",", "code", ":", "'ipv'", ",", "features", ":", "{", "collapsible", ":", "true", "}", ",", "children", ":", "[", "{", "code", ":", "'all_ipv_uv'", ",", "name", ":", "'整体UV'", "}", ",", "{", "code", ":", "'search_ipv_uv'", ",", "name", ":", "'搜索UV'", "}", ",", "{", "code", ":", "'classis_ipv_uv'", ",", "name", ":", "'分类UV'", "}", ",", "{", "code", ":", "'detail_ipv_uv'", ",", "name", ":", "'详情UV'", "}", ",", "{", "code", ":", "'cart_ipv_uv'", ",", "name", ":", "'购物车UV'", "}", ",", "{", "code", ":", "'my_page_ipv_uv'", ",", "name", ":", "'我的页面UV'", "}", ",", "{", "code", ":", "'pq_act_ipv_uv'", ",", "name", ":", "'佩琦活动UV'", "}", ",", "{", "code", ":", "'other_ipv_uv'", ",", "name", ":", "'其他页面UV'", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'加购UV'", ",", "code", ":", "'cart'", ",", "features", ":", "{", "collapsible", ":", "true", "}", ",", "children", ":", "[", "{", "code", ":", "'all_cart_uv'", ",", "name", ":", "'整体UV'", "}", ",", "{", "code", ":", "'search_cart_uv'", ",", "name", ":", "'搜索UV'", "}", ",", "{", "code", ":", "'classis_cart_uv'", ",", "name", ":", "'分类UV'", "}", ",", "{", "code", ":", "'detail_cart_uv'", ",", "name", ":", "'详情UV'", "}", ",", "{", "code", ":", "'cart_cart_uv'", ",", "name", ":", "'购物车UV'", "}", ",", "{", "code", ":", "'my_page_cart_uv'", ",", "name", ":", "'我的页面UV'", "}", ",", "{", "code", ":", "'pq_act_cart_uv'", ",", "name", ":", "'佩琦活动UV'", "}", ",", "{", "code", ":", "'other_cart_uv'", ",", "name", ":", "'其他页面UV'", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'成交UV'", ",", "code", ":", "'pay'", ",", "features", ":", "{", "collapsible", ":", "true", "}", ",", "children", ":", "[", "{", "code", ":", "'all_pay_uv'", ",", "name", ":", "'整体UV'", "}", ",", "{", "code", ":", "'search_pay_uv'", ",", "name", ":", "'搜索UV'", "}", ",", "{", "code", ":", "'classis_pay_uv'", ",", "name", ":", "'分类UV'", "}", ",", "{", "code", ":", "'detail_pay_uv'", ",", "name", ":", "'详情UV'", "}", ",", "{", "code", ":", "'cart_pay_uv'", ",", "name", ":", "'购物车UV'", "}", ",", "{", "code", ":", "'my_page_pay_uv'", ",", "name", ":", "'我的页面UV'", "}", ",", "{", "code", ":", "'pq_act_pay_uv'", ",", "name", ":", "'佩琦活动UV'", "}", ",", "{", "code", ":", "'other_pay_uv'", ",", "name", ":", "'其他页面UV'", "}", ",", "]", ",", "}", ",", "]", ";", "return", "(", "<", "ProTable", "className", "=", "\"bordered compact\"", "defaultColumnWidth", "=", "{", "140", "}", "dataSource", "=", "{", "dataSource7", "}", "columns", "=", "{", "columns", "}", "columnCollapse", "=", "{", "{", "defaultExpandedGroups", ":", "[", "'imp'", ",", "'pay'", "]", ",", "}", "}", "/>);", "}", "ColumnCollapse", ".", "storyName", "=", "'列的收拢展开'", ";", "title", "export", "function", "ColumnFilter", "(", ")", "{", "const", "columns", "=", "[", "{", "lock", ":", "true", ",", "code", ":", "'sku_code'", ",", "name", ":", "'SKU code'", ",", "features", ":", "{", "enforceVisible", ":", "true", "}", ",", "}", ",", "{", "code", ":", "'sku_name'", ",", "name", ":", "'SKU名称'", ",", "width", ":", "200", ",", "features", ":", "{", "enforceVisible", ":", "true", "}", ",", "}", ",", "{", "code", ":", "'subsidiary_name'", ",", "name", ":", "'子公司'", ",", "features", ":", "{", "defaultVisible", ":", "false", "}", ",", "}", ",", "{", "code", ":", "'shop_name'", ",", "name", ":", "'门店'", "}", ",", "{", "name", ":", "'类目信息'", ",", "code", ":", "'category'", ",", "children", ":", "[", "{", "code", ":", "'merge_cate_level1_name'", ",", "name", ":", "'一级类目'", "}", ",", "{", "code", ":", "'merge_cate_level2_name'", ",", "name", ":", "'二级类目'", "}", ",", "{", "code", ":", "'merge_cate_level3_name'", ",", "name", ":", "'三级类目'", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'曝光UV'", ",", "code", ":", "'imp'", ",", "children", ":", "[", "{", "code", ":", "'all_imp_uv'", ",", "name", ":", "'整体UV'", "}", ",", "{", "code", ":", "'search_imp_uv'", ",", "name", ":", "'搜索UV'", "}", ",", "{", "code", ":", "'classis_imp_uv'", ",", "name", ":", "'分类UV'", "}", ",", "{", "code", ":", "'detail_imp_uv'", ",", "name", ":", "'详情UV'", "}", ",", "{", "code", ":", "'cart_imp_uv'", ",", "name", ":", "'购物车UV'", "}", ",", "{", "code", ":", "'my_page_imp_uv'", ",", "name", ":", "'我的页面UV'", "}", ",", "{", "code", ":", "'pq_act_imp_uv'", ",", "name", ":", "'佩琦活动UV'", "}", ",", "{", "code", ":", "'other_imp_uv'", ",", "name", ":", "'其他页面UV'", "}", ",", "]", ",", "}", ",", "{", "name", ":", "'点击UV'", ",", "code", ":", "'clk'", ",", "children", ":", "[", "{", "code", ":", "'all_clk_uv'", ",", "name", ":", "'整体UV'", "}", ",", "{", "code", ":", "'search_clk_uv'", ",", "name", ":", "'搜索UV'", "}", ",", "{", "code", ":", "'classis_clk_uv'", ",", "name", ":", "'分类UV'", "}", ",", "{", "code", ":", "'detail_clk_uv'", ",", "name", ":", "'详情UV'", "}", ",", "{", "code", ":", "'cart_clk_uv'", ",", "name", ":", "'购物车UV'", "}", ",", "{", "code", ":", "'my_page_clk_uv'", ",", "name", ":", "'我的页面UV'", "}", ",", "{", "code", ":", "'pq_act_clk_uv'", ",", "name", ":", "'佩琦活动UV'", "}", ",", "{", "code", ":", "'other_clk_uv'", ",", "name", ":", "'其他页面UV'", "}", ",", "]", ",", "}", ",", "]", ";", "return", "(", "<", "ProTable", "className", "=", "\"bordered compact\"", "defaultColumnWidth", "=", "{", "140", "}", "dataSource", "=", "{", "dataSource7", "}", "columns", "=", "{", "columns", "}", "columnRangeHover", "toolbar", "=", "{", "{", "totalCount", ":", "dataSource7", ".", "length", "}", "}", "columnFilter", "=", "{", "{", "drawerTitle", ":", "'自定义的抽屉名称'", ",", "}", "}", "/>);", "}", "ColumnFilter", ".", "storyName", "=", "'自定义列'", ";", "title", "export", "function", "ParseColumnsFromJSX", "(", ")", "{", "const", "{", "Column", ",", "ColumnGroup", "}", "=", "ProTable", ";", "const", "dataSource", "=", "[", "{", "name", ":", "'冷冻酸奶'", ",", "category", ":", "'冷饮'", ",", "calories", ":", "159", ",", "fat", ":", "6", ",", "carbs", ":", "24", ",", "protein", ":", "4", ",", "country", ":", "'中国'", ",", "status", ":", "'新品'", ",", "}", ",", "{", "name", ":", "'冰激凌三明治'", ",", "category", ":", "'冷饮'", ",", "calories", ":", "237", ",", "fat", ":", "9", ",", "carbs", ":", "37", ",", "protein", ":", "4.3", ",", "country", ":", "'日本'", ",", "status", ":", "'新品'", ",", "}", ",", "{", "name", ":", "'条形泡芙'", ",", "category", ":", "'烘焙'", ",", "calories", ":", "262", ",", "fat", ":", "16", ",", "carbs", ":", "24", ",", "protein", ":", "6", ",", "country", ":", "'中国'", ",", "status", ":", "'促销中'", ",", "}", ",", "{", "name", ":", "'杯型蛋糕'", ",", "category", ":", "'烘焙'", ",", "calories", ":", "375", ",", "fat", ":", "3.7", ",", "carbs", ":", "67", ",", "protein", ":", "4.3", ",", "country", ":", "'日本'", ",", "status", ":", "'售罄'", ",", "}", ",", "{", "name", ":", "'姜饼'", ",", "category", ":", "'烘焙'", ",", "calories", ":", "356", ",", "fat", ":", "16", ",", "carbs", ":", "49", ",", "protein", ":", "3.9", ",", "country", ":", "'中国'", ",", "status", ":", "'售罄'", ",", "}", ",", "]", ";", "return", "(", "<", "ProTable", "primaryKey", "=", "\"name\"", "className", "=", "\"compact bordered\"", "dataSource", "=", "{", "dataSource", "}", "defaultColumnWidth", "=", "{", "120", "}", "columns", "=", "{", "ProTable", ".", "parseColumns", "(", "<", ">", "<", "Column", "lock", "name", "=", "\"名称\"", "code", "=", "\"name\"", "/", ">", "<", "Column", "name", "=", "\"卡路里\"", "code", "=", "\"calories\"", "/", ">", "<", "Column", "name", "=", "\"脂肪\"", "code", "=", "\"fat\"", "/", ">", "{", "}", "<", "Column", "name", "=", "\"碳水化合物\"", "code", "=", "\"carbs\"", "/", ">", "<", "ColumnGroup", "name", "=", "\"蛋白质\"", ">", "<", "Column", "name", "=", "\"Protein1\"", "code", "=", "\"protein\"", "/", ">", "<", "Column", "name", "=", "\"Protein2\"", "code", "=", "\"protein\"", "/", ">", "<", "Column", "name", "=", "\"Protein3\"", "code", "=", "\"protein\"", "/", ">", "<", "/ColumnGroup>", "{", "}", "<", "div", ">", "<", "Column", "name", "=", "\"column under div\"", "code", "=", "\"protein\"", "/", ">", "<", "h1", ">", "冰激凌三明治", "<", "/h1>", "<", "/div>", "{", "}", "<", "Checkbox", "/", ">", "<", "/>)}/", ">", ")", ";", "}", "ParseColumnsFromJSX", ".", "storyName", "=", "'从 JSX 中解析 columns'", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, 5, null, 3, null, null, null, 5, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 228, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1227
[ "import", "{", "Box", ",", "BoxProps", ",", "PanelProps", "}", "from", "'@rexd/core'", ";", "import", "React", "from", "'react'", ";", "export", "function", "Panel", "(", "props", ")", "{", "const", "{", "title", ",", "children", ",", "...", "rest", "}", "=", "props", ";", "return", "(", "<", "Box", "boxShadow", "=", "\"lowDown\"", "borderRadius", "=", "\"l\"", "bg", "=", "\"emphasis.0\"", "{", "...", "rest", "}", ">", "{", "title", "&&", "<", "PanelHeader", ">", "{", "title", "}", "<", "/PanelHeader>}", "<", "Box", "p", "=", "\"l\"", ">", "{", "children", "}", "<", "/Box>", "<", "/Box>);", "}", "function", "PanelHeader", "(", "props", ")", "{", "const", "{", "children", "}", "=", "props", ";", "return", "(", "<", "Box", "px", "=", "\"l\"", "pt", "=", "\"m\"", "fontSize", "=", "\"title1\"", "color", "=", "\"title\"", ">", "{", "children", "}", "<", "/Box>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, 3952, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, 1194, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1228
[ "import", "React", "from", "'react'", ";", "import", "{", "Box", ",", "PageHeader", ",", "Timeline", ",", "TimelineItem", ",", "LegacyFooterToolbar", ",", "Description", ",", "ActionListProps", "}", "from", "'@rexd/core'", ";", "import", "{", "Panel", "}", "from", "'./panel'", ";", "export", "default", "{", "title", ":", "'Template/Approve'", ",", "parameters", ":", "{", "layout", ":", "'fullscreen'", ",", "}", ",", "}", ";", "interface", "TicketItemProps", "{", "user", "?", ":", "string", ";", "time", "?", ":", "string", ";", "label", "?", ":", "string", ";", "}", "function", "TicketItem", "(", "props", ")", "{", "const", "{", "user", ",", "time", ",", "label", "}", "=", "props", ";", "return", "(", "<", "Box", "mt", "=", "\"m\"", ">", "<", "Box", ">", "{", "user", "}", "<", "/Box>", "<", "Box", ">", "{", "time", "}", "<", "/Box>", "<", "Box", ">", "{", "label", "}", "<", "/Box>", "<", "/Box>);", "}", "export", "function", "ApproveTicket", "(", ")", "{", "const", "actions", "=", "[", "{", "key", ":", "'approve'", ",", "label", ":", "'通过'", ",", "shape", ":", "'solid'", ",", "type", ":", "'primary'", "}", ",", "{", "key", ":", "'reject'", ",", "label", ":", "'驳回'", ",", "shape", ":", "'solid'", ",", "type", ":", "'secondary'", "}", ",", "{", "key", ":", "'add'", ",", "label", ":", "'加签'", ",", "shape", ":", "'solid'", ",", "type", ":", "'secondary'", "}", ",", "{", "key", ":", "'transfer'", ",", "label", ":", "'转单'", ",", "shape", ":", "'solid'", ",", "type", ":", "'secondary'", "}", ",", "{", "key", ":", "'withdraw'", ",", "label", ":", "'撤回'", ",", "shape", ":", "'warning'", ",", "type", ":", "'normal'", ",", "confirm", ":", "true", "}", ",", "]", ";", "const", "detailItems", "=", "[", "{", "label", ":", "'发起时间'", ",", "content", ":", "'2021-03-15 15:12:34'", ",", "}", ",", "{", "label", ":", "'任务单号'", ",", "content", ":", "'45654645123213123'", ",", "}", ",", "]", ";", "const", "descriptionItems", "=", "[", "{", "label", ":", "'退款单号'", ",", "content", ":", "'2342345231515'", ",", "}", ",", "{", "label", ":", "'采退类型'", ",", "content", ":", "'45654645'", ",", "}", ",", "{", "label", ":", "'退款金额'", ",", "content", ":", "'¥18.00'", ",", "}", ",", "{", "label", ":", "'退款原因'", ",", "content", ":", "'无理由退货'", ",", "}", ",", "{", "label", ":", "'交易金额'", ",", "content", ":", "'¥28.00'", ",", "}", ",", "{", "label", ":", "'退款说明'", ",", "content", ":", "'备注备注'", ",", "}", ",", "{", "label", ":", "'收货地址'", ",", "content", ":", "'浙江省 杭州市 余杭区 文一西路 969 号一号楼邮局'", ",", "}", ",", "]", ";", "return", "(", "<", "Box", ">", "<", "PageHeader", "title", "=", "\"景庄发起的阿里巴巴经济体开源管理流程\"", "description", "=", "\"发起人:景庄(阿里集团-盒马事业群-产品技术部-服务体验技术)\"", ">", "<", "Description", "items", "=", "{", "detailItems", "}", "/>", "<", "/PageHeader>", "<", "Box", "p", "=", "\"xl\"", ">", "<", "Panel", "title", "=", "\"表单详情\"", ">", "<", "Description", "items", "=", "{", "descriptionItems", "}", "/>", "<", "/Panel>", "<", "Panel", "title", "=", "\"审批进度\"", "mt", "=", "\"l\"", ">", "<", "Timeline", ">", "<", "TimelineItem", "title", "=", "\"已提交\"", "label", "=", "\"耗时2小时12分\"", "status", "=", "\"success\"", ">", "<", "TicketItem", "user", "=", "\"张三\"", "time", "=", "\"2021-03-16 17:36:40\"", "label", "=", "\"同意\"", "/", ">", "<", "/TimelineItem>", "<", "TimelineItem", "title", "=", "\"审批节点1\"", "label", "=", "\"耗时1小时11分\"", "status", "=", "\"success\"", ">", "<", "TicketItem", "user", "=", "\"李四\"", "time", "=", "\"2021-03-18 17:36:40\"", "label", "=", "\"原则上同意\"", "/", ">", "<", "/TimelineItem>", "<", "TimelineItem", "title", "=", "\"审批节点2\"", "label", "=", "\"耗时5分钟\"", "status", "=", "\"success\"", ">", "<", "TicketItem", "user", "=", "\"王五\"", "time", "=", "\"2021-03-19 17:36:40\"", "label", "=", "\"已通过法务和专利部门审核\"", "/", ">", "<", "/TimelineItem>", "<", "TimelineItem", "title", "=", "\"审批节点3\"", "label", "=", "\"耗时1天2小时10分\"", "status", "=", "\"process\"", ">", "<", "TicketItem", "user", "=", "\"赵六\"", "time", "=", "\"2021-03-20 17:36:40\"", "/", ">", "<", "/TimelineItem>", "<", "TimelineItem", "title", "=", "\"审批节点4\"", ">", "<", "TicketItem", "user", "=", "\"Victor\"", "/", ">", "<", "/TimelineItem>", "<", "/Timeline>", "<", "/Panel>", "<", "/Box>", "<", "Box", "position", "=", "\"sticky\"", "bottom", "=", "\"0\"", "zIndex", "=", "{", "1", "}", ">", "<", "LegacyFooterToolbar", "actions", "=", "{", "actions", "}", "/>", "<", "/Box>", "<", "/Box>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1229
[ "export", "const", "listData", "=", "[", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'640000198511092169'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'440000197606168523'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'140000201712224849'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'820000200107152549'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'460000198910259436'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'130000197403225812'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'650000200911142702'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'630000199307120815'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'710000200303052611'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'110000197212203609'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'610000200308267415'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'630000201603084142'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'230000197412218968'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'46000020040422488X'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'810000198309246744'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'350000200203132385'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'440000197303192892'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'420000198602113665'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'140000198204014840'", ",", "}", ",", "{", "warehouseCode", ":", "'88'", ",", "warehouseName", ":", "'上海B2C仓'", ",", "skuCode", ":", "'270400100102'", ",", "skuName", ":", "'金龙鱼多用途麦芯粉 1kg/袋'", ",", "deptCode", ":", "'028'", ",", "deptName", ":", "'良品部'", ",", "inventoryType", ":", "'在库'", ",", "logicInventoryType", ":", "'可销售(好货)'", ",", "bizType", ":", "'销售出库占用释放'", ",", "secondBizType", ":", "'占用释放'", ",", "thirdBizType", ":", "null", ",", "operateTime", ":", "'2018-10-16 23:47:53.0'", ",", "initFrozenQuantity", ":", "1", ",", "initTotalQuantity", ":", "4", ",", "initAvailableQuantity", ":", "3", ",", "changeQuantity", ":", "1", ",", "afterFrozenQuantity", ":", "0", ",", "afterTotalQuantity", ":", "4", ",", "afterAvailableQuantity", ":", "4", ",", "inventoryUnit", ":", "'袋'", ",", "orderType", ":", "'正向履约单'", ",", "mainOrderId", ":", "'119807986118101647'", ",", "detailOrderId", ":", "'214244267218101647'", ",", "subDetailOrderId", ":", "'214244267218101647'", ",", "id", ":", "'370000199011200660'", ",", "}", ",", "]", ";" ]
[ null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1230
[ "import", "React", ",", "{", "useState", ",", "useRef", "}", "from", "'react'", ";", "import", "{", "PageHeader", ",", "Box", ",", "BaseTable", ",", "ActionList", ",", "LegacyToolbar", ",", "Search", ",", "SearchFormLayout", ",", "FormControl", ",", "Input", ",", "}", "from", "'@rexd/core'", ";", "import", "{", "listData", "}", "from", "'./dataset'", ";", "import", "{", "Panel", "}", "from", "'./panel'", ";", "export", "default", "{", "title", ":", "'Template/List'", ",", "parameters", ":", "{", "layout", ":", "'fullscreen'", ",", "}", ",", "}", ";", "export", "function", "SearchList", "(", ")", "{", "const", "[", "loading", ",", "setLoading", "]", "=", "useState", "(", "false", ")", ";", "const", "timeout", "=", "useRef", "<", "any", ">", "(", ")", ";", "const", "columns", "=", "[", "{", "code", ":", "'warehouseName'", ",", "name", ":", "'仓名称'", ",", "width", ":", "100", "}", ",", "{", "code", ":", "'deptName'", ",", "name", ":", "'部门'", ",", "width", ":", "100", "}", ",", "{", "code", ":", "'skuCode'", ",", "name", ":", "'商品编码'", ",", "width", ":", "90", "}", ",", "{", "code", ":", "'skuName'", ",", "name", ":", "'商品名称'", ",", "width", ":", "140", "}", ",", "{", "code", ":", "'inventoryType'", ",", "name", ":", "'库存类型'", ",", "width", ":", "80", "}", ",", "{", "name", ":", "'业务发生前'", ",", "children", ":", "[", "{", "code", ":", "'initTotalQuantity'", ",", "name", ":", "'总量'", ",", "width", ":", "80", "}", ",", "{", "code", ":", "'initAvailableQuantity'", ",", "name", ":", "'可用量'", ",", "width", ":", "80", "}", ",", "{", "code", ":", "'initFrozenQuantity'", ",", "name", ":", "'占用量'", ",", "width", ":", "80", "}", ",", "]", ",", "}", ",", "{", "code", ":", "'inventoryUnit'", ",", "name", ":", "'库存单位'", ",", "width", ":", "90", "}", ",", "{", "code", ":", "'mainOrderId'", ",", "name", ":", "'业务单据号1'", ",", "width", ":", "120", "}", ",", "{", "code", ":", "'detailOrderId'", ",", "name", ":", "'业务单据号2'", ",", "width", ":", "120", "}", ",", "{", "code", ":", "'subDetailOrderId'", ",", "name", ":", "'业务单据号3'", ",", "width", ":", "120", "}", ",", "{", "name", ":", "'操作'", ",", "width", ":", "128", ",", "render", ":", "(", ")", "=>", "(", "<", "ActionList", "actions", "=", "{", "[", "{", "key", ":", "'view'", ",", "label", ":", "'查看'", "}", ",", "{", "key", ":", "'remove'", ",", "label", ":", "'删除'", ",", "confirm", ":", "true", "}", ",", "{", "key", ":", "'more'", ",", "label", ":", "'更多'", ",", "children", ":", "[", "{", "key", ":", "'copy'", ",", "label", ":", "'复制'", "}", ",", "{", "key", ":", "'edit'", ",", "label", ":", "'编辑'", "}", ",", "]", ",", "}", ",", "]", "}", "/", ">", ")", ",", "lock", ":", "true", ",", "}", ",", "]", ";", "const", "onSearch", "=", "(", ")", "=>", "{", "setLoading", "(", "true", ")", ";", "if", "(", "timeout", ".", "current", ")", "{", "clearTimeout", "(", "timeout", ".", "current", ")", ";", "}", "timeout", ".", "current", "=", "setTimeout", "(", "(", ")", "=>", "{", "setLoading", "(", "false", ")", ";", "}", ",", "2000", ")", ";", "}", ";", "const", "actions", "=", "[", "{", "key", ":", "'search'", ",", "render", ":", "(", ")", "=>", "<", "Search", "shape", "=", "\"simple\"", "/> },", "{", "key", ":", "'print'", ",", "label", ":", "'打印'", "}", ",", "{", "key", ":", "'export'", ",", "label", ":", "'导出'", "}", ",", "{", "key", ":", "'sort'", ",", "label", ":", "'排序'", "}", ",", "{", "key", ":", "'reset'", ",", "label", ":", "'重置'", "}", ",", "{", "key", ":", "'refresh'", ",", "label", ":", "'刷新'", "}", ",", "]", ";", "return", "(", "<", "Box", ">", "<", "PageHeader", "title", "=", "\"B2C库存信息检索\"", "/", ">", "<", "Box", "p", "=", "\"xl\"", ">", "<", "Panel", "p", "=", "{", "0", "}", ">", "<", "SearchFormLayout", "onSubmit", "=", "{", "onSearch", "}", "isCollapsible", ">", "<", "FormControl", "label", "=", "\"订单号\"", "required", "labelTips", "=", "\"请输入 16 位订单编码\"", ">", "<", "Input", "placeholder", "=", "\"请输入\"", "/", ">", "<", "/FormControl>", "<", "FormControl", "label", "=", "\"仓库\"", "required", ">", "<", "Input", "placeholder", "=", "\"请输入\"", "/", ">", "<", "/FormControl>", "<", "FormControl", "label", "=", "\"商家\"", "required", ">", "<", "Input", "placeholder", "=", "\"请输入\"", "/", ">", "<", "/FormControl>", "<", "FormControl", "label", "=", "\"门店\"", "required", ">", "<", "Input", "placeholder", "=", "\"请输入\"", "/", ">", "<", "/FormControl>", "<", "FormControl", "label", "=", "\"创建人\"", "required", ">", "<", "Input", "placeholder", "=", "\"请输入\"", "/", ">", "<", "/FormControl>", "<", "FormControl", "label", "=", "\"更新人\"", "required", ">", "<", "Input", "placeholder", "=", "\"请选择\"", "/", ">", "<", "/FormControl>", "<", "/SearchFormLayout>", "<", "/Panel>", "<", "Panel", "mt", "=", "\"l\"", ">", "<", "LegacyToolbar", "actions", "=", "{", "actions", "}", "mb", "=", "\"m\"", "/", ">", "<", "BaseTable", "isLoading", "=", "{", "loading", "}", "defaultColumnWidth", "=", "{", "80", "}", "dataSource", "=", "{", "listData", "}", "columns", "=", "{", "columns", "}", "/", ">", "<", "/Panel>", "<", "/Box>", "<", "/Box>);", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 35, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1231
[ "import", "React", "from", "'react'", ";", "import", "{", "Flex", ",", "Box", ",", "Text", "}", "from", "'@rexd/core'", ";", "export", "default", "{", "title", ":", "'Typography/Text'", "}", ";", "export", "const", "Simple", "=", "(", ")", "=>", "(", "<", "Flex", "spacing", "=", "\"l\"", "direction", "=", "\"column\"", ">", "<", "Text", "fontSize", "=", "\"note\"", ">", "(", "note", ")", "In", "love", "with", "Hippo", "<", "/Text>", "<", "Text", "fontSize", "=", "\"body\"", "color", "=", "\"#FF0000\"", ">", "(", "body", ")", "In", "love", "with", "Hippo", "<", "/Text>", "<", "Text", "fontSize", "=", "\"subtitle\"", ">", "(", "subtitle", ")", "In", "love", "with", "Hippo", "<", "/Text>", "<", "Text", "fontSize", "=", "\"title\"", ">", "(", "title", ")", "In", "love", "with", "Hippo", "<", "/Text>", "<", "Text", "fontSize", "=", "\"subheader\"", ">", "(", "subheader", ")", "In", "love", "with", "Hippo", "<", "/Text>", "<", "Text", "fontSize", "=", "\"header\"", ">", "(", "header", ")", "In", "love", "with", "Hippo", "<", "/Text>", "<", "/Flex>);", "export", "const", "Truncate", "=", "(", ")", "=>", "(", "<", "Box", "width", "=", "\"600px\"", "border", "=", "\"solid\"", "borderColor", "=", "\"line.primary\"", ">", "<", "Text", "truncated", ">", "Lorem", "ipsum", "is", "placeholder", "text", "commonly", "used", "in", "the", "graphic", ",", "print", ",", "and", "publishing", "industries", "for", "previewing", "layouts", "and", "visual", "mockups", ".", "<", "/Text>", "<", "/Box>);", "export", "const", "LineClamp", "=", "(", ")", "=>", "(", "<", "Box", "width", "=", "\"300px\"", "p", "=", "\"l\"", "border", "=", "\"solid\"", "borderColor", "=", "\"line.primary\"", ">", "<", "Text", "lineClamp", "=", "{", "2", "}", ">", "\"The quick brown fox jumps over the lazy dog\"", "is", "an", "English", "-", "language", "pangram", "—", "a", "sentence", "that", "contains", "all", "of", "the", "letters", "of", "the", "English", "alphabet", ".", "Owing", "to", "its", "existence", ",", "Chakra", "was", "created", ".", "<", "/Text>", "<", "/Box>);", "export", "const", "As", "=", "(", ")", "=>", "(", "<", "Box", ">", "<", "Text", "as", "=", "\"i\"", ">", "Italic", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"u\"", ">", "Underline", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"abbr\"", ">", "I18N", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"cite\"", ">", "Citation", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"del\"", ">", "Deleted", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"em\"", ">", "Emphasis", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"ins\"", ">", "Inserted", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"kbd\"", ">", "Ctrl", "+", "C", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"mark\"", ">", "Highlighted", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"s\"", ">", "Strikethrough", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"samp\"", ">", "Sample", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"sub\"", ">", "sub", "<", "/Text>", "<", "br", "/", ">", "<", "Text", "as", "=", "\"sup\"", ">", "sup", "<", "/Text>", "<", "/Box>);" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1232
[ "import", "{", "css", "}", "from", "'linaria'", ";", "export", "interface", "LinkifyPluginTheme", "{", "link", ":", "string", ";", "}", "export", "const", "defaultTheme", "=", "{", "link", ":", "css", "`\n &,\n &:visited {\n color: #5e93c5;\n text-decoration: none;\n }\n\n &:hover,\n &:focus {\n color: #7eadda;\n outline: 0; /* reset for :focus */\n cursor: pointer;\n }\n\n &:active {\n color: #4a7bab;\n }\n `", ",", "}", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null ]
1233
[ "import", "linkifyIt", ",", "{", "LinkifyIt", "}", "from", "'linkify-it'", ";", "import", "tlds", "from", "'tlds'", ";", "export", "interface", "ExtractLinks", "{", "(", "text", ")", ":", "Array", "<", "{", "index", ":", "number", ";", "lastIndex", ":", "number", ";", "url", ":", "string", ";", "}", ">", "|", "null", ";", "}", "const", "linkify", "=", "linkifyIt", "(", ")", ".", "tlds", "(", "tlds", ")", ";", "export", "function", "extractLinks", "(", "text", ")", "{", "return", "linkify", ".", "match", "(", "text", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 2, null, null, null, null, null, null, null, null, null, null, null ]
1234
[ "import", "React", ",", "{", "ComponentType", ",", "ReactElement", ",", "ReactNode", "}", "from", "'react'", ";", "import", "clsx", "from", "'clsx'", ";", "import", "{", "LinkifyPluginTheme", "}", "from", "'../theme'", ";", "import", "{", "ExtractLinks", ",", "extractLinks", "}", "from", "'../utils/extractLinks'", ";", "export", "interface", "ComponentProps", "{", "children", ":", "ReactNode", ";", "href", ":", "string", ";", "target", ":", "string", ";", "rel", ":", "string", ";", "className", ":", "string", ";", "}", "export", "interface", "LinkProps", "{", "decoratedText", "?", ":", "string", ";", "theme", "?", ":", "LinkifyPluginTheme", ";", "component", "?", ":", "ComponentType", "<", "ComponentProps", ">", ";", "children", ":", "ReactNode", ";", "target", "?", ":", "string", ";", "rel", "?", ":", "string", ";", "className", "?", ":", "string", ";", "customExtractLinks", "?", ":", "ExtractLinks", ";", "entityKey", "?", ":", "unknown", ";", "getEditorState", "?", ":", "unknown", ";", "offsetKey", "?", ":", "unknown", ";", "setEditorState", "?", ":", "unknown", ";", "contentState", "?", ":", "unknown", ";", "blockKey", "?", ":", "unknown", ";", "dir", "?", ":", "unknown", ";", "start", "?", ":", "unknown", ";", "end", "?", ":", "unknown", ";", "}", "export", "default", "function", "Link", "(", "props", ")", "{", "const", "{", "decoratedText", "=", "''", ",", "theme", "=", "{", "}", "as", "LinkifyPluginTheme", ",", "customExtractLinks", "=", "(", "text", ")", "=>", "extractLinks", "(", "text", ")", ",", "target", "=", "'_self'", ",", "rel", "=", "'noreferrer noopener'", ",", "className", ",", "component", ",", "dir", ",", "entityKey", ",", "getEditorState", ",", "offsetKey", ",", "setEditorState", ",", "contentState", ",", "blockKey", ",", "start", ",", "end", ",", "...", "otherProps", "}", "=", "props", ";", "const", "combinedClassName", "=", "clsx", "(", "theme", "?.", "link", ",", "className", ")", ";", "const", "links", "=", "customExtractLinks", "(", "decoratedText", ")", ";", "const", "href", "=", "links", "&&", "links", "[", "0", "]", "?", "links", "[", "0", "]", ".", "url", ":", "''", ";", "const", "linkProps", "=", "{", "...", "otherProps", ",", "href", ",", "target", ",", "rel", ",", "className", ":", "combinedClassName", ",", "}", ";", "return", "component", "?", "(", "React", ".", "createElement", "(", "component", ",", "linkProps", ")", ")", ":", "(", "<", "a", "{", "...", "linkProps", "}", "/", ">", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 108, null, 3477, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1235
[ "import", "{", "ContentBlock", "}", "from", "'draft-js'", ";", "import", "{", "ExtractLinks", "}", "from", "'./utils/extractLinks'", ";", "const", "linkStrategy", "=", "(", "contentBlock", ",", "callback", ",", "customExtractLinks", ")", ":", "void", "=>", "{", "const", "links", "=", "customExtractLinks", "(", "contentBlock", ".", "getText", "(", ")", ")", ";", "if", "(", "links", ")", "{", "for", "(", "const", "link", "of", "links", ")", "{", "callback", "(", "link", ".", "index", ",", "link", ".", "lastIndex", ")", ";", "}", "}", "}", ";", "export", "default", "linkStrategy", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, 1341, null, 4, null, 0, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1236
[ "import", "React", ",", "{", "ComponentType", ",", "ReactElement", "}", "from", "'react'", ";", "import", "{", "EditorPlugin", "}", "from", "'@draft-js-plugins/editor'", ";", "import", "Link", ",", "{", "LinkProps", ",", "ComponentProps", "}", "from", "'./Link/Link'", ";", "import", "linkStrategy", "from", "'./linkStrategy'", ";", "import", "{", "defaultTheme", ",", "LinkifyPluginTheme", "}", "from", "'./theme'", ";", "import", "{", "ExtractLinks", ",", "extractLinks", "}", "from", "'./utils/extractLinks'", ";", "export", "{", "extractLinks", "}", "from", "'./utils/extractLinks'", ";", "export", "interface", "LinkifyPluginConfig", "{", "component", "?", ":", "ComponentType", "<", "ComponentProps", ">", ";", "theme", "?", ":", "LinkifyPluginTheme", ";", "target", "?", ":", "string", ";", "rel", "?", ":", "string", ";", "param", "{", "string", "}", "text", "customExtractLinks", "?", ":", "ExtractLinks", ";", "}", "export", "default", "(", "config", "=", "{", "}", ")", ":", "EditorPlugin", "=>", "{", "const", "{", "component", ",", "theme", "=", "defaultTheme", ",", "target", "=", "'_self'", ",", "rel", "=", "'noreferrer noopener'", ",", "customExtractLinks", "=", "extractLinks", ",", "}", "=", "config", ";", "const", "DecoratedLink", "=", "(", "props", ")", ":", "ReactElement", "=>", "(", "<", "Link", "{", "...", "props", "}", "theme", "=", "{", "theme", "}", "target", "=", "{", "target", "}", "rel", "=", "{", "rel", "}", "component", "=", "{", "component", "}", "customExtractLinks", "=", "{", "customExtractLinks", "}", "/", ">", ")", ";", "return", "{", "decorators", ":", "[", "{", "strategy", ":", "(", "contentBlock", ",", "callback", ")", "=>", "linkStrategy", "(", "contentBlock", ",", "callback", ",", "customExtractLinks", ")", ",", "component", ":", "DecoratedLink", ",", "}", ",", "]", ",", "}", ";", "}", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 108, null, null, 3477, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1237
[ "import", "React", "from", "'react'", ";", "import", "{", "render", "}", "from", "'@testing-library/react'", ";", "import", "LinkifyIt", "from", "'linkify-it'", ";", "import", "Link", "from", "'../Link'", ";", "describe", "(", "'Link'", ",", "(", ")", "=>", "{", "it", "(", "'applies the className based on the theme property `link` and property'", ",", "(", ")", "=>", "{", "const", "theme", "=", "{", "link", ":", "'custom-class-name'", "}", ";", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "theme", "=", "{", "theme", "}", "className", "=", "\"link\"", ">", "Link", "<", "/Link>);", "const", "link", "=", "getByRole", "(", "'link'", ")", ";", "expect", "(", "link", ")", ".", "toHaveClass", "(", "'custom-class-name'", ")", ";", "expect", "(", "link", ")", ".", "toHaveClass", "(", "'link'", ")", ";", "expect", "(", "link", ")", ".", "toHaveAttribute", "(", "'target'", ",", "'_self'", ")", ";", "}", ")", ";", "it", "(", "'applies any custom passed prop'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "data", "-", "custom", "=", "\"unicorn\"", ">", "Link", "<", "/Link>);", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveAttribute", "(", "'data-custom'", ",", "'unicorn'", ")", ";", "}", ")", ";", "it", "(", "'renders the passed in children'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", ">", "https", ":", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveTextContent", "(", "'https://www.draft-js-plugins.com/'", ")", ";", "}", ")", ";", "it", "(", "'uses the decoratedText prop as href'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "decoratedText", "=", "\"https://www.draft-js-plugins.com/\"", ">", "Link", "<", "/Link>);", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveAttribute", "(", "'href'", ",", "'https://www.draft-js-plugins.com/'", ")", ";", "}", ")", ";", "it", "(", "'applies http prefix when none is supplied'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "decoratedText", "=", "\"draft-js-plugins.com/\"", ">", "Link", "<", "/Link>);", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveAttribute", "(", "'href'", ",", "'http://draft-js-plugins.com/'", ")", ";", "}", ")", ";", "it", "(", "'does not apply a prefix when one is already supplied'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "decoratedText", "=", "\"ftp://draft-js-plugins.com/\"", ">", "Link", "<", "/Link>);", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveAttribute", "(", "'href'", ",", "'ftp://draft-js-plugins.com/'", ")", ";", "}", ")", ";", "it", "(", "'generates correct href to localhost with port'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "decoratedText", "=", "\"http://localhost:8000\"", ">", "Link", "<", "/Link>);", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveAttribute", "(", "'href'", ",", "'http://localhost:8000'", ")", ";", "}", ")", ";", "it", "(", "'generates mailto href when supplied with email'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "decoratedText", "=", "\"[email protected]\"", ">", "Link", "<", "/Link>);", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveAttribute", "(", "'href'", ",", "'mailto:[email protected]'", ")", ";", "}", ")", ";", "it", "(", "'generates the correct href when using a custom exreactLinks funcation'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "decoratedText", "=", "\"[email protected]\"", "customExtractLinks", "=", "{", "(", ")", "=>", "LinkifyIt", "(", ")", ".", "set", "(", "{", "fuzzyEmail", ":", "false", "}", ")", ".", "match", "(", "'[email protected]'", ")", "}", ">", "Link", "<", "/Link>);", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveAttribute", "(", "'href'", ",", "''", ")", ";", "}", ")", ";", "it", "(", "'applies custom target value'", ",", "(", ")", "=>", "{", "const", "{", "getByRole", "}", "=", "render", "(", "<", "Link", "target", "=", "\"_blank\"", ">", "Link", "<", "/Link>);", "expect", "(", "getByRole", "(", "'link'", ")", ")", ".", "toHaveAttribute", "(", "'target'", ",", "'_blank'", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 15, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1238
[ "import", "{", "extractLinks", "}", "from", "'../extractLinks'", ";", "test", ".", "each", "(", "[", "[", "'test empty string'", ",", "''", ",", "null", "]", ",", "[", "'text without link'", ",", "'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor, elit eu auctor dapibus, nisi massa ultricies turpis, vitae egestas'", ",", "null", ",", "]", ",", "[", "'text with link'", ",", "'Lorem ipsum dolor sit amet, www.google.de consectetur adipiscing elit. Vivamus tempor, elit eu auctor dapibus, nisi massa ultricies turpis, vitae egestas'", ",", "[", "{", "index", ":", "28", ",", "lastIndex", ":", "41", ",", "raw", ":", "'www.google.de'", "}", "]", ",", "]", ",", "]", ")", "(", "'%s'", ",", "(", "_description", ",", "text", ",", "result", ")", "=>", "{", "const", "match", "=", "extractLinks", "(", "text", ")", ";", "expect", "(", "match", "?", "match", ".", "map", "(", "(", "{", "index", ",", "lastIndex", ",", "raw", "}", ")", "=>", "(", "{", "index", ",", "lastIndex", ",", "raw", "}", ")", ")", ":", "match", ")", ".", "toEqual", "(", "result", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, 5, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1239
[ "export", "const", "FEATURES", "=", "{", "DEVICEINFO", ":", "process", ".", "env", ".", "DEVICEINFO", "===", "\"false\"", "?", "false", ":", "true", ",", "TERMINAL", ":", "process", ".", "env", ".", "TERMINAL", "===", "\"false\"", "?", "false", ":", "true", ",", "APK", ":", "process", ".", "env", ".", "APK", "===", "\"false\"", "?", "false", ":", "true", ",", "FORWARD", ":", "process", ".", "env", ".", "FORWARD", "===", "\"false\"", "?", "false", ":", "true", ",", "SMS", ":", "process", ".", "env", ".", "SMS", "===", "\"false\"", "?", "false", ":", "true", ",", "REBOOT", ":", "process", ".", "env", ".", "REBOOT", "===", "\"false\"", "?", "false", ":", "true", ",", "}", ";" ]
[ null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1240
[ "import", "express", "from", "'express'", ";", "import", "fileUpload", "from", "'express-fileupload'", ";", "import", "util", "from", "'util'", ";", "import", "Logger", "from", "'../../loaders/logger'", ";", "import", "{", "FEATURES", "}", "from", "'../../config'", ";", "import", "{", "IFeatures", ",", "IDeviceInfo", "}", "from", "'../../types'", ";", "const", "exec", "=", "util", ".", "promisify", "(", "require", "(", "'child_process'", ")", ".", "exec", ")", ";", "const", "api", "=", "express", ".", "Router", "(", ")", ";", "const", "DEFAULT_ERROR_MESSAGE", "=", "\"Error while processing request\"", ";", "const", "defaultMiddlewares", "=", "[", "express", ".", "json", "(", ")", ",", "express", ".", "urlencoded", "(", "{", "extended", ":", "true", "}", ")", "]", ";", "const", "fileUploadMiddlewares", "=", "[", "fileUpload", "(", ")", "]", ";", "const", "featureAvailableMiddleware", "=", "(", "featureName", ")", "=>", "{", "return", "(", "req", ",", "res", ",", "next", ")", "=>", "{", "if", "(", "!", "FEATURES", "[", "featureName", "]", ")", "{", "res", ".", "status", "(", "400", ")", ".", "send", "(", "DEFAULT_ERROR_MESSAGE", ")", ";", "}", "else", "{", "next", "(", ")", ";", "}", "}", ";", "}", ";", "const", "deviceTypeMiddleware", "=", "(", "allowedType", ")", "=>", "{", "return", "(", "req", ",", "res", ",", "next", ")", "=>", "{", "const", "deviceType", "=", "process", ".", "env", ".", "REAL_DEVICE", "!==", "undefined", "?", "\"REAL_DEVICE\"", ":", "\"EMULATOR\"", ";", "if", "(", "deviceType", "!==", "allowedType", ")", "{", "res", ".", "status", "(", "400", ")", ".", "send", "(", "DEFAULT_ERROR_MESSAGE", ")", ";", "}", "else", "{", "next", "(", ")", ";", "}", "}", ";", "}", ";", "const", "getAdbOption", "=", "(", ")", ":", "string", "=>", "{", "const", "type", "=", "process", ".", "env", ".", "REAL_DEVICE", "!==", "undefined", "?", "\"Real Device\"", ":", "\"Emulator\"", ";", "if", "(", "type", "===", "\"Emulator\"", ")", "{", "return", "\"-e\"", ";", "}", "else", "if", "(", "type", "===", "\"Real Device\"", "&&", "process", ".", "env", ".", "REAL_DEVICE_SERIAL", ")", "{", "return", "`-s ${", "process", ".", "env", ".", "REAL_DEVICE_SERIAL", "}`", ";", "}", "else", "{", "return", "\"-d\"", ";", "}", "}", ";", "export", "default", "(", "app", ")", "=>", "{", "app", ".", "use", "(", "'/api'", ",", "api", ")", ";", "/**\n * Endpoint for getting info about the available features\n */", "api", ".", "get", "(", "'/features'", ",", "defaultMiddlewares", ",", "(", "req", ",", "res", ")", "=>", "{", "Logger", ".", "info", "(", "\"Received request on /api/features\"", ")", ";", "const", "availableFeatures", "=", "{", "DEVICEINFO", ":", "FEATURES", ".", "DEVICEINFO", ",", "TERMINAL", ":", "FEATURES", ".", "TERMINAL", ",", "APK", ":", "FEATURES", ".", "APK", ",", "SMS", ":", "process", ".", "env", ".", "REAL_DEVICE", "!==", "undefined", "?", "false", ":", "FEATURES", ".", "SMS", ",", "FORWARD", ":", "process", ".", "env", ".", "REAL_DEVICE", "!==", "undefined", "?", "false", ":", "FEATURES", ".", "FORWARD", ",", "REBOOT", ":", "process", ".", "env", ".", "REAL_DEVICE", "!==", "undefined", "?", "false", ":", "FEATURES", ".", "REBOOT", ",", "}", ";", "res", ".", "send", "(", "availableFeatures", ")", ";", "}", ")", ";", "/**\n * Endpoint for getting device info\n */", "api", ".", "get", "(", "'/device'", ",", "defaultMiddlewares", ",", "async", "(", "req", ",", "res", ")", "=>", "{", "Logger", ".", "info", "(", "\"Received request on /api/device\"", ")", ";", "try", "{", "const", "type", "=", "process", ".", "env", ".", "REAL_DEVICE", "!==", "undefined", "?", "\"Real Device\"", ":", "\"Emulator\"", ";", "const", "adbOption", "=", "getAdbOption", "(", ")", ";", "const", "androidVersion", "=", "await", "exec", "(", "`adb ${", "adbOption", "} shell getprop ro.build.version.release`", ")", ";", "const", "processor", "=", "await", "exec", "(", "`adb ${", "adbOption", "} shell getprop ro.product.cpu.abi`", ")", ";", "const", "device", "=", "await", "exec", "(", "`adb ${", "adbOption", "} shell getprop ro.product.model`", ")", ";", "const", "deviceInfo", "=", "{", "type", ":", "FEATURES", ".", "DEVICEINFO", "?", "type", ":", "\"NA\"", ",", "androidVersion", ":", "FEATURES", ".", "DEVICEINFO", "?", "androidVersion", "[", "\"stdout\"", "]", ".", "replace", "(", "\"\\r\\n\"", ",", "\"\"", ")", ":", "\"NA\"", ",", "processor", ":", "FEATURES", ".", "DEVICEINFO", "?", "processor", "[", "\"stdout\"", "]", ".", "replace", "(", "\"\\r\\n\"", ",", "\"\"", ")", ":", "\"NA\"", ",", "device", ":", "FEATURES", ".", "DEVICEINFO", "?", "device", "[", "\"stdout\"", "]", ".", "replace", "(", "\"\\r\\n\"", ",", "\"\"", ")", ":", "\"NA\"", ",", "}", ";", "res", ".", "send", "(", "deviceInfo", ")", ";", "}", "catch", "(", "err", ")", "{", "Logger", ".", "error", "(", "'Error in GET /api/device'", ")", ";", "Logger", ".", "error", "(", "err", ")", ";", "res", ".", "status", "(", "400", ")", ".", "send", "(", "DEFAULT_ERROR_MESSAGE", ")", ";", "}", "}", ")", ";", "/**\n * Endpoint for rebooting the device\n */", "api", ".", "get", "(", "'/reboot'", ",", "deviceTypeMiddleware", "(", "'EMULATOR'", ")", ",", "featureAvailableMiddleware", "(", "'REBOOT'", ")", ",", "defaultMiddlewares", ",", "async", "(", "req", ",", "res", ")", "=>", "{", "Logger", ".", "info", "(", "\"Received request on /api/reboot\"", ")", ";", "try", "{", "const", "adbOption", "=", "getAdbOption", "(", ")", ";", "await", "exec", "(", "`adb ${", "adbOption", "} reboot`", ")", ";", "const", "defaultRes", "=", "{", "'action'", ":", "\"reboot\"", ",", "'status'", ":", "\"OK\"", "}", ";", "res", ".", "send", "(", "defaultRes", ")", ";", "}", "catch", "(", "err", ")", "{", "Logger", ".", "error", "(", "'Error in GET /api/reboot'", ")", ";", "Logger", ".", "error", "(", "err", ")", ";", "res", ".", "status", "(", "400", ")", ".", "send", "(", "DEFAULT_ERROR_MESSAGE", ")", ";", "}", "}", ")", ";", "/**\n * Endpoint for sending SMS\n */", "api", ".", "post", "(", "'/sms'", ",", "deviceTypeMiddleware", "(", "'EMULATOR'", ")", ",", "featureAvailableMiddleware", "(", "'SMS'", ")", ",", "defaultMiddlewares", ",", "async", "(", "req", ",", "res", ")", "=>", "{", "Logger", ".", "info", "(", "\"Received request on /api/sms\"", ")", ";", "try", "{", "const", "adbOption", "=", "getAdbOption", "(", ")", ";", "const", "sendSMSCmd", "=", "`adb ${", "adbOption", "} emu sms send ${", "req", ".", "body", ".", "phoneNumber", "} ${", "req", ".", "body", ".", "message", "}`", ";", "exec", "(", "sendSMSCmd", ")", ";", "const", "defaultRes", "=", "{", "'action'", ":", "\"sms\"", ",", "'status'", ":", "\"OK\"", "}", ";", "res", ".", "send", "(", "defaultRes", ")", ";", "}", "catch", "(", "err", ")", "{", "Logger", ".", "error", "(", "'Error in POST /api/sms'", ")", ";", "Logger", ".", "error", "(", "err", ")", ";", "res", ".", "status", "(", "400", ")", ".", "send", "(", "DEFAULT_ERROR_MESSAGE", ")", ";", "}", "}", ")", ";", "/**\n * Endpoint for installing APK\n */", "api", ".", "post", "(", "'/apk'", ",", "featureAvailableMiddleware", "(", "'APK'", ")", ",", "fileUploadMiddlewares", ",", "async", "(", "req", ",", "res", ")", "=>", "{", "Logger", ".", "info", "(", "\"Received request on /api/apk\"", ")", ";", "try", "{", "const", "apk", "=", "req", ".", "files", ".", "file", ";", "const", "mv", "=", "util", ".", "promisify", "(", "apk", ".", "mv", ")", ";", "await", "mv", "(", "`/tmp/app.apk`", ")", ";", "const", "adbOption", "=", "getAdbOption", "(", ")", ";", "const", "installAPKCmd", "=", "`adb ${", "adbOption", "} install /tmp/app.apk`", ";", "await", "exec", "(", "installAPKCmd", ")", ";", "const", "defaultRes", "=", "{", "'action'", ":", "\"apk\"", ",", "'status'", ":", "\"OK\"", "}", ";", "res", ".", "send", "(", "defaultRes", ")", ";", "}", "catch", "(", "err", ")", "{", "Logger", ".", "error", "(", "'Error in POST /api/apk'", ")", ";", "Logger", ".", "error", "(", "err", ")", ";", "res", ".", "status", "(", "400", ")", ".", "send", "(", "DEFAULT_ERROR_MESSAGE", ")", ";", "}", "}", ")", ";", "/**\n * Endpoint for Port Forwarding\n */", "api", ".", "post", "(", "'/forward'", ",", "featureAvailableMiddleware", "(", "'FORWARD'", ")", ",", "defaultMiddlewares", ",", "async", "(", "req", ",", "res", ")", "=>", "{", "Logger", ".", "info", "(", "\"Received request on /api/forward\"", ")", ";", "try", "{", "const", "portNumber", "=", "req", ".", "body", ".", "portNumber", ";", "const", "adbOption", "=", "getAdbOption", "(", ")", ";", "const", "adbForwardCmd", "=", "`adb ${", "adbOption", "} forward tcp:${", "portNumber", "} tcp:${", "portNumber", "}`", ";", "exec", "(", "adbForwardCmd", ")", ";", "const", "rinetdForwardCmd", "=", "`/root/dockerized-android/utils/rinetd_forward.sh ${", "portNumber", "}`", ";", "exec", "(", "rinetdForwardCmd", ")", ";", "const", "defaultRes", "=", "{", "'action'", ":", "\"forward\"", ",", "'status'", ":", "\"OK\"", ",", "}", ";", "res", ".", "send", "(", "defaultRes", ")", ";", "}", "catch", "(", "err", ")", "{", "Logger", ".", "error", "(", "'Error in POST /api/forward'", ")", ";", "Logger", ".", "error", "(", "err", ")", ";", "res", ".", "status", "(", "400", ")", ".", "send", "(", "DEFAULT_ERROR_MESSAGE", ")", ";", "}", "}", ")", ";", "/**\n * Endpoint for Terminal\n */", "api", ".", "get", "(", "'/cwd'", ",", "defaultMiddlewares", ",", "async", "(", "req", ",", "res", ")", "=>", "{", "Logger", ".", "info", "(", "\"Received request on /api/cwd\"", ")", ";", "const", "cwd", "=", "process", ".", "cwd", "(", ")", ";", "res", ".", "send", "(", "cwd", ")", ";", "}", ")", ";", "api", ".", "post", "(", "'/terminal'", ",", "featureAvailableMiddleware", "(", "'TERMINAL'", ")", ",", "defaultMiddlewares", ",", "async", "(", "req", ",", "res", ")", "=>", "{", "Logger", ".", "info", "(", "\"Received request on /api/terminal\"", ")", ";", "const", "defaultErrorResponse", "=", "{", "'action'", ":", "'terminal'", ",", "'status'", ":", "'error'", ",", "'output'", ":", "'An error has occurred'", ",", "'cwd'", ":", "process", ".", "cwd", "(", ")", ",", "}", ";", "try", "{", "const", "arg", "=", "req", ".", "body", ".", "arg", ";", "switch", "(", "arg", "[", "0", "]", ")", "{", "case", "'cd'", ":", "if", "(", "arg", "[", "1", "]", ")", "{", "process", ".", "chdir", "(", "arg", "[", "1", "]", ")", ";", "const", "response", "=", "{", "'action'", ":", "'terminal'", ",", "'status'", ":", "'ok'", ",", "'output'", ":", "''", ",", "'cwd'", ":", "process", ".", "cwd", "(", ")", ",", "}", ";", "res", ".", "send", "(", "response", ")", ";", "}", "else", "{", "res", ".", "send", "(", "defaultErrorResponse", ")", ";", "}", "break", ";", "default", ":", "const", "terminalCmd", "=", "arg", ".", "reduce", "(", "(", "acc", ",", "curr", ")", "=>", "`${", "acc", "} ${", "curr", "}`", ")", ";", "const", "{", "stdout", "}", "=", "await", "exec", "(", "terminalCmd", ")", ";", "const", "response", "=", "{", "'action'", ":", "'terminal'", ",", "'status'", ":", "'ok'", ",", "'output'", ":", "stdout", ",", "'cwd'", ":", "process", ".", "cwd", "(", ")", ",", "}", ";", "res", ".", "send", "(", "response", ")", ";", "}", "}", "catch", "(", "err", ")", "{", "const", "errorResponse", "=", "{", "'action'", ":", "\"terminal\"", ",", "'status'", ":", "\"error\"", ",", "'output'", ":", "err", ".", "stderr", ",", "'cwd'", ":", "process", ".", "cwd", "(", ")", ",", "}", ";", "res", ".", "send", "(", "errorResponse", ")", ";", "}", "}", ")", ";", "}", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 33, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 55, null, null, null, null, null, null, null, null, 2, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, 4, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4523, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 46492, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 33, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1241
[ "import", "express", "from", "'express'", ";", "import", "cors", "from", "'cors'", ";", "import", "routes", "from", "'../../routes'", ";", "export", "default", "async", "(", "app", ")", "=>", "{", "app", ".", "use", "(", "cors", "(", ")", ")", ";", "app", ".", "use", "(", "\"/\"", ",", "routes", "(", ")", ")", ";", "}", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1984, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1242
[ "import", "debug", "from", "'debug'", ";", "export", "const", "log", "=", "debug", "(", "'w3c-webdriver'", ")", ";" ]
[ null, null, null, null, null, null, null, 359, null, null, null, null, null, null ]
1243
[ "import", "http", "from", "'http'", ";", "import", "https", "from", "'https'", ";", "import", "{", "URL", "}", "from", "'url'", ";", "import", "{", "log", "}", "from", "'./logger'", ";", "import", "util", "from", "'util'", ";", "interface", "ErrorValue", "{", "error", ":", "string", ";", "message", ":", "string", ";", "}", "function", "isError", "(", "value", ")", "{", "return", "(", "typeof", "value", "===", "'object'", "&&", "value", "!==", "null", "&&", "typeof", "(", "value", "as", "ErrorValue", ")", ".", "error", "===", "'string'", ")", ";", "}", "export", "type", "RequestMethod", "=", "'GET'", "|", "'POST'", "|", "'DELETE'", ";", "export", "type", "Headers", "=", "Record", "<", "string", ",", "string", "|", "string", "[", "]", "|", "undefined", ">", ";", "async", "function", "sendRequest", "<", "T", ">", "(", "method", ",", "url", ",", "body", "?", ",", "headers", "?", ")", "{", "log", "(", "`WebDriver request: ${", "method", "} ${", "url", "} ${", "body", "?", "util", ".", "inspect", "(", "body", ",", "false", ",", "10", ")", ":", "''", "}`", ")", ";", "const", "jsonBody", "=", "JSON", ".", "stringify", "(", "body", ")", ";", "const", "{", "hostname", ",", "port", ",", "pathname", ":", "path", ",", "protocol", "}", "=", "new", "URL", "(", "url", ")", ";", "const", "protocolBasedPort", "=", "protocol", "===", "'https:'", "?", "443", ":", "80", ";", "const", "options", "=", "{", "method", ",", "hostname", ",", "port", ":", "port", "||", "protocolBasedPort", ",", "path", ",", "headers", ":", "body", "?", "{", "...", "headers", ",", "'Content-Length'", ":", "Buffer", ".", "byteLength", "(", "jsonBody", ",", "'utf8'", ")", ",", "'Content-Type'", ":", "'application/json'", "}", ":", "headers", "}", ";", "const", "result", "=", "await", "new", "Promise", "<", "{", "value", ":", "T", ";", "}", ">", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "const", "request", "=", "(", "protocol", "===", "'https:'", "?", "https", ":", "http", ")", ".", "request", "(", "options", ",", "(", "response", ")", "=>", "{", "const", "chunks", "=", "[", "]", ";", "response", ".", "setEncoding", "(", "'utf8'", ")", ";", "response", ".", "on", "(", "'data'", ",", "(", "chunk", ")", "=>", "{", "chunks", ".", "push", "(", "chunk", ")", ";", "}", ")", ";", "response", ".", "on", "(", "'end'", ",", "(", ")", "=>", "{", "try", "{", "resolve", "(", "JSON", ".", "parse", "(", "chunks", ".", "join", "(", "''", ")", ")", "as", "{", "value", ":", "T", ";", "}", ")", ";", "}", "catch", "(", "err", ")", "{", "reject", "(", "err", ")", ";", "}", "}", ")", ";", "}", ")", ";", "request", ".", "on", "(", "'error'", ",", "reject", ")", ";", "if", "(", "body", ")", "{", "request", ".", "write", "(", "jsonBody", ")", ";", "}", "request", ".", "end", "(", ")", ";", "}", ")", ";", "log", "(", "`WebDriver response: ${", "util", ".", "inspect", "(", "result", ",", "false", ",", "10", ")", "}`", ")", ";", "const", "{", "value", "}", "=", "result", ";", "if", "(", "isError", "(", "value", ")", ")", "{", "const", "{", "error", ",", "message", "}", "=", "value", ";", "throw", "new", "Error", "(", "message", "||", "error", ")", ";", "}", "return", "value", ";", "}", "export", "const", "GET", "=", "async", "<", "T", ">", "(", "url", ")", ":", "Promise", "<", "T", ">", "=>", "sendRequest", "<", "T", ">", "(", "'GET'", ",", "url", ")", ";", "export", "const", "POST", "=", "async", "<", "T", ">", "(", "url", ",", "body", "=", "{", "}", ",", "headers", "?", ")", ":", "Promise", "<", "T", ">", "=>", "sendRequest", "<", "T", ">", "(", "'POST'", ",", "url", ",", "body", ",", "headers", ")", ";", "export", "const", "DELETE", "=", "async", "<", "T", ">", "(", "url", ",", "body", "?", ")", ":", "Promise", "<", "T", ">", "=>", "sendRequest", "<", "T", ">", "(", "'DELETE'", ",", "url", ",", "body", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, 8717, null, 2, null, 6, null, null, 184, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 4, null, null, null, null, 1148, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 300, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, 2, null, 6, null, null, null, null, 184, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, 2, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1244
[ "import", "{", "ElementRect", ",", "LocatorStrategy", "}", "from", "'./core'", ";", "import", "{", "GET", ",", "POST", "}", "from", "'./rest'", ";", "const", "WEB_ELEMENT_IDENTIFIER", "=", "'element-6066-11e4-a52e-4f735466cecf'", ";", "internal", "export", "type", "WebElement", "=", "{", "'element-6066-11e4-a52e-4f735466cecf'", ":", "string", ";", "}", ";", "internal", "param", "item", "export", "function", "isWebElement", "(", "item", ")", "{", "if", "(", "!", "item", "||", "typeof", "item", "!==", "'object'", "||", "item", "===", "null", ")", "{", "return", "false", ";", "}", "return", "WEB_ELEMENT_IDENTIFIER", "in", "item", ";", "}", "section", "export", "class", "Element", "{", "private", "readonly", "host", ":", "string", ";", "private", "readonly", "sessionId", ":", "string", ";", "private", "readonly", "elementId", ":", "string", ";", "constructor", "(", "host", ",", "sessionId", ",", "webElement", ")", "{", "this", ".", "host", "=", "host", ";", "this", ".", "sessionId", "=", "sessionId", ";", "this", ".", "elementId", "=", "webElement", "[", "WEB_ELEMENT_IDENTIFIER", "]", ";", "}", "internal", "public", "getWebElement", "(", ")", "{", "return", "{", "[", "WEB_ELEMENT_IDENTIFIER", "]", ":", "this", ".", "elementId", "}", ";", "}", "/****************************************************************************************************************\n * ELEMENTS *\n * https://www.w3.org/TR/webdriver/#elements *\n ****************************************************************************************************************/", "see", "https", "section", "example", "param", "strategy", "param", "selector", "public", "async", "findElement", "(", "strategy", ",", "selector", ")", "{", "const", "webElement", "=", "await", "POST", "<", "WebElement", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/element`", ",", "{", "using", ":", "strategy", ",", "value", ":", "selector", "}", ")", ";", "return", "new", "Element", "(", "this", ".", "host", ",", "this", ".", "sessionId", ",", "webElement", ")", ";", "}", "see", "https", "section", "example", "param", "strategy", "param", "selector", "public", "async", "findElements", "(", "strategy", ",", "selector", ")", "{", "const", "webElements", "=", "await", "POST", "<", "WebElement", "[", "]", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/elements`", ",", "{", "using", ":", "strategy", ",", "value", ":", "selector", "}", ")", ";", "return", "webElements", ".", "map", "(", "(", "webElement", ")", "=>", "new", "Element", "(", "this", ".", "host", ",", "this", ".", "sessionId", ",", "webElement", ")", ")", ";", "}", "see", "https", "section", "example", "public", "async", "isSelected", "(", ")", "{", "return", "GET", "<", "boolean", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/selected`", ")", ";", "}", "see", "https", "section", "example", "param", "attributeName", "public", "async", "getAttribute", "(", "attributeName", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/attribute/${", "attributeName", "}`", ")", ";", "}", "see", "https", "section", "example", "param", "propertyName", "public", "async", "getProperty", "(", "propertyName", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/property/${", "propertyName", "}`", ")", ";", "}", "see", "https", "section", "example", "param", "propertyName", "public", "async", "getCssValue", "(", "propertyName", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/css/${", "propertyName", "}`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "getText", "(", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/text`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "getTagName", "(", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/name`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "getRect", "(", ")", "{", "return", "GET", "<", "ElementRect", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/rect`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "isEnabled", "(", ")", "{", "return", "GET", "<", "boolean", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/enabled`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "click", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/click`", ",", "{", "}", ")", ";", "}", "see", "https", "section", "example", "public", "async", "clear", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/clear`", ",", "{", "}", ")", ";", "}", "see", "https", "section", "example", "param", "text", "public", "async", "sendKeys", "(", "text", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/value`", ",", "{", "text", "}", ")", ";", "}", "/****************************************************************************************************************\n * SCREEN CAPTURE *\n * https://www.w3.org/TR/webdriver/#screen-capture *\n ****************************************************************************************************************/", "return", "see", "https", "section", "example", "public", "async", "takeScreenshot", "(", ")", "{", "const", "screenshot", "=", "await", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/${", "this", ".", "elementId", "}/screenshot`", ")", ";", "return", "Buffer", ".", "from", "(", "screenshot", ",", "'base64'", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, 4618, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4618, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 0, null, 2, null, null, null, 4618, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 0, null, 2, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4618, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1245
[ "export", "function", "deepMap", "(", "source", ",", "transformer", ")", "{", "if", "(", "Array", ".", "isArray", "(", "source", ")", ")", "{", "return", "source", ".", "map", "(", "(", "item", ")", "=>", "deepMap", "(", "item", ",", "transformer", ")", ")", ";", "}", "const", "target", "=", "transformer", "(", "source", ")", ";", "if", "(", "target", ")", "{", "return", "target", ";", "}", "if", "(", "typeof", "source", "===", "'object'", "&&", "source", "!==", "null", ")", "{", "return", "Object", ".", "keys", "(", "source", ")", ".", "reduce", "(", "(", "acc", ",", "key", ")", "=>", "(", "{", "...", "acc", ",", "[", "key", "]", ":", "deepMap", "(", "(", "source", "as", "Record", "<", "string", ",", "unknown", ">", ")", "[", "key", "]", ",", "transformer", ")", "}", ")", ",", "{", "}", ")", ";", "}", "return", "source", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1246
[ "import", "{", "ActionSequence", ",", "Cookie", ",", "LocatorStrategy", ",", "Timeouts", ",", "WindowRect", ",", "}", "from", "'./core'", ";", "import", "{", "deepMap", "}", "from", "'./core/utils'", ";", "import", "{", "Element", ",", "isWebElement", ",", "WebElement", "}", "from", "'./Element'", ";", "import", "{", "DELETE", ",", "GET", ",", "POST", "}", "from", "'./rest'", ";", "section", "export", "class", "Session", "{", "private", "readonly", "host", ":", "string", ";", "private", "readonly", "sessionId", ":", "string", ";", "constructor", "(", "host", ",", "sessionId", ")", "{", "this", ".", "host", "=", "host", ";", "this", ".", "sessionId", "=", "sessionId", ";", "}", "/****************************************************************************************************************\n * SESSIONS *\n * https://www.w3.org/TR/webdriver/#sessions *\n ****************************************************************************************************************/", "see", "https", "section", "example", "public", "async", "close", "(", ")", "{", "await", "DELETE", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}`", ")", ";", "}", "/****************************************************************************************************************\n * TIMEOUTS *\n * https://www.w3.org/TR/webdriver/#timeouts *\n ****************************************************************************************************************/", "return", "see", "https", "section", "example", "public", "async", "getTimeouts", "(", ")", "{", "return", "GET", "<", "Timeouts", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/timeouts`", ")", ";", "}", "see", "https", "section", "example", "param", "timeout", "public", "async", "setTimeouts", "(", "timeout", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/timeouts`", ",", "timeout", ")", ";", "}", "/****************************************************************************************************************\n * NAVIGATION *\n * https://www.w3.org/TR/webdriver/#navigation *\n ****************************************************************************************************************/", "see", "https", "section", "example", "param", "targetUrl", "public", "async", "navigateTo", "(", "targetUrl", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/url`", ",", "{", "url", ":", "targetUrl", "}", ")", ";", "}", "see", "https", "section", "example", "public", "async", "getCurrentUrl", "(", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/url`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "back", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/back`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "forward", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/forward`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "refresh", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/refresh`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "getTitle", "(", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/title`", ")", ";", "}", "/****************************************************************************************************************\n * CONTEXTS *\n * https://www.w3.org/TR/webdriver/#contexts *\n ****************************************************************************************************************/", "see", "https", "section", "example", "public", "async", "getWindowHandle", "(", ")", "{", "return", "GET", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "closeWindow", "(", ")", "{", "await", "DELETE", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window`", ")", ";", "}", "see", "https", "section", "example", "param", "handle", "public", "async", "switchToWindow", "(", "handle", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window`", ",", "{", "handle", "}", ")", ";", "}", "see", "https", "section", "example", "public", "async", "getWindowHandles", "(", ")", "{", "return", "GET", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window/handles`", ")", ";", "}", "see", "https", "section", "example", "example", "param", "target", "public", "async", "switchToFrame", "(", "target", ")", "{", "const", "id", "=", "target", "instanceof", "Element", "?", "target", ".", "getWebElement", "(", ")", ":", "target", ";", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/frame`", ",", "{", "id", "}", ")", ";", "}", "see", "https", "section", "example", "public", "async", "switchToParentFrame", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/frame/parent`", ")", ";", "}", "return", "see", "https", "section", "example", "public", "async", "getWindowRect", "(", ")", "{", "return", "GET", "<", "WindowRect", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window/rect`", ")", ";", "}", "see", "https", "section", "example", "param", "windowRect", "public", "async", "setWindowRect", "(", "windowRect", ")", "{", "return", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window/rect`", ",", "windowRect", ")", ";", "}", "see", "https", "section", "example", "public", "async", "maximizeWindow", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window/maximize`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "minimizeWindow", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window/minimize`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "fullScreenWindow", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/window/fullscreen`", ")", ";", "}", "/****************************************************************************************************************\n * ELEMENTS *\n * https://www.w3.org/TR/webdriver/#elements *\n ****************************************************************************************************************/", "see", "https", "section", "example", "param", "strategy", "param", "selector", "public", "async", "findElement", "(", "strategy", ",", "selector", ")", "{", "const", "webElement", "=", "await", "POST", "<", "WebElement", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element`", ",", "{", "using", ":", "strategy", ",", "value", ":", "selector", "}", ")", ";", "return", "new", "Element", "(", "this", ".", "host", ",", "this", ".", "sessionId", ",", "webElement", ")", ";", "}", "see", "https", "section", "example", "param", "strategy", "param", "selector", "public", "async", "findElements", "(", "strategy", ",", "selector", ")", "{", "const", "webElements", "=", "await", "POST", "<", "WebElement", "[", "]", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/elements`", ",", "{", "using", ":", "strategy", ",", "value", ":", "selector", "}", ")", ";", "return", "webElements", ".", "map", "(", "(", "webElement", ")", "=>", "new", "Element", "(", "this", ".", "host", ",", "this", ".", "sessionId", ",", "webElement", ")", ")", ";", "}", "see", "https", "section", "example", "public", "async", "getActiveElement", "(", ")", "{", "const", "webElement", "=", "await", "GET", "<", "WebElement", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/element/active`", ")", ";", "return", "new", "Element", "(", "this", ".", "host", ",", "this", ".", "sessionId", ",", "webElement", ")", ";", "}", "/****************************************************************************************************************\n * DOCUMENT *\n * https://www.w3.org/TR/webdriver/#document *\n ****************************************************************************************************************/", "see", "https", "section", "example", "public", "async", "getPageSource", "(", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/source`", ")", ";", "}", "return", "see", "https", "section", "example", "example", "example", "param", "script", "param", "args", "public", "async", "executeScript", "<", "T", ">", "(", "script", ",", "args", "=", "[", "]", ")", "{", "const", "mappedArgs", "=", "deepMap", "(", "args", ",", "(", "item", ")", "=>", "{", "if", "(", "item", "instanceof", "Element", ")", "{", "return", "item", ".", "getWebElement", "(", ")", ";", "}", "}", ")", ";", "const", "result", "=", "await", "POST", "<", "T", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/execute/sync`", ",", "{", "script", ",", "args", ":", "mappedArgs", "}", ")", ";", "return", "deepMap", "(", "result", ",", "(", "item", ")", "=>", "{", "if", "(", "isWebElement", "(", "item", ")", ")", "{", "return", "new", "Element", "(", "this", ".", "host", ",", "this", ".", "sessionId", ",", "item", ")", ";", "}", "}", ")", "as", "T", ";", "}", "return", "see", "https", "section", "example", "example", "example", "param", "script", "param", "args", "public", "async", "executeAsyncScript", "<", "T", ">", "(", "script", ",", "args", "=", "[", "]", ")", "{", "const", "mappedArgs", "=", "deepMap", "(", "args", ",", "(", "item", ")", "=>", "{", "if", "(", "item", "instanceof", "Element", ")", "{", "return", "item", ".", "getWebElement", "(", ")", ";", "}", "}", ")", ";", "const", "result", "=", "await", "POST", "<", "T", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/execute/async`", ",", "{", "script", ",", "args", ":", "mappedArgs", "}", ")", ";", "return", "deepMap", "(", "result", ",", "(", "item", ")", "=>", "{", "if", "(", "isWebElement", "(", "item", ")", ")", "{", "return", "new", "Element", "(", "this", ".", "host", ",", "this", ".", "sessionId", ",", "item", ")", ";", "}", "}", ")", "as", "T", ";", "}", "/****************************************************************************************************************\n * COOKIES *\n * https://www.w3.org/TR/webdriver/#cookies *\n ****************************************************************************************************************/", "return", "see", "https", "section", "example", "public", "async", "getAllCookies", "(", ")", "{", "return", "GET", "<", "Cookie", "[", "]", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/cookie`", ")", ";", "}", "return", "see", "https", "section", "example", "param", "name", "public", "async", "getNamedCookie", "(", "name", ")", "{", "return", "GET", "<", "Cookie", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/cookie/${", "name", "}`", ")", ";", "}", "see", "https", "section", "example", "param", "cookie", "public", "async", "addCookie", "(", "cookie", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/cookie`", ",", "{", "cookie", "}", ")", ";", "}", "see", "https", "section", "example", "param", "propertyName", "public", "async", "deleteCookie", "(", "propertyName", ")", "{", "await", "DELETE", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/cookie/${", "propertyName", "}`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "deleteAllCookies", "(", ")", "{", "await", "DELETE", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/cookie`", ")", ";", "}", "/****************************************************************************************************************\n * ACTIONS *\n * https://www.w3.org/TR/webdriver/#actions *\n ****************************************************************************************************************/", "see", "https", "section", "example", "example", "example", "example", "param", "actionSequences", "public", "async", "performActions", "(", "actionSequences", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/actions`", ",", "{", "actions", ":", "actionSequences", ".", "map", "(", "(", "actionSequence", ")", "=>", "{", "if", "(", "actionSequence", ".", "type", "!==", "'pointer'", ")", "{", "return", "actionSequence", ";", "}", "return", "{", "...", "actionSequence", ",", "actions", ":", "actionSequence", ".", "actions", ".", "map", "(", "(", "action", ")", "=>", "{", "if", "(", "action", ".", "type", "!==", "'pointerMove'", "||", "!", "action", ".", "origin", "||", "action", ".", "origin", "===", "'viewport'", "||", "action", ".", "origin", "===", "'pointer'", ")", "{", "return", "action", ";", "}", "return", "{", "...", "action", ",", "origin", ":", "action", ".", "origin", ".", "getWebElement", "(", ")", "}", ";", "}", ")", "}", ";", "}", ")", "}", ")", ";", "}", "see", "https", "section", "example", "public", "async", "releaseActions", "(", ")", "{", "await", "DELETE", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/actions`", ")", ";", "}", "/****************************************************************************************************************\n * USER PROMPTS *\n * https://www.w3.org/TR/webdriver/#user-prompts *\n ****************************************************************************************************************/", "see", "https", "section", "example", "public", "async", "dismissAlert", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/alert/dismiss`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "acceptAlert", "(", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/alert/accept`", ")", ";", "}", "see", "https", "section", "example", "public", "async", "getAlertText", "(", ")", "{", "return", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/alert/text`", ")", ";", "}", "see", "https", "section", "example", "param", "text", "public", "async", "sendAlertText", "(", "text", ")", "{", "await", "POST", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/alert/text`", ",", "{", "text", "}", ")", ";", "}", "/****************************************************************************************************************\n * SCREEN CAPTURE *\n * https://www.w3.org/TR/webdriver/#screen-capture *\n ****************************************************************************************************************/", "return", "see", "https", "section", "example", "public", "async", "takeScreenshot", "(", ")", "{", "const", "screenshot", "=", "await", "GET", "<", "string", ">", "(", "`${", "this", ".", "host", "}/session/${", "this", ".", "sessionId", "}/screenshot`", ")", ";", "return", "Buffer", ".", "from", "(", "screenshot", ",", "'base64'", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 20792, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 0, null, 2, null, null, null, 4618, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 0, null, 2, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4618, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, 4618, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, 2, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 11, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, 2, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 11, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 1813, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 37609, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1247
[ "import", "{", "Status", "}", "from", "'./core'", ";", "import", "{", "SessionOptions", "}", "from", "'./core/SessionOptions'", ";", "import", "{", "GET", ",", "POST", "}", "from", "'./rest'", ";", "import", "{", "Session", "}", "from", "'./Session'", ";", "section", "returns", "see", "https", "param", "options", "example", "example", "export", "async", "function", "newSession", "(", "options", ")", "{", "const", "{", "url", ",", "capabilities", ",", "desiredCapabilities", ",", "headers", "}", "=", "options", ";", "const", "{", "sessionId", "}", "=", "await", "POST", "<", "{", "sessionId", ":", "string", ";", "}", ">", "(", "`${", "url", "}/session`", ",", "{", "...", "(", "capabilities", "&&", "{", "capabilities", "}", ")", ",", "...", "(", "desiredCapabilities", "&&", "{", "desiredCapabilities", "}", ")", "}", ",", "headers", ")", ";", "return", "new", "Session", "(", "url", ",", "sessionId", ")", ";", "}", "section", "returns", "see", "https", "example", "param", "url", "export", "async", "function", "status", "(", "url", ")", "{", "return", "GET", "<", "Status", ">", "(", "`${", "url", "}/status`", ")", ";", "}", "export", "*", "from", "'./core'", ";", "export", "*", "from", "'./Element'", ";", "export", "*", "from", "'./Session'", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 7516, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1248
[ "import", "{", "ChildProcess", "}", "from", "'child_process'", ";", "import", "{", "path", "as", "chromedriverPath", "}", "from", "'chromedriver'", ";", "import", "{", "config", "}", "from", "'dotenv-safe'", ";", "import", "{", "path", "as", "geckodriverPath", "}", "from", "'geckodriver'", ";", "import", "{", "path32", "as", "iedriverPath", "}", "from", "'iedriver'", ";", "import", "{", "Context", "}", "from", "'mocha'", ";", "import", "{", "Capabilities", ",", "Session", ",", "WindowRect", "}", "from", "'../src'", ";", "import", "{", "Headers", "}", "from", "'../src/rest'", ";", "let", "initialWindowRect", ";", "config", "(", ")", ";", "export", "enum", "Browser", "{", "Chrome", "=", "'chrome'", ",", "Firefox", "=", "'firefox'", ",", "Safari", "=", "'safari'", ",", "InternetExplorer", "=", "'internet-explorer'", "}", "export", "enum", "WebDriverHost", "{", "Localhost", ",", "BrowserStack", "=", "'https://hub-cloud.browserstack.com/wd/hub'", "}", "type", "BrowserDriver", "=", "{", "name", ":", "string", ";", "path", "?", ":", "string", ";", "instance", "?", ":", "ChildProcess", ";", "host", ":", "WebDriverHost", ";", "headers", "?", ":", "Headers", ";", "args", "?", "(", "{", "port", "}", ")", ":", "string", "[", "]", ";", "}", ";", "type", "TestEnvironment", "=", "{", "testName", "?", ":", "string", ";", "browser", ":", "Browser", ";", "headless", ":", "boolean", ";", "capabilities", ":", "Capabilities", ";", "desiredCapabilities", "?", ":", "{", "'browserstack.use_w3c'", ":", "boolean", ";", "}", ";", "driver", ":", "BrowserDriver", ";", "session", ":", "Session", ";", "setInitialWindowRectangle", "?", ":", "(", "windowRect", ":", "WindowRect", ")", "=>", "void", ";", "}", ";", "const", "testEnvironments", "=", "[", "{", "browser", ":", "Browser", ".", "Chrome", ",", "capabilities", ":", "{", "alwaysMatch", ":", "{", "browserName", ":", "'chrome'", ",", "'goog:chromeOptions'", ":", "{", "w3c", ":", "true", ",", "...", "(", "process", ".", "env", ".", "HEADLESS", "&&", "{", "args", ":", "[", "'--headless'", "]", "}", ")", "}", "}", "}", ",", "driver", ":", "{", "name", ":", "'Chromedriver'", ",", "path", ":", "chromedriverPath", ",", "args", ":", "(", "{", "port", "}", ")", ":", "string", "[", "]", "=>", "[", "`--port=${", "port", "}`", "]", ",", "host", ":", "WebDriverHost", ".", "Localhost", "}", "}", ",", "{", "browser", ":", "Browser", ".", "Firefox", ",", "capabilities", ":", "{", "alwaysMatch", ":", "{", "browserName", ":", "'firefox'", ",", "'moz:firefoxOptions'", ":", "{", "log", ":", "{", "level", ":", "'warn'", "}", ",", "...", "(", "process", ".", "env", ".", "HEADLESS", "&&", "{", "args", ":", "[", "'-headless'", "]", "}", ")", "}", "}", "}", ",", "driver", ":", "{", "name", ":", "'Geckodriver'", ",", "path", ":", "geckodriverPath", ",", "args", ":", "(", "{", "port", "}", ")", ":", "string", "[", "]", "=>", "[", "`--port=${", "port", "}`", "]", ",", "host", ":", "WebDriverHost", ".", "Localhost", "}", "}", ",", "{", "browser", ":", "Browser", ".", "Safari", ",", "capabilities", ":", "{", "alwaysMatch", ":", "{", "browserName", ":", "'safari'", "}", "}", ",", "driver", ":", "{", "name", ":", "'SafariDriver'", ",", "path", ":", "'safaridriver'", ",", "args", ":", "(", "{", "port", "}", ")", ":", "string", "[", "]", "=>", "[", "`--port=${", "port", "}`", "]", ",", "host", ":", "WebDriverHost", ".", "Localhost", "}", "}", ",", "{", "browser", ":", "Browser", ".", "InternetExplorer", ",", "capabilities", ":", "{", "alwaysMatch", ":", "{", "browserName", ":", "'internet explorer'", ",", "'se:ieOptions'", ":", "{", "ignoreProtectedModeSettings", ":", "true", ",", "ignoreZoomSetting", ":", "true", ",", "'ie.ensureCleanSession'", ":", "true", "}", "}", "}", ",", "driver", ":", "{", "name", ":", "'InternetExplorerDriver'", ",", "path", ":", "iedriverPath", ",", "args", ":", "(", "{", "port", "}", ")", ":", "string", "[", "]", "=>", "[", "`--port=${", "port", "}`", ",", "'--log-level=INFO'", ",", "]", ",", "host", ":", "WebDriverHost", ".", "Localhost", "}", "}", ",", "{", "browser", ":", "Browser", ".", "Safari", ",", "capabilities", ":", "{", "alwaysMatch", ":", "{", "browserName", ":", "'safari'", ",", "browserVersion", ":", "'14.1'", ",", "'bstack:options'", ":", "{", "local", ":", "true", ",", "os", ":", "'OS X'", ",", "osVersion", ":", "'Big Sur'", ",", "safari", ":", "{", "enablePopups", ":", "true", ",", "allowAllCookies", ":", "true", "}", ",", "networkLogs", ":", "true", ",", "debug", ":", "true", ",", "projectName", ":", "'w3c-webdriver'", ",", "buildName", ":", "process", ".", "env", ".", "GITHUB_SHA", "||", "'local build'", ",", "sessionName", ":", "'Safari'", "}", "}", "}", ",", "desiredCapabilities", ":", "{", "'browserstack.use_w3c'", ":", "true", "}", ",", "driver", ":", "{", "name", ":", "'BrowserStack'", ",", "host", ":", "WebDriverHost", ".", "BrowserStack", ",", "headers", ":", "{", "Authorization", ":", "`Basic ${", "Buffer", ".", "from", "(", "[", "process", ".", "env", ".", "BROWSERSTACK_USERNAME", ",", "process", ".", "env", ".", "BROWSERSTACK_ACCESS_KEY", ",", "]", ".", "join", "(", "':'", ")", ")", ".", "toString", "(", "'base64'", ")", "}`", "}", "}", "}", ",", "{", "browser", ":", "Browser", ".", "Firefox", ",", "capabilities", ":", "{", "alwaysMatch", ":", "{", "browserName", ":", "'firefox'", ",", "'bstack:options'", ":", "{", "local", ":", "true", ",", "os", ":", "'Windows'", ",", "osVersion", ":", "'10'", ",", "networkLogs", ":", "true", ",", "debug", ":", "true", ",", "projectName", ":", "'w3c-webdriver'", ",", "buildName", ":", "process", ".", "env", ".", "GITHUB_SHA", "||", "'local build'", ",", "sessionName", ":", "'Firefox'", "}", "}", "}", ",", "desiredCapabilities", ":", "{", "'browserstack.use_w3c'", ":", "true", "}", ",", "driver", ":", "{", "name", ":", "'BrowserStack'", ",", "host", ":", "WebDriverHost", ".", "BrowserStack", ",", "headers", ":", "{", "Authorization", ":", "`Basic ${", "Buffer", ".", "from", "(", "[", "process", ".", "env", ".", "BROWSERSTACK_USERNAME", ",", "process", ".", "env", ".", "BROWSERSTACK_ACCESS_KEY", ",", "]", ".", "join", "(", "':'", ")", ")", ".", "toString", "(", "'base64'", ")", "}`", "}", "}", "}", ",", "]", ";", "function", "throwNoBrowserEnvironmentVariableError", "(", ")", "{", "throw", "new", "Error", "(", "'Environment variable BROWSER is not set or is not matching the supported browsers.'", ")", ";", "}", "const", "webDriverHost", "=", "process", ".", "env", ".", "BROWSERSTACK", "?", "WebDriverHost", ".", "BrowserStack", ":", "WebDriverHost", ".", "Localhost", ";", "const", "testEnv", "=", "{", "session", ":", "new", "Session", "(", "'default'", ",", "'default'", ")", ",", "headless", ":", "!", "!", "process", ".", "env", ".", "HEADLESS", ",", "setInitialWindowRectangle", "(", "rect", ")", "{", "initialWindowRect", "=", "rect", ";", "}", ",", "...", "(", "testEnvironments", ".", "find", "(", "(", "{", "browser", ",", "driver", "}", ")", "=>", "browser", "===", "process", ".", "env", ".", "BROWSER", "&&", "driver", ".", "host", "===", "webDriverHost", ")", "||", "throwNoBrowserEnvironmentVariableError", "(", ")", ")", "}", ";", "export", "async", "function", "getTestEnv", "(", "context", "?", ")", "{", "const", "{", "session", "}", "=", "testEnv", ";", "const", "testAppPort", "=", "process", ".", "env", ".", "TEST_APP_PORT", "??", "0", ";", "testEnv", ".", "testName", "=", "context", "?.", "test", "?.", "titlePath", "(", ")", ".", "join", "(", "'.'", ")", ".", "replace", "(", "/ /g", ",", "'_'", ")", "??", "''", ";", "await", "session", ".", "refresh", "(", ")", ";", "await", "session", ".", "navigateTo", "(", "`http://localhost:${", "testAppPort", "}/#${", "testEnv", ".", "testName", "}`", ")", ";", "await", "session", ".", "setWindowRect", "(", "initialWindowRect", ")", ";", "return", "testEnv", ";", "}", "export", "default", "testEnv", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 20792, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1249
[ "import", "expect", "from", "'expect'", ";", "import", "{", "newSession", ",", "status", ",", "Timeouts", "}", "from", "'../src'", ";", "import", "{", "Browser", ",", "getTestEnv", ",", "WebDriverHost", "}", "from", "'../test-env'", ";", "describe", "(", "'Sessions'", ",", "function", "(", ")", "{", "describe", "(", "'newSession method'", ",", "function", "(", ")", "{", "it", "(", "'throws error if session creation was not successful'", ",", "async", "function", "(", ")", "{", "let", "error", ";", "try", "{", "await", "newSession", "(", "{", "url", ":", "'http://localhost:65535'", ",", "capabilities", ":", "{", "alwaysMatch", ":", "{", "browserName", ":", "'non existing browser'", "}", "}", "}", ")", ";", "}", "catch", "(", "e", ")", "{", "error", "=", "e", ";", "}", "expect", "(", "(", "error", "as", "Error", ")", ".", "message", ")", ".", "toContain", "(", "`connect ECONNREFUSED 127.0.0.1:65535`", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'status method'", ",", "function", "(", ")", "{", "it", "(", "'returns server status'", ",", "async", "function", "(", ")", "{", "const", "{", "browser", ",", "driver", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "result", "=", "await", "status", "(", "process", ".", "env", ".", "WEB_DRIVER_URL", "as", "string", ")", ";", "if", "(", "driver", ".", "host", "===", "WebDriverHost", ".", "BrowserStack", ")", "{", "expect", "(", "result", ".", "build", ".", "version", ")", ".", "toBeDefined", "(", ")", ";", "return", ";", "}", "switch", "(", "browser", ")", "{", "case", "Browser", ".", "Firefox", ":", "{", "expect", "(", "result", ".", "message", ")", ".", "toBeDefined", "(", ")", ";", "expect", "(", "result", ".", "ready", ")", ".", "toBeDefined", "(", ")", ";", "break", ";", "}", "case", "Browser", ".", "Safari", ":", "{", "process", ".", "stdout", ".", "write", "(", "JSON", ".", "stringify", "(", "result", ")", ")", ";", "break", ";", "}", "default", ":", "{", "expect", "(", "result", ".", "build", ")", ".", "toBeDefined", "(", ")", ";", "expect", "(", "result", ".", "os", ")", ".", "toBeDefined", "(", ")", ";", "}", "}", "}", ")", ";", "}", ")", ";", "describe", "(", "'set/getTimeout methods'", ",", "function", "(", ")", "{", "it", "(", "'sets and retrieves session timeouts'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "driver", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "driver", ".", "host", "===", "WebDriverHost", ".", "BrowserStack", ")", "{", "return", ";", "}", "const", "timeouts", "=", "{", "script", ":", "30001", ",", "pageLoad", ":", "60002", ",", "implicit", ":", "40003", "}", ";", "await", "session", ".", "setTimeouts", "(", "timeouts", ")", ";", "const", "retrievedTimeout", "=", "await", "session", ".", "getTimeouts", "(", ")", ";", "expect", "(", "retrievedTimeout", ")", ".", "toEqual", "(", "timeouts", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 756, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1250
[ "import", "expect", "from", "'expect'", ";", "import", "{", "getTestEnv", "}", "from", "'../test-env'", ";", "function", "removeHash", "(", "url", ")", "{", "return", "url", ".", "replace", "(", "/#.*$/", ",", "''", ")", ";", "}", "describe", "(", "'Navigation'", ",", "function", "(", ")", "{", "describe", "(", "'getTitle method'", ",", "function", "(", ")", "{", "it", "(", "'returns page title'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "title", "=", "await", "session", ".", "getTitle", "(", ")", ";", "expect", "(", "title", ")", ".", "toEqual", "(", "'The simple calculator'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getCurrentUrl method'", ",", "function", "(", ")", "{", "it", "(", "'returns current url'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "currentUrl", "=", "removeHash", "(", "await", "session", ".", "getCurrentUrl", "(", ")", ")", ";", "expect", "(", "currentUrl", ")", ".", "toEqual", "(", "`http://localhost:${", "process", ".", "env", ".", "TEST_APP_PORT", "??", "''", "}/`", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'back method'", ",", "function", "(", ")", "{", "it", "(", "'navigate to previous url from history'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "currentUrlBefore", "=", "removeHash", "(", "await", "session", ".", "getCurrentUrl", "(", ")", ")", ";", "await", "session", ".", "navigateTo", "(", "`${", "currentUrlBefore", "}#test`", ")", ";", "await", "session", ".", "back", "(", ")", ";", "const", "currentUrlAfter", "=", "removeHash", "(", "await", "session", ".", "getCurrentUrl", "(", ")", ")", ";", "expect", "(", "currentUrlAfter", ")", ".", "toEqual", "(", "currentUrlBefore", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'forward method'", ",", "function", "(", ")", "{", "it", "(", "'navigate forward to next url from history'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "actualUrl", "=", "removeHash", "(", "await", "session", ".", "getCurrentUrl", "(", ")", ")", ";", "await", "session", ".", "navigateTo", "(", "`${", "actualUrl", "}#test`", ")", ";", "await", "session", ".", "back", "(", ")", ";", "await", "session", ".", "forward", "(", ")", ";", "const", "currentUrlAfterForward", "=", "await", "session", ".", "getCurrentUrl", "(", ")", ";", "expect", "(", "currentUrlAfterForward", ")", ".", "toEqual", "(", "`${", "actualUrl", "}#test`", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'refresh method'", ",", "function", "(", ")", "{", "it", "(", "'refresh the current page'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "a", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "await", "a", ".", "sendKeys", "(", "'13'", ")", ";", "const", "b", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#b'", ")", ";", "await", "b", ".", "sendKeys", "(", "'7'", ")", ";", "const", "add", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#add'", ")", ";", "await", "add", ".", "click", "(", ")", ";", "await", "session", ".", "refresh", "(", ")", ";", "const", "currentUrl", "=", "removeHash", "(", "await", "session", ".", "getCurrentUrl", "(", ")", ")", ";", "expect", "(", "currentUrl", ")", ".", "toEqual", "(", "`http://localhost:${", "process", ".", "env", ".", "TEST_APP_PORT", "??", "''", "}/`", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#result'", ")", ";", "const", "resultText", "=", "await", "result", ".", "getText", "(", ")", ";", "expect", "(", "resultText", ")", ".", "toEqual", "(", "''", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1251
[ "export", "async", "function", "poll", "(", "{", "timeout", "=", "5000", ",", "interval", "=", "100", ",", "predicate", ",", "}", ")", "{", "let", "timeoutTimer", "=", "null", ";", "let", "pollTimeout", "=", "null", ";", "try", "{", "await", "Promise", ".", "race", "(", "[", "new", "Promise", "(", "(", "_resolve", ",", "reject", ")", "=>", "{", "timeoutTimer", "=", "setTimeout", "(", "(", ")", "=>", "{", "reject", "(", "new", "Error", "(", "`Condition was not met it ${", "timeout", "}ms`", ")", ")", ";", "}", ",", "timeout", ")", ";", "}", ")", ",", "new", "Promise", "<", "void", ">", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "pollTimeout", "=", "setInterval", "(", "(", ")", "=>", "{", "predicate", "(", ")", ".", "then", "(", "(", "result", ")", "=>", "{", "if", "(", "!", "result", ")", "{", "return", ";", "}", "resolve", "(", ")", ";", "}", ")", ".", "catch", "(", "reject", ")", ";", "}", ",", "interval", ")", ";", "}", ")", ",", "]", ")", ";", "}", "finally", "{", "if", "(", "timeoutTimer", ")", "{", "clearTimeout", "(", "timeoutTimer", ")", ";", "}", "if", "(", "pollTimeout", ")", "{", "clearInterval", "(", "pollTimeout", ")", ";", "}", "}", "}" ]
[ null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1252
[ "import", "expect", "from", "'expect'", ";", "import", "testEnv", ",", "{", "Browser", ",", "getTestEnv", ",", "WebDriverHost", "}", "from", "'../test-env'", ";", "import", "{", "poll", "}", "from", "'./utils'", ";", "async", "function", "createWindow", "(", ")", "{", "const", "{", "session", "}", "=", "testEnv", ";", "const", "handlesBefore", "=", "await", "session", ".", "getWindowHandles", "(", ")", ";", "await", "session", ".", "executeScript", "(", "`window.open()`", ")", ";", "const", "handlesAfter", "=", "await", "session", ".", "getWindowHandles", "(", ")", ";", "const", "newHandle", "=", "handlesAfter", ".", "find", "(", "(", "handle", ")", "=>", "!", "handlesBefore", ".", "includes", "(", "handle", ")", ")", ";", "if", "(", "!", "newHandle", ")", "{", "throw", "new", "Error", "(", "'Creating new Window was not successful'", ")", ";", "}", "await", "session", ".", "switchToWindow", "(", "newHandle", ")", ";", "return", "newHandle", ";", "}", "describe", "(", "'Command Contexts'", ",", "function", "(", ")", "{", "describe", "(", "'getWindowHandle'", ",", "function", "(", ")", "{", "it", "(", "'return the current window handle'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "handle", "=", "await", "session", ".", "getWindowHandle", "(", ")", ";", "expect", "(", "handle", ")", ".", "toMatch", "(", "/[a-zA-z0-9-]{2,}/", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'closeWindow'", ",", "function", "(", ")", "{", "it", "(", "'closes current browsing context'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "initialHandle", "=", "await", "session", ".", "getWindowHandle", "(", ")", ";", "const", "handlesBefore", "=", "await", "session", ".", "getWindowHandles", "(", ")", ";", "const", "newHandle", "=", "await", "createWindow", "(", ")", ";", "await", "session", ".", "closeWindow", "(", ")", ";", "const", "handlesAfter", "=", "await", "session", ".", "getWindowHandles", "(", ")", ";", "expect", "(", "handlesAfter", ")", ".", "toEqual", "(", "handlesBefore", ")", ";", "expect", "(", "handlesAfter", ")", ".", "not", ".", "toContain", "(", "newHandle", ")", ";", "await", "session", ".", "switchToWindow", "(", "initialHandle", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'switchToWindow'", ",", "function", "(", ")", "{", "it", "(", "'Switches to different browsing context'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "initialHandle", "=", "await", "session", ".", "getWindowHandle", "(", ")", ";", "expect", "(", "await", "session", ".", "getTitle", "(", ")", ")", ".", "not", ".", "toEqual", "(", "''", ")", ";", "const", "handle", "=", "await", "createWindow", "(", ")", ";", "await", "session", ".", "switchToWindow", "(", "handle", ")", ";", "expect", "(", "await", "session", ".", "getTitle", "(", ")", ")", ".", "toEqual", "(", "''", ")", ";", "await", "session", ".", "closeWindow", "(", ")", ";", "await", "session", ".", "switchToWindow", "(", "initialHandle", ")", ";", "}", ")", ";", "it", "(", "'throws error if called with not existing handle'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "let", "errorMessage", ";", "try", "{", "await", "session", ".", "switchToWindow", "(", "'not existing handle'", ")", ";", "}", "catch", "(", "e", ")", "{", "if", "(", "e", "instanceof", "Error", ")", "{", "errorMessage", "=", "e", ".", "message", ";", "}", "}", "expect", "(", "errorMessage", ")", ".", "toMatch", "(", "/no such window|Unable to locate window: not existing handle|No window found/", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'switchToFrame'", ",", "function", "(", ")", "{", "it", "(", "'switches browsing context to iframe specified by Element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "iframe", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'iframe'", ")", ";", "await", "session", ".", "switchToFrame", "(", "iframe", ")", ";", "const", "paragraph", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'p'", ")", ";", "expect", "(", "await", "paragraph", ".", "getText", "(", ")", ")", ".", "toEqual", "(", "'The content of the iframe'", ")", ";", "}", ")", ";", "it", "(", "'switches to top-level browsing context if null is provided'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "await", "session", ".", "switchToFrame", "(", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'iframe'", ")", ")", ";", "expect", "(", "await", "session", ".", "getPageSource", "(", ")", ")", ".", "not", ".", "toContain", "(", "'<iframe'", ")", ";", "await", "session", ".", "switchToFrame", "(", "null", ")", ";", "expect", "(", "await", "session", ".", "getPageSource", "(", ")", ")", ".", "toContain", "(", "'<iframe'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'switchToParentFrame'", ",", "function", "(", ")", "{", "it", "(", "'switches to parent browsing context '", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "await", "session", ".", "switchToFrame", "(", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'iframe'", ")", ")", ";", "expect", "(", "await", "session", ".", "getPageSource", "(", ")", ")", ".", "not", ".", "toContain", "(", "'<iframe'", ")", ";", "await", "session", ".", "switchToParentFrame", "(", ")", ";", "expect", "(", "await", "session", ".", "getPageSource", "(", ")", ")", ".", "toContain", "(", "'<iframe'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getWindowHandles'", ",", "function", "(", ")", "{", "it", "(", "'return all window handles'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "handles", "=", "await", "session", ".", "getWindowHandles", "(", ")", ";", "expect", "(", "handles", ")", ".", "toHaveLength", "(", "1", ")", ";", "expect", "(", "handles", "[", "0", "]", ")", ".", "toMatch", "(", "/[a-zA-z0-9-]{2,}/", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getWindowRect/maximizeWindow method'", ",", "function", "(", ")", "{", "it", "(", "'validates window rect before and after maximizing the window'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "driver", ",", "headless", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "driver", ".", "host", "===", "WebDriverHost", ".", "BrowserStack", "||", "headless", ")", "{", "return", ";", "}", "const", "rectBeforeMax", "=", "await", "session", ".", "getWindowRect", "(", ")", ";", "await", "session", ".", "maximizeWindow", "(", ")", ";", "const", "rectAfterMax", "=", "await", "session", ".", "getWindowRect", "(", ")", ";", "expect", "(", "rectBeforeMax", ")", ".", "not", ".", "toEqual", "(", "rectAfterMax", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'setWindowRect method'", ",", "function", "(", ")", "{", "it", "(", "'set current window to specified rect'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "testRect", "=", "{", "x", ":", "25", ",", "y", ":", "25", ",", "width", ":", "520", ",", "height", ":", "520", "}", ";", "await", "session", ".", "setWindowRect", "(", "testRect", ")", ";", "const", "rectAfterMax", "=", "await", "session", ".", "getWindowRect", "(", ")", ";", "expect", "(", "rectAfterMax", ")", ".", "toEqual", "(", "testRect", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'minimizeWindow method'", ",", "function", "(", ")", "{", "it", "(", "'minimizes the current window'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", ",", "headless", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "browser", "===", "Browser", ".", "Safari", "||", "headless", ")", "{", "return", ";", "}", "await", "session", ".", "minimizeWindow", "(", ")", ";", "await", "poll", "(", "{", "timeout", ":", "3000", ",", "predicate", ":", "(", ")", ":", "Promise", "<", "boolean", ">", "=>", "session", ".", "executeScript", "<", "boolean", ">", "(", "`return document.hidden`", ")", "}", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'fullScreenWindow method'", ",", "function", "(", ")", "{", "it", "(", "'increases the current window to full screen'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", ",", "headless", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "browser", "===", "Browser", ".", "Safari", "||", "headless", ")", "{", "return", ";", "}", "await", "session", ".", "fullScreenWindow", "(", ")", ";", "const", "{", "outerWidth", ",", "screenWidth", ",", "outerHeight", ",", "screenHeight", ",", "}", "=", "await", "session", ".", "executeScript", "<", "{", "outerWidth", ":", "number", ";", "screenWidth", ":", "number", ";", "outerHeight", ":", "number", ";", "screenHeight", ":", "number", ";", "}", ">", "(", "`\n return {\n outerWidth: window.outerWidth,\n screenWidth: screen.width,\n outerHeight: window.outerHeight,\n screenHeight: screen.height,\n }\n `", ")", ";", "expect", "(", "outerWidth", ")", ".", "toEqual", "(", "screenWidth", ")", ";", "expect", "(", "outerHeight", "-", "screenHeight", ")", ".", "toBeLessThan", "(", "50", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 20792, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 20792, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 20792, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1253
[ "import", "expect", "from", "'expect'", ";", "import", "{", "getTestEnv", "}", "from", "'../test-env'", ";", "describe", "(", "'Element Retrieval'", ",", "function", "(", ")", "{", "describe", "(", "'findElement method'", ",", "function", "(", ")", "{", "it", "(", "'finds element by CSS selector'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "element", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'h2'", ")", ";", "expect", "(", "element", ")", ".", "toBeDefined", "(", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'findElements method'", ",", "function", "(", ")", "{", "it", "(", "'finds all elements by CSS selector'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "elements", "=", "await", "session", ".", "findElements", "(", "'css selector'", ",", "'button'", ")", ";", "expect", "(", "elements", ")", ".", "toHaveLength", "(", "6", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'element findElement method'", ",", "function", "(", ")", "{", "it", "(", "'finds element by CSS selector'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "parent", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'h3'", ")", ";", "const", "element", "=", "await", "parent", ".", "findElement", "(", "'css selector'", ",", "'input'", ")", ";", "expect", "(", "element", ")", ".", "toBeDefined", "(", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'element findElements method'", ",", "function", "(", ")", "{", "it", "(", "'finds all elements by CSS selector'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "parent", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'.operations'", ")", ";", "const", "elements", "=", "await", "parent", ".", "findElements", "(", "'css selector'", ",", "'button'", ")", ";", "expect", "(", "elements", ")", ".", "toHaveLength", "(", "4", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getActiveElement method'", ",", "function", "(", ")", "{", "it", "(", "'returns the currently focused element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "a", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "await", "a", ".", "click", "(", ")", ";", "const", "element", "=", "await", "session", ".", "getActiveElement", "(", ")", ";", "expect", "(", "element", ".", "getWebElement", "(", ")", ")", ".", "toEqual", "(", "a", ".", "getWebElement", "(", ")", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1254
[ "import", "expect", "from", "'expect'", ";", "import", "{", "Browser", ",", "getTestEnv", "}", "from", "'../test-env'", ";", "describe", "(", "'Element State'", ",", "function", "(", ")", "{", "describe", "(", "'isSelected method'", ",", "function", "(", ")", "{", "it", "(", "'returns true for selected checkbox'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "checkBox", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#agree'", ")", ";", "await", "checkBox", ".", "click", "(", ")", ";", "const", "selected", "=", "await", "checkBox", ".", "isSelected", "(", ")", ";", "expect", "(", "selected", ")", ".", "toBe", "(", "true", ")", ";", "}", ")", ";", "it", "(", "'returns false for not selected checkbox'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "checkBox", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#agree'", ")", ";", "const", "selected", "=", "await", "checkBox", ".", "isSelected", "(", ")", ";", "expect", "(", "selected", ")", ".", "toBe", "(", "false", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getAttribute method'", ",", "function", "(", ")", "{", "it", "(", "'returns attribute of an element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "element", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#add'", ")", ";", "const", "elementAttribute", "=", "await", "element", ".", "getAttribute", "(", "'class'", ")", ";", "expect", "(", "elementAttribute", ")", ".", "toEqual", "(", "'test'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getProperty method'", ",", "function", "(", ")", "{", "it", "(", "'returns property of an element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "element", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#add'", ")", ";", "const", "elementProperty", "=", "await", "element", ".", "getProperty", "(", "'value'", ")", ";", "expect", "(", "elementProperty", ")", ".", "toEqual", "(", "'add'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getCssValue method'", ",", "function", "(", ")", "{", "it", "(", "'returns the provided style property of an element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#result'", ")", ";", "const", "displayMode", "=", "await", "result", ".", "getCssValue", "(", "'display'", ")", ";", "expect", "(", "displayMode", ")", ".", "toEqual", "(", "'flex'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getText method'", ",", "function", "(", ")", "{", "it", "(", "'returns text from element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "element", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'h2'", ")", ";", "const", "text", "=", "await", "element", ".", "getText", "(", ")", ";", "expect", "(", "text", ")", ".", "toEqual", "(", "'Simple calculator'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getTagName method'", ",", "function", "(", ")", "{", "it", "(", "'returns tagName of an element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "element", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#add'", ")", ";", "const", "elementTagName", "=", "await", "element", ".", "getTagName", "(", ")", ";", "if", "(", "[", "Browser", ".", "Safari", "]", ".", "includes", "(", "browser", ")", ")", "{", "expect", "(", "elementTagName", ")", ".", "toEqual", "(", "'BUTTON'", ")", ";", "}", "else", "{", "expect", "(", "elementTagName", ")", ".", "toEqual", "(", "'button'", ")", ";", "}", "}", ")", ";", "}", ")", ";", "describe", "(", "'getRect method'", ",", "function", "(", ")", "{", "it", "(", "'returns the dimensions and coordinates of an element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "box", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#fixed-box'", ")", ";", "const", "expectedRect", "=", "await", "session", ".", "executeScript", "(", "`\n var rect = arguments[0].getBoundingClientRect();\n return {\n x: rect.left + window.pageXOffset,\n y: rect.top + window.pageYOffset,\n width: rect.width,\n height: rect.height,\n };\n `", ",", "[", "box", "]", ")", ";", "const", "actualRect", "=", "await", "box", ".", "getRect", "(", ")", ";", "expect", "(", "actualRect", ")", ".", "toEqual", "(", "expectedRect", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'isEnabled method'", ",", "function", "(", ")", "{", "it", "(", "'returns true if input field is enabled'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "inputA", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "const", "selected", "=", "await", "inputA", ".", "isEnabled", "(", ")", ";", "expect", "(", "selected", ")", ".", "toBe", "(", "true", ")", ";", "}", ")", ";", "it", "(", "'returns false if input field is disabled'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "disabledInput", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#disabled'", ")", ";", "const", "selected", "=", "await", "disabledInput", ".", "isEnabled", "(", ")", ";", "expect", "(", "selected", ")", ".", "toBe", "(", "false", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 25951, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1255
[ "import", "expect", "from", "'expect'", ";", "import", "{", "getTestEnv", "}", "from", "'../test-env'", ";", "describe", "(", "'Element Interaction'", ",", "function", "(", ")", "{", "describe", "(", "'click method'", ",", "function", "(", ")", "{", "it", "(", "'simulates mouse click on element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "addButton", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#add'", ")", ";", "await", "addButton", ".", "click", "(", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#result'", ")", ";", "const", "text", "=", "await", "result", ".", "getText", "(", ")", ";", "expect", "(", "text", ")", ".", "toEqual", "(", "'NaN'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'clear method'", ",", "function", "(", ")", "{", "it", "(", "'clears the content of an element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "a", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "await", "a", ".", "sendKeys", "(", "'13'", ")", ";", "const", "b", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#b'", ")", ";", "await", "b", ".", "sendKeys", "(", "'7'", ")", ";", "await", "a", ".", "clear", "(", ")", ";", "const", "add", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#add'", ")", ";", "await", "add", ".", "click", "(", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#result'", ")", ";", "const", "resultText", "=", "await", "result", ".", "getText", "(", ")", ";", "expect", "(", "resultText", ")", ".", "toEqual", "(", "'NaN'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'sendKeys method'", ",", "function", "(", ")", "{", "it", "(", "'simulates typing in element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "a", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "await", "a", ".", "sendKeys", "(", "'13'", ")", ";", "const", "b", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#b'", ")", ";", "await", "b", ".", "sendKeys", "(", "'7'", ")", ";", "const", "add", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#add'", ")", ";", "await", "add", ".", "click", "(", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#result'", ")", ";", "const", "resultText", "=", "await", "result", ".", "getText", "(", ")", ";", "expect", "(", "resultText", ")", ".", "toEqual", "(", "'20'", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1256
[ "import", "expect", "from", "'expect'", ";", "import", "{", "Element", "}", "from", "'../src'", ";", "import", "{", "Browser", ",", "getTestEnv", "}", "from", "'../test-env'", ";", "describe", "(", "'Document Handling'", ",", "function", "(", ")", "{", "describe", "(", "'getPageSource method'", ",", "function", "(", ")", "{", "it", "(", "'get the current page source'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "result", "=", "await", "session", ".", "getPageSource", "(", ")", ";", "expect", "(", "result", ")", ".", "toContain", "(", "'<title>The simple calculator</title>'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'executeScript method'", ",", "function", "(", ")", "{", "it", "(", "'executes script in browser context'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "result", "=", "await", "session", ".", "executeScript", "<", "number", ">", "(", "'return arguments[0] * arguments[1]'", ",", "[", "3", ",", "5", "]", ")", ";", "expect", "(", "result", ")", ".", "toEqual", "(", "15", ")", ";", "}", ")", ";", "it", "(", "'supports passing element as arguments'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "aField", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "const", "id", "=", "await", "session", ".", "executeScript", "<", "number", ">", "(", "'return arguments[0].id'", ",", "[", "aField", "]", ")", ";", "expect", "(", "id", ")", ".", "toEqual", "(", "'a'", ")", ";", "}", ")", ";", "it", "(", "'supports passing elements as arguments'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "buttons", "=", "await", "session", ".", "findElements", "(", "'css selector'", ",", "'button'", ")", ";", "const", "result", "=", "await", "session", ".", "executeScript", "<", "number", ">", "(", "'return arguments[0][2].id'", ",", "[", "buttons", "]", ")", ";", "expect", "(", "result", ")", ".", "toEqual", "(", "'divide'", ")", ";", "}", ")", ";", "it", "(", "'supports passing nested datastructures containing elements as arguments'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "aField", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "const", "ids", "=", "await", "session", ".", "executeScript", "<", "number", ">", "(", "'return [arguments[0][0].id, arguments[1].a[1].b.id]'", ",", "[", "[", "aField", "]", ",", "{", "a", ":", "[", "0", ",", "{", "b", ":", "aField", "}", "]", "}", "]", ")", ";", "expect", "(", "ids", ")", ".", "toEqual", "(", "[", "'a'", ",", "'a'", "]", ")", ";", "}", ")", ";", "it", "(", "'supports receiving element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "aField", "=", "await", "session", ".", "executeScript", "<", "Element", ">", "(", "`return document.querySelector('#a')`", ")", ";", "expect", "(", "await", "aField", ".", "getProperty", "(", "'id'", ")", ")", ".", "toEqual", "(", "'a'", ")", ";", "}", ")", ";", "it", "(", "'supports receiving elements'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "buttons", "=", "await", "session", ".", "executeScript", "<", "Element", "[", "]", ">", "(", "`return document.querySelectorAll('button')`", ")", ";", "expect", "(", "await", "buttons", "[", "2", "]", ".", "getProperty", "(", "'id'", ")", ")", ".", "toEqual", "(", "'divide'", ")", ";", "}", ")", ";", "it", "(", "'supports receiving nested datastructures containing elements'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "result", "=", "await", "session", ".", "executeScript", "<", "[", "Element", "[", "]", ",", "{", "a", ":", "{", "b", ":", "Element", ";", "}", "[", "]", ";", "}", "]", ">", "(", "`\n var aField = document.querySelector('#a');\n return [[aField], { a: [0, { b: aField }] }];\n `", ")", ";", "expect", "(", "await", "result", "[", "0", "]", "[", "0", "]", ".", "getProperty", "(", "'id'", ")", ")", ".", "toEqual", "(", "'a'", ")", ";", "expect", "(", "await", "result", "[", "1", "]", ".", "a", "[", "1", "]", ".", "b", ".", "getProperty", "(", "'id'", ")", ")", ".", "toEqual", "(", "'a'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'executeAsyncScript method'", ",", "function", "(", ")", "{", "it", "(", "'executes asynchronous script in browser context'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "browser", "===", "Browser", ".", "InternetExplorer", ")", "{", "await", "session", ".", "setTimeouts", "(", "{", "script", ":", "30000", "}", ")", ";", "}", "const", "script", "=", "`\n var a = arguments[0];\n var b = arguments[1];\n var callback = arguments[arguments.length - 1];\n\n window.setTimeout(function () {\n callback(a * b);\n }, 1000);\n `", ";", "const", "result", "=", "await", "session", ".", "executeAsyncScript", "<", "number", ">", "(", "script", ",", "[", "3", ",", "5", "]", ")", ";", "expect", "(", "result", ")", ".", "toBe", "(", "15", ")", ";", "}", ")", ";", "}", ")", ";", "it", "(", "'supports passing elements as arguments'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "aField", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "const", "id", "=", "await", "session", ".", "executeAsyncScript", "<", "number", ">", "(", "'arguments[1](arguments[0][1].a.id)'", ",", "[", "[", "0", ",", "{", "a", ":", "aField", "}", "]", "]", ")", ";", "expect", "(", "id", ")", ".", "toBe", "(", "'a'", ")", ";", "}", ")", ";", "it", "(", "'supports receiving nested datastructures containing elements'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "result", "=", "await", "session", ".", "executeAsyncScript", "<", "[", "Element", ",", "{", "a", ":", "{", "b", ":", "Element", ";", "}", "[", "]", ";", "}", "]", ">", "(", "`\n var aField = document.querySelector('#a');\n arguments[0]([aField, { a: [0, { b: aField }] }]);\n `", ")", ";", "expect", "(", "await", "result", "[", "0", "]", ".", "getProperty", "(", "'id'", ")", ")", ".", "toEqual", "(", "'a'", ")", ";", "expect", "(", "await", "result", "[", "1", "]", ".", "a", "[", "1", "]", ".", "b", ".", "getProperty", "(", "'id'", ")", ")", ".", "toEqual", "(", "'a'", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1257
[ "import", "expect", "from", "'expect'", ";", "import", "{", "Browser", ",", "getTestEnv", "}", "from", "'../test-env'", ";", "const", "testCookie", "=", "{", "name", ":", "'test_cookie'", ",", "value", ":", "'test_value'", "}", ";", "describe", "(", "'Cookies'", ",", "function", "(", ")", "{", "describe", "(", "'addCookie/getAllCookies methods'", ",", "function", "(", ")", "{", "it", "(", "'adds and retrieves all cookies visible to the current page'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "browser", "===", "Browser", ".", "InternetExplorer", ")", "{", "return", ";", "}", "await", "session", ".", "addCookie", "(", "{", "...", "testCookie", ",", "expiry", ":", "Date", ".", "now", "(", ")", "+", "60000", "}", ")", ";", "const", "cookies", "=", "await", "session", ".", "getAllCookies", "(", ")", ";", "expect", "(", "cookies", ")", ".", "toEqual", "(", "[", "expect", ".", "objectContaining", "(", "{", "...", "testCookie", ",", "httpOnly", ":", "false", ",", "path", ":", "'/'", ",", "secure", ":", "false", "}", ")", "]", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getNamedCookie method'", ",", "function", "(", ")", "{", "it", "(", "'adds and retrieves a cookie by name'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "browser", "===", "Browser", ".", "InternetExplorer", ")", "{", "return", ";", "}", "await", "session", ".", "addCookie", "(", "testCookie", ")", ";", "const", "cookie", "=", "await", "session", ".", "getNamedCookie", "(", "'test_cookie'", ")", ";", "expect", "(", "cookie", ")", ".", "toEqual", "(", "expect", ".", "objectContaining", "(", "testCookie", ")", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'deleteCookie method'", ",", "function", "(", ")", "{", "it", "(", "'delete a cookie by name'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "browser", "===", "Browser", ".", "InternetExplorer", ")", "{", "return", ";", "}", "await", "session", ".", "addCookie", "(", "testCookie", ")", ";", "await", "session", ".", "deleteCookie", "(", "'test_cookie'", ")", ";", "const", "cookies", "=", "await", "session", ".", "getAllCookies", "(", ")", ";", "expect", "(", "cookies", ")", ".", "not", ".", "toEqual", "(", "[", "expect", ".", "objectContaining", "(", "testCookie", ")", "]", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'deleteAllCookies method'", ",", "function", "(", ")", "{", "it", "(", "'delete all cookies'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "browser", "===", "Browser", ".", "InternetExplorer", ")", "{", "return", ";", "}", "await", "session", ".", "addCookie", "(", "testCookie", ")", ";", "await", "session", ".", "deleteAllCookies", "(", ")", ";", "const", "cookies", "=", "await", "session", ".", "getAllCookies", "(", ")", ";", "expect", "(", "cookies", ".", "length", ")", ".", "toEqual", "(", "0", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1813, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1258
[ "import", "expect", "from", "'expect'", ";", "import", "{", "Key", "}", "from", "'../src'", ";", "import", "{", "Browser", ",", "getTestEnv", "}", "from", "'../test-env'", ";", "describe", "(", "'Actions'", ",", "function", "(", ")", "{", "describe", "(", "'performActions method'", ",", "function", "(", ")", "{", "it", "(", "'performs actions'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "b", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#b'", ")", ";", "const", "bCenter", "=", "await", "session", ".", "executeScript", "<", "{", "x", ":", "number", ";", "y", ":", "number", ";", "}", ">", "(", "`\n var rect = arguments[0].getBoundingClientRect();\n return {\n x: Math.round(rect.left + rect.width / 2),\n y: Math.round(rect.top + rect.height / 2)\n };\n `", ",", "[", "b", "]", ")", ";", "await", "session", ".", "performActions", "(", "[", "{", "type", ":", "'none'", ",", "id", ":", "'none_id'", ",", "actions", ":", "[", "{", "type", ":", "'pause'", ",", "duration", ":", "0", "}", "]", "}", ",", "{", "type", ":", "'pointer'", ",", "id", ":", "'click on b field'", ",", "actions", ":", "[", "{", "type", ":", "'pause'", ",", "duration", ":", "0", "}", ",", "{", "type", ":", "'pointerMove'", ",", "...", "bCenter", "}", ",", "{", "type", ":", "'pointerDown'", ",", "button", ":", "0", "}", ",", "{", "type", ":", "'pointerUp'", ",", "button", ":", "0", "}", "]", "}", "]", ")", ";", "await", "session", ".", "performActions", "(", "[", "{", "type", ":", "'key'", ",", "id", ":", "'type in 15'", ",", "actions", ":", "[", "{", "type", ":", "'pause'", ",", "duration", ":", "100", "}", ",", "{", "type", ":", "'keyDown'", ",", "value", ":", "'1'", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "'1'", "}", ",", "{", "type", ":", "'keyDown'", ",", "value", ":", "'5'", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "'5'", "}", "]", "}", "]", ")", ";", "await", "session", ".", "performActions", "(", "[", "{", "type", ":", "'pointer'", ",", "id", ":", "'click on a field'", ",", "actions", ":", "[", "{", "type", ":", "'pause'", ",", "duration", ":", "0", "}", ",", "{", "type", ":", "'pointerMove'", ",", "x", ":", "0", ",", "y", ":", "0", ",", "origin", ":", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", "}", ",", "{", "type", ":", "'pointerDown'", ",", "button", ":", "0", "}", ",", "{", "type", ":", "'pointerUp'", ",", "button", ":", "0", "}", "]", "}", "]", ")", ";", "await", "session", ".", "performActions", "(", "[", "{", "type", ":", "'key'", ",", "id", ":", "'type in 7'", ",", "actions", ":", "[", "{", "type", ":", "'keyDown'", ",", "value", ":", "'7'", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "'7'", "}", "]", "}", "]", ")", ";", "await", "session", ".", "performActions", "(", "[", "{", "type", ":", "'pointer'", ",", "id", ":", "'click on add button'", ",", "actions", ":", "[", "{", "type", ":", "'pointerMove'", ",", "x", ":", "1", ",", "y", ":", "1", ",", "origin", ":", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#add'", ")", "}", ",", "{", "type", ":", "'pointerDown'", ",", "button", ":", "0", "}", ",", "{", "type", ":", "'pointerUp'", ",", "button", ":", "0", "}", "]", ",", "parameters", ":", "{", "pointerType", ":", "'mouse'", "}", "}", "]", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#result'", ")", ";", "const", "resultText", "=", "await", "result", ".", "getText", "(", ")", ";", "expect", "(", "resultText", ")", ".", "toEqual", "(", "'22'", ")", ";", "}", ")", ";", "it", "(", "'handles special keys'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "aField", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "await", "aField", ".", "click", "(", ")", ";", "await", "session", ".", "performActions", "(", "[", "{", "type", ":", "'key'", ",", "id", ":", "'key id'", ",", "actions", ":", "[", "{", "type", ":", "'keyDown'", ",", "value", ":", "'a'", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "'a'", "}", ",", "{", "type", ":", "'keyDown'", ",", "value", ":", "'b'", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "'b'", "}", ",", "{", "type", ":", "'keyDown'", ",", "value", ":", "'c'", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "'c'", "}", ",", "{", "type", ":", "'keyDown'", ",", "value", ":", "Key", ".", "LEFT", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "Key", ".", "LEFT", "}", ",", "{", "type", ":", "'keyDown'", ",", "value", ":", "Key", ".", "LEFT", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "Key", ".", "LEFT", "}", ",", "{", "type", ":", "'keyDown'", ",", "value", ":", "Key", ".", "DELETE", "}", ",", "{", "type", ":", "'keyUp'", ",", "value", ":", "Key", ".", "DELETE", "}", "]", "}", "]", ")", ";", "const", "text", "=", "await", "aField", ".", "getProperty", "(", "'value'", ")", ";", "expect", "(", "text", ")", ".", "toEqual", "(", "'ac'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'releaseActions method'", ",", "function", "(", ")", "{", "it", "(", "'releases all the keys'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "aField", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#a'", ")", ";", "await", "aField", ".", "click", "(", ")", ";", "await", "session", ".", "performActions", "(", "[", "{", "type", ":", "'key'", ",", "id", ":", "'key id'", ",", "actions", ":", "[", "{", "type", ":", "'keyDown'", ",", "value", ":", "'a'", "}", "]", "}", "]", ")", ";", "await", "session", ".", "releaseActions", "(", ")", ";", "const", "text", "=", "await", "aField", ".", "getProperty", "(", "'value'", ")", ";", "expect", "(", "text", ")", ".", "toEqual", "(", "'a'", ")", ";", "}", ")", ";", "it", "(", "'releases all the pointer buttons'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "if", "(", "browser", "===", "Browser", ".", "InternetExplorer", "||", "browser", "===", "Browser", ".", "Safari", ")", "{", "return", ";", "}", "const", "agreeCheckbox", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#agree'", ")", ";", "await", "session", ".", "performActions", "(", "[", "{", "type", ":", "'pointer'", ",", "id", ":", "'pointer id'", ",", "actions", ":", "[", "{", "type", ":", "'pointerMove'", ",", "x", ":", "0", ",", "y", ":", "0", ",", "origin", ":", "agreeCheckbox", "}", ",", "{", "type", ":", "'pointerDown'", ",", "button", ":", "0", "}", "]", "}", "]", ")", ";", "await", "session", ".", "releaseActions", "(", ")", ";", "const", "selected", "=", "await", "agreeCheckbox", ".", "isSelected", "(", ")", ";", "expect", "(", "selected", ")", ".", "toBe", "(", "true", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1259
[ "import", "expect", "from", "'expect'", ";", "import", "{", "Browser", ",", "getTestEnv", "}", "from", "'../test-env'", ";", "describe", "(", "'User Prompts'", ",", "function", "(", ")", "{", "describe", "(", "'dismissAlert method'", ",", "function", "(", ")", "{", "it", "(", "'dismiss an alert in the current page'", ",", "async", "function", "(", ")", "{", "const", "{", "session", ",", "browser", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "alertButton", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#confirm'", ")", ";", "await", "alertButton", ".", "click", "(", ")", ";", "if", "(", "browser", "===", "Browser", ".", "Safari", ")", "{", "await", "new", "Promise", "(", "resolve", "=>", "setTimeout", "(", "resolve", ",", "3000", ")", ")", ";", "}", "await", "session", ".", "dismissAlert", "(", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#confirmResult'", ")", ";", "const", "resultText", "=", "await", "result", ".", "getText", "(", ")", ";", "expect", "(", "resultText", ")", ".", "toEqual", "(", "'No'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'acceptAlert method'", ",", "function", "(", ")", "{", "it", "(", "'accept an alert in the current page'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "alertButton", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#confirm'", ")", ";", "await", "alertButton", ".", "click", "(", ")", ";", "await", "session", ".", "acceptAlert", "(", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#confirmResult'", ")", ";", "const", "resultText", "=", "await", "result", ".", "getText", "(", ")", ";", "expect", "(", "resultText", ")", ".", "toEqual", "(", "'Yes'", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'getAlertText method'", ",", "function", "(", ")", "{", "it", "(", "'get text from an alert in the current page'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "alertButton", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#confirm'", ")", ";", "await", "alertButton", ".", "click", "(", ")", ";", "const", "alertText", "=", "await", "session", ".", "getAlertText", "(", ")", ";", "expect", "(", "alertText", ")", ".", "toEqual", "(", "'This is an alert for test'", ")", ";", "await", "session", ".", "acceptAlert", "(", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'sendAlertText method'", ",", "function", "(", ")", "{", "it", "(", "'Sets the text field of a prompt'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "alertButton", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#prompt'", ")", ";", "await", "alertButton", ".", "click", "(", ")", ";", "await", "session", ".", "sendAlertText", "(", "'Test'", ")", ";", "await", "session", ".", "acceptAlert", "(", ")", ";", "const", "result", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'#promptName'", ")", ";", "const", "resultText", "=", "await", "result", ".", "getText", "(", ")", ";", "expect", "(", "resultText", ")", ".", "toEqual", "(", "'Hello Test!'", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1260
[ "import", "expect", "from", "'expect'", ";", "import", "{", "getTestEnv", "}", "from", "'../test-env'", ";", "describe", "(", "'Screen Capture'", ",", "function", "(", ")", "{", "describe", "(", "'takeScreenshot method'", ",", "function", "(", ")", "{", "it", "(", "'takes a screenshot of the current page'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "screenshot", "=", "await", "session", ".", "takeScreenshot", "(", ")", ";", "expect", "(", "screenshot", ".", "toString", "(", "'base64'", ")", ")", ".", "toMatch", "(", "/^iVBOR/", ")", ";", "}", ")", ";", "}", ")", ";", "describe", "(", "'element takeScreenshot method'", ",", "function", "(", ")", "{", "it", "(", "'takes a screenshot of element'", ",", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "await", "getTestEnv", "(", "this", ")", ";", "const", "iframe", "=", "await", "session", ".", "findElement", "(", "'css selector'", ",", "'iframe'", ")", ";", "const", "screenshot", "=", "await", "iframe", ".", "takeScreenshot", "(", ")", ";", "expect", "(", "screenshot", ".", "toString", "(", "'base64'", ")", ")", ".", "toMatch", "(", "/^iVBOR/", ")", ";", "}", ")", ";", "}", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 12, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9, null, null, null, null, null, null, null, null, null, null, null, null, 12, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1261
[ "import", "browserstack", "from", "'browserstack-local'", ";", "import", "{", "execFile", "}", "from", "'child_process'", ";", "import", "{", "findAPortNotInUse", "}", "from", "'portscanner'", ";", "import", "waitOn", "from", "'wait-on'", ";", "import", "testEnv", ",", "{", "WebDriverHost", "}", "from", "'.'", ";", "import", "{", "log", "}", "from", "'../src/logger'", ";", "const", "browserStackInstance", "=", "new", "browserstack", ".", "Local", "(", ")", ";", "export", "async", "function", "startBrowserStackLocal", "(", ")", "{", "log", "(", "'Starting BrowserStack Local...'", ")", ";", "await", "new", "Promise", "<", "void", ">", "(", "(", "resolve", ")", "=>", "{", "browserStackInstance", ".", "start", "(", "{", "key", ":", "process", ".", "env", ".", "BROWSERSTACK_ACCESS_KEY", ",", "verbose", ":", "true", "}", ",", "(", ")", "=>", "{", "resolve", "(", ")", ";", "}", ")", ";", "}", ")", ";", "log", "(", "'BrowserStack Local started.'", ")", ";", "}", "export", "async", "function", "stopBrowserStackLocal", "(", ")", "{", "log", "(", "'Shutting down BrowserStack Local...'", ")", ";", "await", "new", "Promise", "<", "void", ">", "(", "(", "resolve", ")", "=>", "{", "browserStackInstance", ".", "stop", "(", "(", ")", "=>", "{", "resolve", "(", ")", ";", "}", ")", ";", "}", ")", ";", "log", "(", "'BrowserStack Local stopped.'", ")", ";", "}", "async", "function", "waitForBusyPort", "(", "port", ")", "{", "return", "new", "Promise", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "waitOn", "(", "{", "resources", ":", "[", "`tcp:127.0.0.1:${", "port", "}`", "]", ",", "timeout", ":", "5000", "}", ",", "(", "err", ")", "=>", "{", "if", "(", "err", ")", "{", "reject", "(", "err", ")", ";", "}", "else", "{", "resolve", "(", ")", ";", "}", "}", ")", ";", "}", ")", ";", "}", "async", "function", "waitForFreePort", "(", "port", ")", "{", "return", "new", "Promise", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "waitOn", "(", "{", "resources", ":", "[", "`tcp:127.0.0.1:${", "port", "}`", "]", ",", "reverse", ":", "true", ",", "timeout", ":", "5000", "}", ",", "(", "err", ")", "=>", "{", "if", "(", "err", ")", "{", "reject", "(", "err", ")", ";", "}", "else", "{", "resolve", "(", ")", ";", "}", "}", ")", ";", "}", ")", ";", "}", "export", "async", "function", "startDriver", "(", ")", "{", "const", "port", "=", "await", "findAPortNotInUse", "(", "3000", ",", "3050", ",", "'127.0.0.1'", ")", ";", "const", "{", "driver", "}", "=", "testEnv", ";", "process", ".", "env", ".", "WEB_DRIVER_PORT", "=", "port", ".", "toString", "(", ")", ";", "process", ".", "env", ".", "WEB_DRIVER_URL", "=", "driver", ".", "host", "===", "WebDriverHost", ".", "Localhost", "?", "`http://localhost:${", "port", "}`", ":", "driver", ".", "host", ";", "if", "(", "driver", ".", "host", "===", "WebDriverHost", ".", "BrowserStack", ")", "{", "await", "startBrowserStackLocal", "(", ")", ";", "return", ";", "}", "const", "{", "path", "=", "''", ",", "name", "}", "=", "driver", ";", "const", "childArgs", "=", "driver", ".", "args", "?.", "(", "{", "port", "}", ")", "??", "[", "]", ";", "const", "onClose", "=", "(", "code", ",", "signal", ")", ":", "void", "=>", "{", "if", "(", "code", "!==", "0", ")", "{", "return", ";", "}", "throw", "new", "Error", "(", "`Webdriver ${", "name", "} exited unexpectedly with code ${", "code", "} and signal ${", "signal", "}.`", ")", ";", "}", ";", "const", "onOut", "=", "(", "chunk", ")", ":", "void", "=>", "{", "log", "(", "chunk", ")", ";", "}", ";", "log", "(", "`Starting ${", "name", "} ${", "path", "} ${", "childArgs", ".", "join", "(", "' '", ")", "}`", ")", ";", "const", "instance", "=", "execFile", "(", "path", ",", "childArgs", ")", ";", "if", "(", "!", "instance", ".", "stdout", "||", "!", "instance", ".", "stderr", ")", "{", "throw", "new", "Error", "(", "`Unable to get output from ${", "name", "} ${", "path", "} ${", "childArgs", ".", "join", "(", "' '", ")", "}`", ")", ";", "}", "instance", ".", "stdout", ".", "on", "(", "'data'", ",", "onOut", ")", ";", "instance", ".", "stderr", ".", "on", "(", "'data'", ",", "onOut", ")", ";", "instance", ".", "on", "(", "'close'", ",", "onClose", ")", ";", "await", "waitForBusyPort", "(", "port", ")", ";", "log", "(", "`${", "name", "} started on port ${", "port", "}`", ")", ";", "driver", ".", "instance", "=", "instance", ";", "}", "export", "async", "function", "stopDriver", "(", ")", "{", "const", "{", "driver", "}", "=", "testEnv", ";", "const", "port", "=", "parseInt", "(", "process", ".", "env", ".", "WEB_DRIVER_PORT", "||", "''", ")", ";", "if", "(", "driver", ".", "host", "===", "WebDriverHost", ".", "BrowserStack", ")", "{", "await", "stopBrowserStackLocal", "(", ")", ";", "return", ";", "}", "const", "{", "name", ",", "instance", "}", "=", "driver", ";", "log", "(", "`Shutting down ${", "name", "}`", ")", ";", "if", "(", "instance", ")", "{", "instance", ".", "kill", "(", ")", ";", "await", "waitForFreePort", "(", "port", ")", ";", "log", "(", "`${", "name", "} stopped on port ${", "port", "}`", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 9177, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 3, null, null, null, null, null, null, null, 4, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 3, null, null, null, null, null, null, null, 4, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, 3, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 442, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1262
[ "import", "fs", "from", "'fs'", ";", "import", "http", "from", "'http'", ";", "import", "path", "from", "'path'", ";", "import", "{", "findAPortNotInUse", "}", "from", "'portscanner'", ";", "import", "url", "from", "'url'", ";", "import", "{", "log", "}", "from", "'../src/logger'", ";", "const", "mimeTypes", "=", "{", "html", ":", "'text/html'", ",", "jpeg", ":", "'image/jpeg'", ",", "jpg", ":", "'image/jpeg'", ",", "png", ":", "'image/png'", ",", "js", ":", "'text/javascript'", ",", "css", ":", "'text/css'", "}", ";", "const", "server", "=", "http", ".", "createServer", "(", "(", "req", ",", "res", ")", "=>", "{", "let", "uri", "=", "url", ".", "parse", "(", "req", ".", "url", "as", "string", ")", ".", "pathname", "as", "string", ";", "if", "(", "uri", "===", "'/'", ")", "uri", "=", "'/testApp.html'", ";", "const", "filename", "=", "path", ".", "join", "(", "__dirname", ",", "uri", ")", ";", "fs", ".", "exists", "(", "filename", ",", "(", "exists", ")", "=>", "{", "if", "(", "!", "exists", ")", "{", "res", ".", "writeHead", "(", "404", ",", "{", "'Content-Type'", ":", "'text/plain'", "}", ")", ";", "res", ".", "write", "(", "'404 Not Found\\n'", ")", ";", "res", ".", "end", "(", ")", ";", "return", ";", "}", "const", "mimeType", "=", "mimeTypes", "[", "path", ".", "extname", "(", "filename", ")", ".", "split", "(", "'.'", ")", "[", "1", "]", "]", ";", "res", ".", "writeHead", "(", "200", ",", "{", "'Content-Type'", ":", "mimeType", "}", ")", ";", "const", "fileStream", "=", "fs", ".", "createReadStream", "(", "filename", ")", ";", "fileStream", ".", "pipe", "(", "res", ")", ";", "}", ")", ";", "}", ")", ";", "export", "async", "function", "startTestApp", "(", ")", "{", "const", "port", "=", "await", "findAPortNotInUse", "(", "3000", ",", "3050", ",", "'127.0.0.1'", ")", ";", "process", ".", "env", ".", "TEST_APP_PORT", "=", "port", ".", "toString", "(", ")", ";", "await", "new", "Promise", "<", "void", ">", "(", "(", "resolve", ")", "=>", "{", "server", ".", "listen", "(", "port", ",", "resolve", ")", ";", "}", ")", ";", "log", "(", "`Test app started on port ${", "port", "}`", ")", ";", "}", "export", "async", "function", "stopTestApp", "(", ")", "{", "await", "new", "Promise", "(", "(", "resolve", ")", "=>", "{", "server", ".", "close", "(", "resolve", ")", ";", "}", ")", ";", "}", "if", "(", "require", ".", "main", "===", "module", ")", "{", "startTestApp", "(", ")", ".", "catch", "(", "(", "err", ")", "=>", "{", "log", "(", "err", ")", ";", "}", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 234, null, null, null, null, null, null, 300, null, 528, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1027, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1263
[ "import", "{", "mkdirSync", ",", "writeFileSync", "}", "from", "'fs'", ";", "import", "{", "dirname", ",", "resolve", "}", "from", "'path'", ";", "import", "{", "newSession", "}", "from", "'../src'", ";", "import", "{", "log", "}", "from", "'../src/logger'", ";", "import", "testEnv", "from", "'../test-env'", ";", "import", "{", "startDriver", ",", "stopDriver", "}", "from", "'../test-env/browserDriver'", ";", "import", "{", "startTestApp", ",", "stopTestApp", "}", "from", "'../test-env/testApp'", ";", "type", "Test", "=", "Mocha", ".", "Test", "&", "{", "consoleOutputs", ":", "string", "[", "]", ";", "consoleErrors", ":", "string", "[", "]", ";", "}", ";", "log", ".", "enabled", "=", "true", ";", "let", "currentTest", ";", "const", "originalLogFunction", "=", "process", ".", "stdout", ".", "write", ".", "bind", "(", "process", ".", "stdout", ")", ";", "const", "originalErrorFunction", "=", "process", ".", "stderr", ".", "write", ".", "bind", "(", "process", ".", "stderr", ")", ";", "process", ".", "stdout", ".", "write", "=", "(", "message", ")", ":", "boolean", "=>", "{", "if", "(", "currentTest", ")", "{", "currentTest", ".", "consoleOutputs", "=", "[", "...", "(", "currentTest", "?.", "consoleOutputs", "??", "[", "]", ")", ",", "message", ",", "]", ";", "}", "return", "originalLogFunction", "(", "message", ")", ";", "}", ";", "process", ".", "stderr", ".", "write", "=", "(", "message", ")", ":", "boolean", "=>", "{", "if", "(", "currentTest", ")", "{", "currentTest", ".", "consoleErrors", "=", "[", "...", "(", "currentTest", "?.", "consoleErrors", "??", "[", "]", ")", ",", "message", ",", "]", ";", "}", "return", "originalErrorFunction", "(", "message", ")", ";", "}", ";", "before", "(", "async", "function", "(", ")", "{", "await", "startDriver", "(", ")", ";", "await", "startTestApp", "(", ")", ";", "}", ")", ";", "before", "(", "async", "function", "(", ")", "{", "const", "{", "driver", ",", "capabilities", ",", "desiredCapabilities", ",", "setInitialWindowRectangle", ",", "}", "=", "testEnv", ";", "const", "url", "=", "process", ".", "env", ".", "WEB_DRIVER_URL", "||", "''", ";", "log", "(", "`Creating session on ${", "url", "}.`", ")", ";", "try", "{", "testEnv", ".", "session", "=", "await", "newSession", "(", "{", "url", ",", "...", "(", "capabilities", "&&", "{", "capabilities", "}", ")", ",", "...", "(", "desiredCapabilities", "&&", "{", "desiredCapabilities", "}", ")", ",", "headers", ":", "driver", ".", "headers", "}", ")", ";", "log", "(", "`Session created.`", ")", ";", "}", "catch", "(", "error", ")", "{", "log", "(", "error", ")", ";", "throw", "error", ";", "}", "if", "(", "setInitialWindowRectangle", ")", "{", "setInitialWindowRectangle", "(", "await", "testEnv", ".", "session", ".", "getWindowRect", "(", ")", ")", ";", "}", "}", ")", ";", "beforeEach", "(", "function", "(", ")", "{", "currentTest", "=", "this", ".", "currentTest", "as", "Test", ";", "}", ")", ";", "afterEach", "(", "async", "function", "(", ")", "{", "if", "(", "this", ".", "currentTest", "?.", "state", "===", "'failed'", ")", "{", "const", "{", "session", ",", "testName", "}", "=", "testEnv", ";", "if", "(", "!", "testName", ")", "{", "return", ";", "}", "const", "screenshot", "=", "await", "session", ".", "takeScreenshot", "(", ")", ";", "const", "fileName", "=", "resolve", "(", "__dirname", ",", "`../screenshots/${", "testName", "}.png`", ")", ";", "try", "{", "mkdirSync", "(", "dirname", "(", "fileName", ")", ")", ";", "}", "catch", "{", "}", "writeFileSync", "(", "fileName", ",", "screenshot", ",", "'base64'", ")", ";", "}", "}", ")", ";", "after", "(", "async", "function", "(", ")", "{", "const", "{", "session", "}", "=", "testEnv", ";", "const", "url", "=", "process", ".", "env", ".", "WEB_DRIVER_URL", ";", "if", "(", "!", "url", ")", "{", "return", ";", "}", "log", "(", "`Deleting session on ${", "url", "}.`", ")", ";", "try", "{", "await", "session", ".", "close", "(", ")", ";", "}", "catch", "{", "}", "log", "(", "`Session deleted.`", ")", ";", "}", ")", ";", "after", "(", "async", "function", "(", ")", "{", "await", "stopDriver", "(", ")", ";", "await", "stopTestApp", "(", ")", ";", "}", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 161, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 12, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1264
[ "declare", "module", "'geckodriver'", "{", "export", "const", "path", ";", "}", "declare", "module", "'iedriver'", "{", "export", "const", "path", ";", "export", "const", "path32", ";", "export", "const", "path64", ";", "}" ]
[ null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, 2, null, null, null, 2, null, null, null, 2, null, null ]
1265
[ "license", "/**\n * This is a simple pattern to provide a readonly view of a normal javascript\n * collection. Note that this trades performance for protection. There's nothing\n * stoping a user from mutating one of these data structures, save a warning\n * that the typescript compiler may give them.\n *\n * Other options to consider are facebook's Immutable.js which provides a\n * variety of truely immutable data structures.\n */", "/** A zero-overhead immutable view of an array. */", "export", "declare", "type", "ImmutableArray", "<", "V", ">", "=", "ReadonlyArray", "<", "V", ">", ";", "/** A zero-overhead immutable view of a set. */", "export", "declare", "type", "ImmutableSet", "<", "V", ">", "=", "ReadonlySet", "<", "V", ">", ";", "/** A zero-overhead immutable view of a map. */", "export", "declare", "type", "ImmutableMap", "<", "K", ",", "V", ">", "=", "ReadonlyMap", "<", "K", ",", "V", ">", ";", "export", "function", "asImmutable", "<", "V", ">", "(", "array", ")", ";", "export", "function", "asImmutable", "<", "V", ">", "(", "set", ")", ";", "export", "function", "asImmutable", "<", "K", ",", "V", ">", "(", "map", ")", ";", "export", "function", "asImmutable", "<", "O", "extends", "object", ">", "(", "object", ")", ";", "export", "function", "asImmutable", "(", "x", ")", "{", "return", "x", ";", "}", "/**\n * Take care, this function is inherently unsafe.\n *\n * You're taking a data structure that has been declare as immutable and getting\n * a mutable reference to it.\n */", "export", "function", "unsafeAsMutable", "<", "V", ">", "(", "array", ")", ";", "export", "function", "unsafeAsMutable", "<", "V", ">", "(", "set", ")", ";", "export", "function", "unsafeAsMutable", "<", "K", ",", "V", ">", "(", "map", ")", ";", "export", "function", "unsafeAsMutable", "<", "O", "extends", "object", ">", "(", "object", ")", ";", "export", "function", "unsafeAsMutable", "(", "x", ")", "{", "return", "x", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, 13, null, null, null, null, 5993, null, null, null, null, 30, null, null, null, null, 13020, null, null, null, null, null, null, 19, null, null, null, null, 51, null, null, null, null, null, null, 424, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, 13, null, null, null, null, 0, null, null, null, null, 30, null, null, null, null, 5993, null, null, null, null, 19, null, null, null, null, null, null, 13020, null, null, null, null, 424, null, null, null, null, null, null, 51, null, null, null, null, 6, null, null, null, null, null, null, null, null ]
1266
[ "license", "import", "{", "NodePath", "}", "from", "'@babel/traverse'", ";", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "*", "as", "doctrine", "from", "'doctrine'", ";", "import", "{", "Annotation", ",", "Tag", "}", "from", "'doctrine'", ";", "import", "{", "Demo", ",", "FileRelativeUrl", "}", "from", "'../index'", ";", "import", "{", "Privacy", "}", "from", "'../model/model'", ";", "import", "{", "ScannedReference", ",", "Severity", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'./javascript-document'", ";", "export", "{", "Annotation", ",", "Tag", "}", "from", "'doctrine'", ";", "/**\n * Given a JSDoc string (minus opening/closing comment delimiters), extract its\n * description and tags.\n */", "export", "function", "parseJsdoc", "(", "docs", ")", "{", "docs", "=", "removeLeadingAsterisks", "(", "docs", ")", ";", "const", "d", "=", "doctrine", ".", "parse", "(", "docs", ",", "{", "unwrap", ":", "false", ",", "preserveWhitespace", ":", "true", ",", "}", ")", ";", "const", "description", "=", "d", ".", "description", "&&", "d", ".", "description", ".", "replace", "(", "/^\\n+|\\n+$/g", ",", "''", ")", ";", "return", "{", "description", ",", "tags", ":", "parseCustomTags", "(", "d", ".", "tags", ")", "}", ";", "}", "const", "tagsWithNames", "=", "new", "Set", "(", "[", "'appliesMixin'", ",", "'demo'", ",", "'hero'", ",", "'mixinFunction'", ",", "'polymerBehavior'", ",", "'pseudoElement'", "]", ")", ";", "const", "firstWordAndRest", "=", "/^\\s*(\\S*)\\s*(.*)$/", ";", "function", "parseCustomTags", "(", "tags", ")", "{", "return", "tags", ".", "map", "(", "(", "tag", ")", ":", "Tag", "=>", "{", "if", "(", "tag", ".", "description", "!=", "null", "&&", "tagsWithNames", ".", "has", "(", "tag", ".", "title", ")", ")", "{", "const", "match", "=", "firstWordAndRest", ".", "exec", "(", "tag", ".", "description", ")", ";", "if", "(", "match", "!=", "null", ")", "{", "const", "name", "=", "match", "[", "1", "]", ";", "const", "description", "=", "match", "[", "2", "]", ";", "return", "{", "...", "tag", ",", "name", ",", "description", ",", "}", ";", "}", "}", "return", "tag", ";", "}", ")", ";", "}", "/**\n * removes leading *, and any space before it\n */", "export", "function", "removeLeadingAsterisks", "(", "description", ")", "{", "return", "description", ".", "split", "(", "'\\n'", ")", ".", "map", "(", "function", "(", "line", ")", "{", "const", "match", "=", "line", ".", "trim", "(", ")", ".", "match", "(", "/^[\\s]*\\*\\s?(.*)$/", ")", ";", "return", "match", "?", "match", "[", "1", "]", ":", "line", ";", "}", ")", ".", "join", "(", "'\\n'", ")", ";", "}", "export", "function", "hasTag", "(", "jsdoc", ",", "title", ")", "{", "return", "getTag", "(", "jsdoc", ",", "title", ")", "!==", "undefined", ";", "}", "/**\n * Finds the first JSDoc tag matching `title`.\n */", "export", "function", "getTag", "(", "jsdoc", ",", "title", ")", "{", "return", "jsdoc", "&&", "jsdoc", ".", "tags", "&&", "jsdoc", ".", "tags", ".", "find", "(", "(", "t", ")", "=>", "t", ".", "title", "===", "title", ")", ";", "}", "export", "function", "unindent", "(", "text", ")", "{", "if", "(", "!", "text", ")", "return", "text", ";", "const", "lines", "=", "text", ".", "replace", "(", "/\\t/g", ",", "' '", ")", ".", "split", "(", "'\\n'", ")", ";", "const", "indent", "=", "lines", ".", "reduce", "<", "number", ">", "(", "function", "(", "prev", ",", "line", ")", "{", "if", "(", "/^\\s*$/", ".", "test", "(", "line", ")", ")", "return", "prev", ";", "const", "lineIndent", "=", "line", ".", "match", "(", "/^(\\s*)/", ")", "!", "[", "0", "]", ".", "length", ";", "if", "(", "prev", "===", "null", ")", "return", "lineIndent", ";", "return", "lineIndent", "<", "prev", "?", "lineIndent", ":", "prev", ";", "}", ",", "0", ")", ";", "return", "lines", ".", "map", "(", "function", "(", "l", ")", "{", "return", "l", ".", "substr", "(", "indent", ")", ";", "}", ")", ".", "join", "(", "'\\n'", ")", ";", "}", "export", "function", "isAnnotationEmpty", "(", "docs", ")", "{", "return", "docs", "===", "undefined", "||", "docs", ".", "tags", ".", "length", "===", "0", "&&", "docs", ".", "description", ".", "trim", "(", ")", "===", "''", ";", "}", "const", "privacyTags", "=", "new", "Set", "(", "[", "'public'", ",", "'private'", ",", "'protected'", "]", ")", ";", "export", "function", "getPrivacy", "(", "jsdoc", ")", "{", "return", "jsdoc", "&&", "jsdoc", ".", "tags", "&&", "jsdoc", ".", "tags", ".", "filter", "(", "(", "t", ")", "=>", "privacyTags", ".", "has", "(", "t", ".", "title", ")", ")", ".", "map", "(", "(", "t", ")", "=>", "t", ".", "title", "as", "Privacy", ")", "[", "0", "]", ";", "}", "/**\n * Returns the mixin applications, in the form of ScannedReferences, for the\n * jsdocs of class.\n *\n * The references are returned in presumed order of application - from furthest\n * up the prototype chain to closest to the subclass.\n */", "export", "function", "getMixinApplications", "(", "document", ",", "node", ",", "docs", ",", "warnings", ",", "path", ")", "{", "const", "appliesMixinAnnotations", "=", "docs", ".", "tags", "!", ".", "filter", "(", "(", "tag", ")", "=>", "tag", ".", "title", "===", "'appliesMixin'", "||", "tag", ".", "title", "===", "'mixes'", ")", ";", "return", "appliesMixinAnnotations", ".", "map", "(", "(", "annotation", ")", "=>", "{", "const", "mixinId", "=", "annotation", ".", "name", ";", "const", "sourceRange", "=", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ";", "if", "(", "mixinId", "===", "undefined", ")", "{", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "code", ":", "'class-mixes-annotation-no-id'", ",", "message", ":", "'@appliesMixin annotation with no identifier. Usage `@appliesMixin MixinName`'", ",", "severity", ":", "Severity", ".", "WARNING", ",", "sourceRange", ",", "parsedDocument", ":", "document", "}", ")", ")", ";", "return", ";", "}", "return", "new", "ScannedReference", "(", "'element-mixin'", ",", "mixinId", ",", "sourceRange", ",", "undefined", ",", "path", ")", ";", "}", ")", ".", "filter", "(", "(", "m", ")", "=>", "m", "!==", "undefined", ")", "as", "Array", "<", "ScannedReference", "<", "'element-mixin'", ">", ">", ";", "}", "export", "function", "extractDemos", "(", "jsdoc", ")", "{", "if", "(", "!", "jsdoc", "||", "!", "jsdoc", ".", "tags", ")", "{", "return", "[", "]", ";", "}", "const", "demos", "=", "[", "]", ";", "const", "demoUrls", "=", "new", "Set", "<", "FileRelativeUrl", ">", "(", ")", ";", "for", "(", "const", "tag", "of", "jsdoc", ".", "tags", ".", "filter", "(", "(", "tag", ")", "=>", "tag", ".", "title", "===", "'demo'", "&&", "tag", ".", "name", ")", ")", "{", "const", "demoUrl", "=", "tag", ".", "name", "!", "as", "FileRelativeUrl", ";", "if", "(", "demoUrls", ".", "has", "(", "demoUrl", ")", ")", "{", "continue", ";", "}", "demoUrls", ".", "add", "(", "demoUrl", ")", ";", "demos", ".", "push", "(", "{", "desc", ":", "tag", ".", "description", "||", "undefined", ",", "path", ":", "demoUrl", ",", "}", ")", ";", "}", "return", "demos", ";", "}", "export", "function", "join", "(", "...", "jsdocs", ")", "{", "return", "{", "description", ":", "jsdocs", ".", "map", "(", "(", "jsdoc", ")", "=>", "jsdoc", "&&", "jsdoc", ".", "description", "||", "''", ")", ".", "join", "(", "'\\n\\n'", ")", ".", "trim", "(", ")", ",", "tags", ":", "jsdocs", ".", "map", "(", "(", "jsdoc", ")", "=>", "jsdoc", "&&", "jsdoc", ".", "tags", "||", "[", "]", ")", ".", "reduce", "(", "(", "acc", ",", "tags", ")", "=>", "acc", ".", "concat", "(", "tags", ")", ")", ",", "}", ";", "}", "/**\n * Assume that if the same symbol is documented in multiple places, the longer\n * description is probably the intended one.\n *\n * TODO(rictic): unify logic with join(...)'s above.\n */", "export", "function", "pickBestDescription", "(", "...", "descriptions", ")", "{", "let", "description", "=", "''", ";", "for", "(", "const", "desc", "of", "descriptions", ")", "{", "if", "(", "desc", "&&", "desc", ".", "length", ">", "description", ".", "length", ")", "{", "description", "=", "desc", ";", "}", "}", "return", "description", ";", "}", "/**\n * Extracts the description from a jsdoc annotation and uses\n * known descriptive tags if no explicit description is set.\n */", "export", "function", "getDescription", "(", "jsdocAnn", ")", "{", "if", "(", "jsdocAnn", ".", "description", ")", "{", "return", "jsdocAnn", ".", "description", ";", "}", "const", "tagSet", "=", "new", "Set", "(", "[", "'public'", ",", "'private'", ",", "'protected'", ",", "'type'", "]", ")", ";", "for", "(", "const", "tag", "of", "jsdocAnn", ".", "tags", ")", "{", "if", "(", "tagSet", ".", "has", "(", "tag", ".", "title", ")", "&&", "tag", ".", "description", ")", "{", "return", "tag", ".", "description", ";", "}", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 2, null, null, null, null, null, null, null, null, null, null, 1066, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 27, null, null, null, null, 5, null, 5, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 86, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, 63, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 1066, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, 1066, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, 3, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 1066, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 31915, null, 1066, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 13, null, 6782, null, 4788, null, 1066, null, 5, null, 224, null, null, null, 5, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, 2, null, null, null, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 17341, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 1066, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7135, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1066, null, null, 13, null, null, null, null, null, null, null, null, null, null, null, 1066, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1066, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, 13, null, null, null, 2, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 1066, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1267
[ "license", "import", "{", "SourceRange", "}", "from", "'../model/model'", ";", "import", "{", "ParsedDocument", "}", "from", "'../parser/document'", ";", "export", "type", "Json", "=", "JsonObject", "|", "JsonArray", "|", "number", "|", "string", "|", "boolean", "|", "null", ";", "export", "interface", "JsonObject", "{", "[", "key", "]", ":", "Json", ";", "}", "export", "interface", "JsonArray", "extends", "Array", "<", "Json", ">", "{", "}", "export", "interface", "Visitor", "{", "visit", "(", "node", ")", ":", "void", ";", "}", "export", "class", "ParsedJsonDocument", "extends", "ParsedDocument", "<", "Json", ",", "Visitor", ">", "{", "readonly", "type", "=", "'json'", ";", "visit", "(", "visitors", ")", "{", "this", ".", "_visit", "(", "this", ".", "ast", ",", "visitors", ")", ";", "}", "private", "_visit", "(", "node", ",", "visitors", ")", "{", "for", "(", "const", "visitor", "of", "visitors", ")", "{", "visitor", ".", "visit", "(", "node", ")", ";", "}", ";", "if", "(", "Array", ".", "isArray", "(", "node", ")", ")", "{", "for", "(", "const", "value", "of", "node", ")", "{", "this", ".", "_visit", "(", "value", ",", "visitors", ")", ";", "}", "}", "else", "if", "(", "typeof", "node", "===", "'object'", "&&", "node", "!==", "null", ")", "{", "for", "(", "const", "value", "of", "Object", ".", "values", "(", "node", ")", ")", "{", "this", ".", "_visit", "(", "value", ",", "visitors", ")", ";", "}", "}", "}", "protected", "_sourceRangeForNode", "(", "_node", ")", "{", "throw", "new", "Error", "(", "'Not Implemented.'", ")", ";", "}", "stringify", "(", ")", "{", "return", "JSON", ".", "stringify", "(", "this", ".", "ast", ",", "null", ",", "2", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1005, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 1005, null, 5, null, null, null, null, null, 953, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1005, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1005, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 1005, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1268
[ "license", "import", "*", "as", "ts", "from", "'typescript'", ";", "export", "abstract", "class", "Visitor", "{", "visitNode", "(", "node", ")", "{", "switch", "(", "node", ".", "kind", ")", "{", "case", "ts", ".", "SyntaxKind", ".", "AnyKeyword", ":", "this", ".", "visitAnyKeyword", "(", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ArrayBindingPattern", ":", "this", ".", "visitBindingPattern", "(", "<", "ts", ".", "BindingPattern", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ArrayLiteralExpression", ":", "this", ".", "visitArrayLiteralExpression", "(", "<", "ts", ".", "ArrayLiteralExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ArrayType", ":", "this", ".", "visitArrayType", "(", "<", "ts", ".", "ArrayTypeNode", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ArrowFunction", ":", "this", ".", "visitArrowFunction", "(", "<", "ts", ".", "FunctionLikeDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "BinaryExpression", ":", "this", ".", "visitBinaryExpression", "(", "<", "ts", ".", "BinaryExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "BindingElement", ":", "this", ".", "visitBindingElement", "(", "<", "ts", ".", "BindingElement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "Block", ":", "this", ".", "visitBlock", "(", "<", "ts", ".", "Block", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "BreakStatement", ":", "this", ".", "visitBreakStatement", "(", "<", "ts", ".", "BreakOrContinueStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "CallExpression", ":", "this", ".", "visitCallExpression", "(", "<", "ts", ".", "CallExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "CallSignature", ":", "this", ".", "visitCallSignature", "(", "<", "ts", ".", "SignatureDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "CaseClause", ":", "this", ".", "visitCaseClause", "(", "<", "ts", ".", "CaseClause", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ClassDeclaration", ":", "this", ".", "visitClassDeclaration", "(", "<", "ts", ".", "ClassDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ClassExpression", ":", "this", ".", "visitClassExpression", "(", "<", "ts", ".", "ClassExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "CatchClause", ":", "this", ".", "visitCatchClause", "(", "<", "ts", ".", "CatchClause", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ConditionalExpression", ":", "this", ".", "visitConditionalExpression", "(", "<", "ts", ".", "ConditionalExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ConstructSignature", ":", "this", ".", "visitConstructSignature", "(", "<", "ts", ".", "ConstructSignatureDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "Constructor", ":", "this", ".", "visitConstructorDeclaration", "(", "<", "ts", ".", "ConstructorDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ConstructorType", ":", "this", ".", "visitConstructorType", "(", "<", "ts", ".", "FunctionOrConstructorTypeNode", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ContinueStatement", ":", "this", ".", "visitContinueStatement", "(", "<", "ts", ".", "BreakOrContinueStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "DebuggerStatement", ":", "this", ".", "visitDebuggerStatement", "(", "<", "ts", ".", "Statement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "DefaultClause", ":", "this", ".", "visitDefaultClause", "(", "<", "ts", ".", "DefaultClause", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "DoStatement", ":", "this", ".", "visitDoStatement", "(", "<", "ts", ".", "DoStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ElementAccessExpression", ":", "this", ".", "visitElementAccessExpression", "(", "<", "ts", ".", "ElementAccessExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "EnumDeclaration", ":", "this", ".", "visitEnumDeclaration", "(", "<", "ts", ".", "EnumDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ExportAssignment", ":", "this", ".", "visitExportAssignment", "(", "<", "ts", ".", "ExportAssignment", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ExpressionStatement", ":", "this", ".", "visitExpressionStatement", "(", "<", "ts", ".", "ExpressionStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ForStatement", ":", "this", ".", "visitForStatement", "(", "<", "ts", ".", "ForStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ForInStatement", ":", "this", ".", "visitForInStatement", "(", "<", "ts", ".", "ForInStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ForOfStatement", ":", "this", ".", "visitForOfStatement", "(", "<", "ts", ".", "ForOfStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "FunctionDeclaration", ":", "this", ".", "visitFunctionDeclaration", "(", "<", "ts", ".", "FunctionDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "FunctionExpression", ":", "this", ".", "visitFunctionExpression", "(", "<", "ts", ".", "FunctionExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "FunctionType", ":", "this", ".", "visitFunctionType", "(", "<", "ts", ".", "FunctionOrConstructorTypeNode", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "GetAccessor", ":", "this", ".", "visitGetAccessor", "(", "<", "ts", ".", "AccessorDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "Identifier", ":", "this", ".", "visitIdentifier", "(", "<", "ts", ".", "Identifier", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "IfStatement", ":", "this", ".", "visitIfStatement", "(", "<", "ts", ".", "IfStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ImportDeclaration", ":", "this", ".", "visitImportDeclaration", "(", "<", "ts", ".", "ImportDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ImportEqualsDeclaration", ":", "this", ".", "visitImportEqualsDeclaration", "(", "<", "ts", ".", "ImportEqualsDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "IndexSignature", ":", "this", ".", "visitIndexSignatureDeclaration", "(", "<", "ts", ".", "IndexSignatureDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "InterfaceDeclaration", ":", "this", ".", "visitInterfaceDeclaration", "(", "<", "ts", ".", "InterfaceDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "JsxAttribute", ":", "this", ".", "visitJsxAttribute", "(", "<", "ts", ".", "JsxAttribute", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "JsxElement", ":", "this", ".", "visitJsxElement", "(", "<", "ts", ".", "JsxElement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "JsxExpression", ":", "this", ".", "visitJsxExpression", "(", "<", "ts", ".", "JsxExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "JsxSelfClosingElement", ":", "this", ".", "visitJsxSelfClosingElement", "(", "<", "ts", ".", "JsxSelfClosingElement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "JsxSpreadAttribute", ":", "this", ".", "visitJsxSpreadAttribute", "(", "<", "ts", ".", "JsxSpreadAttribute", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "LabeledStatement", ":", "this", ".", "visitLabeledStatement", "(", "<", "ts", ".", "LabeledStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "MethodDeclaration", ":", "this", ".", "visitMethodDeclaration", "(", "<", "ts", ".", "MethodDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "MethodSignature", ":", "this", ".", "visitMethodSignature", "(", "<", "ts", ".", "SignatureDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ModuleDeclaration", ":", "this", ".", "visitModuleDeclaration", "(", "<", "ts", ".", "ModuleDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "NamedImports", ":", "this", ".", "visitNamedImports", "(", "<", "ts", ".", "NamedImports", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "NamespaceImport", ":", "this", ".", "visitNamespaceImport", "(", "<", "ts", ".", "NamespaceImport", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "NewExpression", ":", "this", ".", "visitNewExpression", "(", "<", "ts", ".", "NewExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ObjectBindingPattern", ":", "this", ".", "visitBindingPattern", "(", "<", "ts", ".", "BindingPattern", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ObjectLiteralExpression", ":", "this", ".", "visitObjectLiteralExpression", "(", "<", "ts", ".", "ObjectLiteralExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "Parameter", ":", "this", ".", "visitParameterDeclaration", "(", "<", "ts", ".", "ParameterDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "PostfixUnaryExpression", ":", "this", ".", "visitPostfixUnaryExpression", "(", "<", "ts", ".", "PostfixUnaryExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "PrefixUnaryExpression", ":", "this", ".", "visitPrefixUnaryExpression", "(", "<", "ts", ".", "PrefixUnaryExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "PropertyAccessExpression", ":", "this", ".", "visitPropertyAccessExpression", "(", "<", "ts", ".", "PropertyAccessExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "PropertyAssignment", ":", "this", ".", "visitPropertyAssignment", "(", "<", "ts", ".", "PropertyAssignment", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "PropertyDeclaration", ":", "this", ".", "visitPropertyDeclaration", "(", "<", "ts", ".", "PropertyDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "PropertySignature", ":", "this", ".", "visitPropertySignature", "(", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "RegularExpressionLiteral", ":", "this", ".", "visitRegularExpressionLiteral", "(", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ReturnStatement", ":", "this", ".", "visitReturnStatement", "(", "<", "ts", ".", "ReturnStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "SetAccessor", ":", "this", ".", "visitSetAccessor", "(", "<", "ts", ".", "AccessorDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "SourceFile", ":", "this", ".", "visitSourceFile", "(", "<", "ts", ".", "SourceFile", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "StringLiteral", ":", "this", ".", "visitStringLiteral", "(", "<", "ts", ".", "StringLiteral", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "SwitchStatement", ":", "this", ".", "visitSwitchStatement", "(", "<", "ts", ".", "SwitchStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "TemplateExpression", ":", "this", ".", "visitTemplateExpression", "(", "<", "ts", ".", "TemplateExpression", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "ThrowStatement", ":", "this", ".", "visitThrowStatement", "(", "<", "ts", ".", "ThrowStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "TryStatement", ":", "this", ".", "visitTryStatement", "(", "<", "ts", ".", "TryStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "TupleType", ":", "this", ".", "visitTupleType", "(", "<", "ts", ".", "TupleTypeNode", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "TypeAliasDeclaration", ":", "this", ".", "visitTypeAliasDeclaration", "(", "<", "ts", ".", "TypeAliasDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "TypeAssertionExpression", ":", "this", ".", "visitTypeAssertionExpression", "(", "<", "ts", ".", "TypeAssertion", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "TypeLiteral", ":", "this", ".", "visitTypeLiteral", "(", "<", "ts", ".", "TypeLiteralNode", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "TypeReference", ":", "this", ".", "visitTypeReference", "(", "<", "ts", ".", "TypeReferenceNode", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "VariableDeclaration", ":", "this", ".", "visitVariableDeclaration", "(", "<", "ts", ".", "VariableDeclaration", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "VariableStatement", ":", "this", ".", "visitVariableStatement", "(", "<", "ts", ".", "VariableStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "WhileStatement", ":", "this", ".", "visitWhileStatement", "(", "<", "ts", ".", "WhileStatement", ">", "node", ")", ";", "break", ";", "case", "ts", ".", "SyntaxKind", ".", "WithStatement", ":", "this", ".", "visitWithStatement", "(", "<", "ts", ".", "WithStatement", ">", "node", ")", ";", "break", ";", "default", ":", "console", ".", "warn", "(", "`unknown node type: ${", "node", "}`", ")", ";", "break", ";", "}", "}", "visitChildren", "(", "node", ")", "{", "ts", ".", "forEachChild", "(", "node", ",", "(", "child", ")", "=>", "this", ".", "visitNode", "(", "child", ")", ")", ";", "}", "visitAnyKeyword", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitArrayLiteralExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitArrayType", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitArrowFunction", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitBinaryExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitBindingElement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitBindingPattern", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitBlock", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitBreakStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitCallExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitCallSignature", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitCaseClause", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitClassDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitClassExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitCatchClause", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitConditionalExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitConstructSignature", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitConstructorDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitConstructorType", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitContinueStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitDebuggerStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitDefaultClause", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitDoStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitElementAccessExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitEnumDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitExportAssignment", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitExpressionStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitForStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitForInStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitForOfStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitFunctionDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitFunctionExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitFunctionType", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitGetAccessor", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitIdentifier", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitIfStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitImportDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitImportEqualsDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitIndexSignatureDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitInterfaceDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitJsxAttribute", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitJsxElement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitJsxExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitJsxSelfClosingElement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitJsxSpreadAttribute", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitLabeledStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitMethodDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitMethodSignature", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitModuleDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitNamedImports", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitNamespaceImport", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitNewExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitObjectLiteralExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitParameterDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitPostfixUnaryExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitPrefixUnaryExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitPropertyAccessExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitPropertyAssignment", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitPropertyDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitPropertySignature", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitRegularExpressionLiteral", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitReturnStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitSetAccessor", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitSourceFile", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitStringLiteral", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitSwitchStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitTemplateExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitThrowStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitTryStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitTupleType", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitTypeAliasDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitTypeAssertionExpression", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitTypeLiteral", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitTypeReference", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitVariableDeclaration", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitVariableStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitWhileStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "visitWithStatement", "(", "node", ")", "{", "this", ".", "visitChildren", "(", "node", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 142, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 142, null, null, null, null, null, null, null, null, null, 24, null, null, null, null, null, null, null, null, null, null, null, 4, null, 142, null, null, null, null, null, null, null, null, null, null, 4, null, 10435, null, null, null, null, null, null, null, null, null, null, 4, null, 31916, null, null, null, null, null, null, null, null, null, null, 4, null, 15351, null, null, null, null, null, null, null, null, null, null, 4, null, 6639, null, null, null, null, null, null, null, null, null, null, 4, null, 46493, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 15352, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 865, null, null, null, null, null, null, null, null, null, null, 4, null, 17342, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 935, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 24291, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 13911, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 3672, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 19658, null, null, null, null, null, null, null, null, null, null, 4, null, 8316, null, null, null, null, null, null, null, null, null, null, 4, null, 46494, null, null, null, null, null, null, null, null, null, null, 4, null, 6889, null, null, null, null, null, null, null, null, null, null, 4, null, 29921, null, null, null, null, null, null, null, null, null, null, 4, null, 46495, null, null, null, null, null, null, null, null, null, null, 4, null, 42379, null, null, null, null, null, null, null, null, null, null, 4, null, 10436, null, null, null, null, null, null, null, null, null, null, 4, null, 14837, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 1513, null, null, null, null, null, null, null, null, null, null, 4, null, 12623, null, null, null, null, null, null, null, null, null, null, 4, null, 3337, null, null, null, null, null, null, null, null, null, null, 4, null, 29922, null, null, null, null, null, null, null, null, null, null, 4, null, 31917, null, null, null, null, null, null, null, null, null, null, 4, null, 13363, null, null, null, null, null, null, null, null, null, null, 4, null, 42380, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 25952, null, null, null, null, null, null, null, null, null, null, 4, null, 3179, null, null, null, null, null, null, null, null, null, null, 4, null, 17342, null, null, null, null, null, null, null, null, null, null, 4, null, 14327, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 24292, null, null, null, null, null, null, null, null, null, null, 4, null, 4962, null, null, null, null, null, null, null, null, null, null, 4, null, 3267, null, null, null, null, null, null, null, null, null, null, 4, null, 35101, null, null, null, null, null, null, null, null, null, null, 4, null, 31918, null, null, null, null, null, null, null, null, null, null, 4, null, 5611, null, null, null, null, null, null, null, null, null, null, 4, null, 12624, null, null, null, null, null, null, null, null, null, null, 4, null, 2715, null, null, null, null, null, null, null, null, null, null, 4, null, 142, null, null, null, null, null, null, null, null, null, null, 4, null, 142, null, null, null, null, null, null, null, null, null, null, 4, null, 11623, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 306, null, null, null, null, null, null, null, null, null, null, 4, null, 7001, null, null, null, null, null, null, null, null, null, null, 4, null, 37610, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, 4, null, 37611, null, null, null, null, null, null, null, null, null, null, 4, null, 46496, null, null, null, null, null, null, null, null, null, null, 4, null, 18799, null, null, null, null, null, null, null, null, null, null, 4, null, 42381, null, null, null, null, null, null, null, null, null, null, 4, null, 20793, null, null, null, null, null, null, null, null, null, null, 4, null, 5466, null, null, null, null, null, null, null, null, null, null, 4, null, 5093, null, null, null, null, null, null, null, null, null, null, 4, null, 7002, null, null, null, null, null, null, null, null, null, null, 4, null, 37612, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, null ]
1269
[ "license", "import", "*", "as", "ts", "from", "'typescript'", ";", "import", "{", "Node", "}", "from", "'typescript'", ";", "import", "{", "SourceRange", "}", "from", "'../model/model'", ";", "import", "{", "ParsedDocument", ",", "StringifyOptions", "}", "from", "'../parser/document'", ";", "import", "{", "Visitor", "}", "from", "'./typescript-visitor'", ";", "export", "{", "Node", ",", "Program", "}", "from", "'typescript'", ";", "export", "{", "Options", "}", "from", "'../parser/document'", ";", "export", "{", "Visitor", "}", "from", "'./typescript-visitor'", ";", "export", "class", "ParsedTypeScriptDocument", "extends", "ParsedDocument", "<", "Node", ",", "Visitor", ">", "{", "readonly", "type", "=", "'typescript'", ";", "visit", "(", "visitors", ")", "{", "const", "sourceFile", "=", "this", ".", "ast", ";", "for", "(", "const", "visitor", "of", "visitors", ")", "{", "ts", ".", "forEachChild", "(", "sourceFile", ",", "(", "node", ")", "=>", "visitor", ".", "visitNode", "(", "node", ")", ")", ";", "}", "}", "protected", "_sourceRangeForNode", "(", "_node", ")", "{", "throw", "new", "Error", "(", "'unsupported'", ")", ";", "}", "stringify", "(", "_options", ")", "{", "throw", "new", "Error", "(", "'unsupported'", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 5, null, null, null, 24, null, null, null, null, null, null, null, null, 953, null, null, null, null, null, null, null, null, null, null, null, 24, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 24, null, null, null, null, null, null, null, null, null, null, 2, null, 17963, null, null, null, null, null, null, null, null, null, null, null ]
1270
[ "license", "import", "{", "SourceRange", "}", "from", "'../model/model'", ";", "import", "{", "ParsedDocument", "}", "from", "'../parser/document'", ";", "export", "function", "underlineCode", "(", "sourceRange", ",", "parsedDocument", ",", "colorizer", "=", "(", "s", ")", "=>", "s", ")", "{", "const", "relativeRange", "=", "parsedDocument", ".", "absoluteToRelativeSourceRange", "(", "sourceRange", ")", ";", "const", "code", "=", "_getRelavantSourceCode", "(", "relativeRange", ",", "parsedDocument", ")", ";", "if", "(", "!", "code", ")", "{", "return", "undefined", ";", "}", "const", "outputLines", "=", "[", "]", ";", "const", "lines", "=", "code", ".", "split", "(", "'\\n'", ")", ";", "let", "lineNum", "=", "relativeRange", ".", "start", ".", "line", ";", "for", "(", "const", "line", "of", "lines", ")", "{", "outputLines", ".", "push", "(", "line", ")", ";", "outputLines", ".", "push", "(", "colorizer", "(", "getSquiggleUnderline", "(", "line", ",", "lineNum", ",", "relativeRange", ")", ")", ")", ";", "lineNum", "++", ";", "}", "return", "outputLines", ".", "join", "(", "'\\n'", ")", ";", "}", "function", "_getRelavantSourceCode", "(", "relativeRange", ",", "parsedDocument", ")", "{", "if", "(", "parsedDocument", "===", "null", ")", "{", "return", ";", "}", "const", "startOffset", "=", "parsedDocument", ".", "sourcePositionToOffset", "(", "{", "column", ":", "0", ",", "line", ":", "relativeRange", ".", "start", ".", "line", "}", ")", ";", "let", "endOffset", ";", "if", "(", "parsedDocument", ".", "newlineIndexes", ".", "length", "===", "relativeRange", ".", "end", ".", "line", ")", "{", "endOffset", "=", "parsedDocument", ".", "sourcePositionToOffset", "(", "{", "column", ":", "0", ",", "line", ":", "relativeRange", ".", "end", ".", "line", "+", "1", "}", ")", ";", "}", "else", "{", "endOffset", "=", "parsedDocument", ".", "sourcePositionToOffset", "(", "{", "column", ":", "-", "1", ",", "line", ":", "relativeRange", ".", "end", ".", "line", "+", "1", "}", ")", ";", "}", "return", "parsedDocument", ".", "contents", ".", "slice", "(", "startOffset", ",", "endOffset", ")", ";", "}", "function", "getSquiggleUnderline", "(", "lineText", ",", "lineNum", ",", "sourceRange", ")", "{", "if", "(", "lineNum", "!==", "sourceRange", ".", "start", ".", "line", "&&", "lineNum", "!==", "sourceRange", ".", "end", ".", "line", ")", "{", "return", "'~'", ".", "repeat", "(", "lineText", ".", "length", ")", ";", "}", "if", "(", "lineNum", "===", "sourceRange", ".", "start", ".", "line", ")", "{", "const", "startColumn", "=", "sourceRange", ".", "start", ".", "column", ";", "const", "endColumn", "=", "sourceRange", ".", "end", ".", "line", "===", "sourceRange", ".", "start", ".", "line", "?", "sourceRange", ".", "end", ".", "column", ":", "lineText", ".", "length", ";", "const", "prefix", "=", "lineText", ".", "slice", "(", "0", ",", "startColumn", ")", ".", "replace", "(", "/[^\\t]/g", ",", "' '", ")", ";", "if", "(", "startColumn", "===", "endColumn", ")", "{", "return", "prefix", "+", "'~'", ";", "}", "return", "prefix", "+", "'~'", ".", "repeat", "(", "endColumn", "-", "startColumn", ")", ";", "}", "return", "'~'", ".", "repeat", "(", "sourceRange", ".", "end", ".", "column", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2351, null, 12625, null, 2, null, null, 2, null, null, null, null, null, null, 2351, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2351, null, 12625, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, 3, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1271
[ "license", "import", "*", "as", "chalk", "from", "'chalk'", ";", "import", "{", "Analyzer", "}", "from", "'../core/analyzer'", ";", "import", "{", "ParsedDocument", "}", "from", "'../parser/document'", ";", "import", "{", "underlineCode", "}", "from", "'../warning/code-printer'", ";", "import", "{", "Analysis", "}", "from", "'./analysis'", ";", "import", "{", "comparePositionAndRange", ",", "isPositionInsideRange", ",", "SourceRange", "}", "from", "'./source-range'", ";", "import", "stable", "=", "require", "(", "'stable'", ")", ";", "import", "{", "ResolvedUrl", "}", "from", "'./url'", ";", "import", "{", "UrlResolver", "}", "from", "'../index'", ";", "export", "interface", "WarningInit", "{", "readonly", "message", ":", "string", ";", "readonly", "sourceRange", ":", "SourceRange", ";", "readonly", "severity", ":", "Severity", ";", "readonly", "code", ":", "string", ";", "readonly", "parsedDocument", ":", "ParsedDocument", ";", "readonly", "fix", "?", ":", "Edit", ";", "readonly", "actions", "?", ":", "ReadonlyArray", "<", "Action", ">", ";", "}", "export", "class", "Warning", "{", "readonly", "code", ":", "string", ";", "readonly", "message", ":", "string", ";", "readonly", "sourceRange", ":", "SourceRange", ";", "readonly", "severity", ":", "Severity", ";", "/**\n * If the problem has a single automatic fix, this is it.\n *\n * Whether and how much something is 'automatic' can be a bit tricky to\n * delineate. Roughly speaking, if 99% of the time the change solves the\n * issue completely then it should go in `fix`.\n */", "readonly", "fix", ":", "Edit", "|", "undefined", ";", "/**\n * Other actions that could be taken in response to this warning.\n *\n * Each action is separate and they may be mutually exclusive. In the case\n * of edit actions they often are.\n */", "readonly", "actions", ":", "ReadonlyArray", "<", "Action", ">", "|", "undefined", "=", "undefined", ";", "private", "readonly", "_parsedDocument", ":", "ParsedDocument", ";", "constructor", "(", "init", ")", "{", "(", "{", "message", ":", "this", ".", "message", ",", "sourceRange", ":", "this", ".", "sourceRange", ",", "severity", ":", "this", ".", "severity", ",", "code", ":", "this", ".", "code", ",", "parsedDocument", ":", "this", ".", "_parsedDocument", ",", "}", "=", "init", ")", ";", "this", ".", "fix", "=", "init", ".", "fix", ";", "this", ".", "actions", "=", "init", ".", "actions", ";", "if", "(", "!", "this", ".", "sourceRange", ")", "{", "throw", "new", "Error", "(", "`Attempted to construct a ${", "this", ".", "code", "} `", "+", "`warning without a source range.`", ")", ";", "}", "if", "(", "!", "this", ".", "_parsedDocument", ")", "{", "throw", "new", "Error", "(", "`Attempted to construct a ${", "this", ".", "code", "} `", "+", "`warning without a parsed document.`", ")", ";", "}", "}", "toString", "(", "options", "=", "{", "}", ")", "{", "const", "opts", "=", "{", "...", "defaultPrinterOptions", ",", "...", "options", "}", ";", "const", "colorize", "=", "opts", ".", "color", "?", "this", ".", "_severityToColorFunction", "(", "this", ".", "severity", ")", ":", "(", "s", ")", "=>", "s", ";", "const", "severity", "=", "this", ".", "_severityToString", "(", "colorize", ")", ";", "let", "result", "=", "''", ";", "if", "(", "options", ".", "verbosity", "!==", "'one-line'", ")", "{", "const", "underlined", "=", "underlineCode", "(", "this", ".", "sourceRange", ",", "this", ".", "_parsedDocument", ",", "colorize", ")", ";", "if", "(", "underlined", ")", "{", "result", "+=", "underlined", ";", "}", "if", "(", "options", ".", "verbosity", "===", "'code-only'", ")", "{", "return", "result", ";", "}", "result", "+=", "'\\n\\n'", ";", "}", "let", "file", "=", "this", ".", "sourceRange", ".", "file", ";", "if", "(", "opts", ".", "resolver", ")", "{", "file", "=", "opts", ".", "resolver", ".", "relative", "(", "this", ".", "sourceRange", ".", "file", ")", ";", "}", "result", "+=", "`${", "file", "}(${", "this", ".", "sourceRange", ".", "start", ".", "line", "+", "1", "},${", "this", ".", "sourceRange", ".", "start", ".", "column", "+", "1", "}) ${", "severity", "} [${", "this", ".", "code", "}] - ${", "this", ".", "message", "}\\n`", ";", "return", "result", ";", "}", "private", "_severityToColorFunction", "(", "severity", ")", "{", "switch", "(", "severity", ")", "{", "case", "Severity", ".", "ERROR", ":", "return", "chalk", ".", "red", ";", "case", "Severity", ".", "WARNING", ":", "return", "chalk", ".", "yellow", ";", "case", "Severity", ".", "INFO", ":", "return", "chalk", ".", "green", ";", "default", ":", "const", "never", "=", "severity", ";", "throw", "new", "Error", "(", "`Unknown severity value - ${", "never", "}`", "+", "` - encountered while printing warning.`", ")", ";", "}", "}", "private", "_severityToString", "(", "colorize", ")", "{", "switch", "(", "this", ".", "severity", ")", "{", "case", "Severity", ".", "ERROR", ":", "return", "colorize", "(", "'error'", ")", ";", "case", "Severity", ".", "WARNING", ":", "return", "colorize", "(", "'warning'", ")", ";", "case", "Severity", ".", "INFO", ":", "return", "colorize", "(", "'info'", ")", ";", "default", ":", "const", "never", "=", "this", ".", "severity", ";", "throw", "new", "Error", "(", "`Unknown severity value - ${", "never", "} - `", "+", "`encountered while printing warning.`", ")", ";", "}", "}", "toJSON", "(", ")", "{", "return", "{", "code", ":", "this", ".", "code", ",", "message", ":", "this", ".", "message", ",", "severity", ":", "this", ".", "severity", ",", "sourceRange", ":", "this", ".", "sourceRange", ",", "}", ";", "}", "}", "export", "enum", "Severity", "{", "ERROR", ",", "WARNING", ",", "INFO", "}", "export", "class", "WarningCarryingException", "extends", "Error", "{", "readonly", "warning", ":", "Warning", ";", "constructor", "(", "warning", ")", "{", "super", "(", "warning", ".", "message", ")", ";", "this", ".", "warning", "=", "warning", ";", "}", "}", "export", "type", "Verbosity", "=", "'one-line'", "|", "'full'", "|", "'code-only'", ";", "export", "interface", "WarningStringifyOptions", "{", "readonly", "verbosity", ":", "Verbosity", ";", "readonly", "color", ":", "boolean", ";", "/**\n * If given, we will use resolver.relative to get a relative path\n * to the reported file.\n */", "readonly", "resolver", "?", ":", "UrlResolver", ";", "}", "const", "defaultPrinterOptions", "=", "{", "verbosity", ":", "'full'", "as", "'full'", ",", "color", ":", "true", "}", ";", "export", "type", "Action", "=", "EditAction", "|", "{", "/** To ensure that type safe code actually checks for the action kind. */", "kind", ":", "'never'", ";", "}", ";", "/**\n * An EditAction is like a fix, only it's not applied automatically when the\n * user runs `polymer lint --fix`. Often this is because it's less safe to\n * apply automatically, and there may be caveats, or multiple ways to resolve\n * the warning.\n *\n * For example, a change to an element that updates it to no longer use a\n * deprecated feature, but that involves a change in the element's API should\n * not be a fix, but should instead be an EditAction.\n */", "export", "interface", "EditAction", "{", "kind", ":", "'edit'", ";", "/**\n * A unique string code for the edit action. Useful so that the user can\n * request that all actions with a given code should be applied.\n */", "code", ":", "string", ";", "/**\n * A short description of the change, noting caveats and important information\n * for the user.\n */", "description", ":", "string", ";", "edit", ":", "Edit", ";", "}", "/**\n * Represents an action for replacing a range in a document with some text.\n *\n * This is sufficient to represent all operations on text files, including\n * inserting and deleting text (using empty ranges or empty replacement\n * text, respectively).\n */", "export", "interface", "Replacement", "{", "readonly", "range", ":", "SourceRange", ";", "readonly", "replacementText", ":", "string", ";", "}", "/**\n * A set of replacements that must all be applied as a single atomic unit.\n */", "export", "type", "Edit", "=", "ReadonlyArray", "<", "Replacement", ">", ";", "export", "interface", "EditResult", "{", "/** The edits that had no conflicts, and are reflected in editedFiles. */", "appliedEdits", ":", "Edit", "[", "]", ";", "/** Edits that could not be applied due to overlapping ranges. */", "incompatibleEdits", ":", "Edit", "[", "]", ";", "/** A map from urls to their new contents. */", "editedFiles", ":", "Map", "<", "ResolvedUrl", ",", "string", ">", ";", "}", "/**\n * Takes the given edits and, provided there are no overlaps, applies them to\n * the contents loadable from the given loader.\n *\n * If there are overlapping edits, then edits earlier in the array get priority\n * over later ones.\n */", "export", "async", "function", "applyEdits", "(", "edits", ",", "loader", ")", "{", "const", "result", "=", "{", "appliedEdits", ":", "[", "]", ",", "incompatibleEdits", ":", "[", "]", ",", "editedFiles", ":", "new", "Map", "(", ")", "}", ";", "const", "replacementsByFile", "=", "new", "Map", "<", "ResolvedUrl", ",", "Replacement", "[", "]", ">", "(", ")", ";", "for", "(", "const", "edit", "of", "edits", ")", "{", "if", "(", "canApply", "(", "edit", ",", "replacementsByFile", ")", ")", "{", "result", ".", "appliedEdits", ".", "push", "(", "edit", ")", ";", "}", "else", "{", "result", ".", "incompatibleEdits", ".", "push", "(", "edit", ")", ";", "}", "}", "for", "(", "const", "[", "file", ",", "replacements", "]", "of", "replacementsByFile", ")", "{", "const", "document", "=", "await", "loader", "(", "file", ")", ";", "let", "contents", "=", "document", ".", "contents", ";", "/**\n * This is the important bit. We know that none of the replacements overlap,\n * so in order for their source ranges in the file to all be valid at the\n * time we apply them, we simply need to apply them starting from the end\n * of the document and working backwards to the beginning.\n *\n * To preserve ordering of insertions to the same position, we use a stable\n * sort.\n */", "stable", ".", "inplace", "(", "replacements", ",", "(", "a", ",", "b", ")", "=>", "{", "const", "leftEdgeComp", "=", "comparePositionAndRange", "(", "b", ".", "range", ".", "start", ",", "a", ".", "range", ",", "true", ")", ";", "if", "(", "leftEdgeComp", "!==", "0", ")", "{", "return", "leftEdgeComp", ";", "}", "return", "comparePositionAndRange", "(", "b", ".", "range", ".", "end", ",", "a", ".", "range", ",", "false", ")", ";", "}", ")", ";", "for", "(", "const", "replacement", "of", "replacements", ")", "{", "const", "offsets", "=", "document", ".", "sourceRangeToOffsets", "(", "replacement", ".", "range", ")", ";", "contents", "=", "contents", ".", "slice", "(", "0", ",", "offsets", "[", "0", "]", ")", "+", "replacement", ".", "replacementText", "+", "contents", ".", "slice", "(", "offsets", "[", "1", "]", ")", ";", "}", "result", ".", "editedFiles", ".", "set", "(", "file", ",", "contents", ")", ";", "}", "return", "result", ";", "}", "/**\n * We can apply an edit if none of its replacements overlap with any accepted\n * replacement.\n */", "function", "canApply", "(", "edit", ",", "replacements", ")", "{", "for", "(", "let", "i", "=", "0", ";", "i", "<", "edit", ".", "length", ";", "i", "++", ")", "{", "const", "replacement", "=", "edit", "[", "i", "]", ";", "const", "fileLocalReplacements", "=", "replacements", ".", "get", "(", "replacement", ".", "range", ".", "file", ")", "||", "[", "]", ";", "for", "(", "const", "acceptedReplacement", "of", "fileLocalReplacements", ")", "{", "if", "(", "!", "areReplacementsCompatible", "(", "replacement", ",", "acceptedReplacement", ")", ")", "{", "return", "false", ";", "}", "}", "for", "(", "let", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "const", "acceptedReplacement", "=", "edit", "[", "j", "]", ";", "if", "(", "!", "areReplacementsCompatible", "(", "replacement", ",", "acceptedReplacement", ")", ")", "{", "return", "false", ";", "}", "}", "}", "for", "(", "const", "replacement", "of", "edit", ")", "{", "if", "(", "!", "replacements", ".", "has", "(", "replacement", ".", "range", ".", "file", ")", ")", "{", "replacements", ".", "set", "(", "replacement", ".", "range", ".", "file", ",", "[", "replacement", "]", ")", ";", "}", "else", "{", "const", "fileReplacements", "=", "replacements", ".", "get", "(", "replacement", ".", "range", ".", "file", ")", "!", ";", "fileReplacements", ".", "push", "(", "replacement", ")", ";", "}", "}", "return", "true", ";", "}", "function", "areReplacementsCompatible", "(", "a", ",", "b", ")", "{", "if", "(", "a", ".", "range", ".", "file", "!==", "b", ".", "range", ".", "file", ")", "{", "return", "true", ";", "}", "if", "(", "areRangesEqual", "(", "a", ".", "range", ",", "b", ".", "range", ")", ")", "{", "return", "(", "a", ".", "range", ".", "start", ".", "column", "===", "a", ".", "range", ".", "end", ".", "column", "&&", "a", ".", "range", ".", "start", ".", "line", "===", "a", ".", "range", ".", "end", ".", "line", ")", ";", "}", "return", "!", "(", "isPositionInsideRange", "(", "a", ".", "range", ".", "start", ",", "b", ".", "range", ",", "false", ")", "||", "isPositionInsideRange", "(", "a", ".", "range", ".", "end", ",", "b", ".", "range", ",", "false", ")", "||", "isPositionInsideRange", "(", "b", ".", "range", ".", "start", ",", "a", ".", "range", ",", "false", ")", "||", "isPositionInsideRange", "(", "b", ".", "range", ".", "end", ",", "a", ".", "range", ",", "false", ")", ")", ";", "}", "function", "areRangesEqual", "(", "a", ",", "b", ")", "{", "return", "a", ".", "start", ".", "line", "===", "b", ".", "start", ".", "line", "&&", "a", ".", "start", ".", "column", "===", "b", ".", "start", ".", "column", "&&", "a", ".", "end", ".", "line", "===", "b", ".", "end", ".", "line", "&&", "a", ".", "end", ".", "column", "===", "b", ".", "end", ".", "column", ";", "}", "export", "function", "makeParseLoader", "(", "analyzer", ",", "analysis", "?", ")", "{", "return", "async", "(", "url", ")", "=>", "{", "if", "(", "analysis", ")", "{", "const", "cachedResult", "=", "analysis", ".", "getDocument", "(", "url", ")", ";", "if", "(", "cachedResult", ".", "successful", ")", "{", "return", "cachedResult", ".", "value", ".", "parsedDocument", ";", "}", "}", "const", "result", "=", "(", "await", "analyzer", ".", "analyze", "(", "[", "url", "]", ")", ")", ".", "getDocument", "(", "url", ")", ";", "if", "(", "result", ".", "successful", ")", "{", "return", "result", ".", "value", ".", "parsedDocument", ";", "}", "let", "message", "=", "''", ";", "if", "(", "result", ".", "error", ")", "{", "message", "=", "result", ".", "error", ".", "message", ";", "}", "throw", "new", "Error", "(", "`Cannot load file at: ${", "JSON", ".", "stringify", "(", "url", ")", "}: ${", "message", "}`", ")", ";", "}", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 20, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 5247, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5893, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 5, null, 7, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5399, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 12625, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, 5759, null, 5759, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5759, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 5399, null, 19, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5759, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5759, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, 5759, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5759, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 5759, null, 5759, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 2351, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 1344, null, 1519, null, null, null, null, null, null, 1462, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1272
[ "license", "import", "{", "Document", "}", "from", "'./document'", ";", "import", "{", "ScannedFeature", "}", "from", "'./feature'", ";", "/**\n * The `DocumentBackreference` is added to the set of features\n * for an inline/imported document to provide a link to its containing/importer\n * document.\n */", "export", "class", "DocumentBackreference", "extends", "ScannedFeature", "{", "kinds", "=", "new", "Set", "(", "[", "'document-backreference'", "]", ")", ";", "identifiers", "=", "new", "Set", "<", "string", ">", "(", ")", ";", "constructor", "(", "public", "readonly", "document", ")", "{", "super", "(", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 91, null, null, null, null, null, null, null, null ]
1273
[ "license", "import", "{", "Document", "}", "from", "'./document'", ";", "import", "{", "Feature", ",", "ScannedFeature", "}", "from", "'./feature'", ";", "/**\n * A ScannedFeature that needs to resolve other Features to build its final\n * representation.\n */", "export", "interface", "Resolvable", "extends", "ScannedFeature", "{", "resolve", "(", "document", ")", ":", "Feature", "|", "undefined", ";", "}", "export", "function", "isResolvable", "(", "x", ")", "{", "return", "x", ".", "resolve", "&&", "typeof", "x", ".", "resolve", "===", "'function'", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 91, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1274
[ "license", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "{", "AnalysisContext", "}", "from", "'../core/analysis-context'", ";", "import", "{", "ParsedCssDocument", "}", "from", "'../css/css-document'", ";", "import", "{", "ParsedHtmlDocument", "}", "from", "'../html/html-document'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'../javascript/javascript-document'", ";", "import", "{", "ParsedJsonDocument", "}", "from", "'../json/json-document'", ";", "import", "{", "ParsedDocument", "}", "from", "'../parser/document'", ";", "import", "{", "ParsedTypeScriptDocument", "}", "from", "'../typescript/typescript-document'", ";", "import", "{", "Analysis", "}", "from", "'./analysis'", ";", "import", "{", "DocumentBackreference", "}", "from", "'./document-backreference'", ";", "import", "{", "Feature", ",", "ScannedFeature", "}", "from", "'./feature'", ";", "import", "{", "ImmutableSet", ",", "unsafeAsMutable", "}", "from", "'./immutable'", ";", "import", "{", "Import", "}", "from", "'./import'", ";", "import", "{", "AstNodeWithLanguage", ",", "ScannedInlineDocument", "}", "from", "'./inline-document'", ";", "import", "{", "MapWithDefault", "}", "from", "'./map'", ";", "import", "{", "DocumentQuery", "as", "Query", ",", "DocumentQueryWithKind", "as", "QueryWithKind", ",", "FeatureKind", ",", "FeatureKindMap", ",", "Queryable", "}", "from", "'./queryable'", ";", "import", "{", "isResolvable", "}", "from", "'./resolvable'", ";", "import", "{", "SourceRange", "}", "from", "'./source-range'", ";", "import", "{", "ResolvedUrl", "}", "from", "'./url'", ";", "import", "{", "Warning", "}", "from", "'./warning'", ";", "/**\n * The metadata for all features and elements defined in one document\n */", "export", "class", "ScannedDocument", "{", "document", ":", "ParsedDocument", ";", "features", ":", "ScannedFeature", "[", "]", ";", "warnings", ":", "Warning", "[", "]", ";", "isInline", "=", "false", ";", "get", "sourceRange", "(", ")", "{", "return", "this", ".", "document", ".", "sourceRange", ";", "}", "get", "astNode", "(", ")", ":", "AstNodeWithLanguage", "|", "undefined", "{", "return", "this", ".", "document", ".", "astNode", ";", "}", "constructor", "(", "document", ",", "features", ",", "warnings", "=", "[", "]", ")", "{", "this", ".", "document", "=", "document", ";", "this", ".", "features", "=", "features", ";", "this", ".", "warnings", "=", "warnings", ";", "this", ".", "isInline", "=", "document", ".", "isInline", ";", "}", "get", "url", "(", ")", "{", "return", "this", ".", "document", ".", "url", ";", "}", "/**\n * Gets all features in this scanned document and all inline documents it\n * contains.\n */", "getNestedFeatures", "(", ")", "{", "const", "result", "=", "[", "]", ";", "this", ".", "_getNestedFeatures", "(", "result", ")", ";", "return", "result", ";", "}", "private", "_getNestedFeatures", "(", "features", ")", "{", "for", "(", "const", "feature", "of", "this", ".", "features", ")", "{", "const", "maybeInlineDoc", "=", "feature", "as", "Partial", "<", "ScannedInlineDocument", ">", ";", "if", "(", "maybeInlineDoc", ".", "constructor", ".", "name", "===", "'ScannedInlineDocument'", "&&", "maybeInlineDoc", ".", "scannedDocument", ")", "{", "maybeInlineDoc", ".", "scannedDocument", ".", "_getNestedFeatures", "(", "features", ")", ";", "}", "else", "{", "features", ".", "push", "(", "feature", ")", ";", "}", "}", "}", "}", "export", "interface", "DeclaredWithStatement", "{", "/**\n * This is the nearest statement at or above `this.astNode`.\n *\n * This is a fast and simple way to get a canonical, indexable AST node,\n * so that we can look up a feature syntactically.\n *\n * Populate this field with `esutil.getCanonicalStatement`.\n */", "statementAst", ":", "babel", ".", "Statement", "|", "undefined", ";", "}", "function", "isDeclaredWithStatement", "(", "feature", ")", "{", "return", "feature", ".", "statementAst", "!==", "undefined", ";", "}", "declare", "module", "'./queryable'", "{", "interface", "FeatureKindMap", "{", "'document'", ":", "Document", ";", "'html-document'", ":", "Document", "<", "ParsedHtmlDocument", ">", ";", "'js-document'", ":", "Document", "<", "JavaScriptDocument", ">", ";", "'json-document'", ":", "Document", "<", "ParsedJsonDocument", ">", ";", "'css-document'", ":", "Document", "<", "ParsedCssDocument", ">", ";", "'typescript-document'", ":", "Document", "<", "ParsedTypeScriptDocument", ">", ";", "}", "}", "export", "class", "Document", "<", "ParsedType", "extends", "ParsedDocument", "=", "ParsedDocument", ">", "implements", "Feature", ",", "Queryable", "{", "readonly", "kinds", ":", "ImmutableSet", "<", "string", ">", "=", "new", "Set", "(", "[", "'document'", "]", ")", ";", "readonly", "identifiers", ":", "ImmutableSet", "<", "string", ">", "=", "new", "Set", "(", ")", ";", "/**\n * AnalysisContext is a private type. Only internal analyzer code should touch\n * this field.\n */", "_analysisContext", ":", "AnalysisContext", ";", "warnings", ":", "Warning", "[", "]", ";", "languageAnalysis", "?", ":", "any", ";", "private", "readonly", "_localFeatures", "=", "new", "Set", "<", "Feature", ">", "(", ")", ";", "private", "readonly", "_scannedDocument", ":", "ScannedDocument", ";", "private", "readonly", "_localFeaturesByStatement", "=", "new", "MapWithDefault", "<", "babel", ".", "Statement", ",", "Set", "<", "Feature", ">", ">", "(", "(", ")", "=>", "new", "Set", "(", ")", ")", ";", "/**\n * To handle recursive dependency graphs we must track whether we've started\n * resolving this Document so that we can reliably early exit even if one\n * of our dependencies tries to resolve this document.\n */", "private", "_begunResolving", "=", "false", ";", "/**\n * True after this document and all of its children are finished resolving.\n */", "private", "_doneResolving", "=", "false", ";", "constructor", "(", "base", ",", "analyzer", ",", "languageAnalysis", "?", ")", "{", "if", "(", "base", "==", "null", ")", "{", "throw", "new", "Error", "(", "'base is null'", ")", ";", "}", "if", "(", "analyzer", "==", "null", ")", "{", "throw", "new", "Error", "(", "'analyzer is null'", ")", ";", "}", "this", ".", "_scannedDocument", "=", "base", ";", "this", ".", "_analysisContext", "=", "analyzer", ";", "this", ".", "languageAnalysis", "=", "languageAnalysis", ";", "if", "(", "!", "base", ".", "isInline", ")", "{", "unsafeAsMutable", "(", "this", ".", "identifiers", ")", ".", "add", "(", "this", ".", "url", ")", ";", "}", "unsafeAsMutable", "(", "this", ".", "kinds", ")", ".", "add", "(", "`${", "this", ".", "parsedDocument", ".", "type", "}-document`", ")", ";", "this", ".", "warnings", "=", "Array", ".", "from", "(", "base", ".", "warnings", ")", ";", "}", "get", "url", "(", ")", ":", "ResolvedUrl", "{", "return", "this", ".", "_scannedDocument", ".", "url", ";", "}", "get", "isInline", "(", ")", ":", "boolean", "{", "return", "this", ".", "_scannedDocument", ".", "isInline", ";", "}", "get", "sourceRange", "(", ")", ":", "SourceRange", "|", "undefined", "{", "return", "this", ".", "_scannedDocument", ".", "sourceRange", ";", "}", "get", "astNode", "(", ")", ":", "AstNodeWithLanguage", "|", "undefined", "{", "return", "this", ".", "_scannedDocument", ".", "astNode", ";", "}", "get", "parsedDocument", "(", ")", ":", "ParsedType", "{", "return", "this", ".", "_scannedDocument", ".", "document", "as", "ParsedType", ";", "}", "get", "resolved", "(", ")", ":", "boolean", "{", "return", "this", ".", "_doneResolving", ";", "}", "get", "type", "(", ")", ":", "string", "{", "return", "this", ".", "parsedDocument", ".", "type", ";", "}", "/**\n * Resolves all features of this document, so that they have references to all\n * their dependencies.\n *\n * This method can only be called once\n */", "resolve", "(", ")", "{", "if", "(", "this", ".", "_doneResolving", ")", "{", "throw", "new", "Error", "(", "'resolve can only be called once'", ")", ";", "}", "if", "(", "this", ".", "_begunResolving", ")", "{", "return", ";", "}", "this", ".", "_begunResolving", "=", "true", ";", "this", ".", "_addFeature", "(", "this", ")", ";", "for", "(", "const", "scannedFeature", "of", "this", ".", "_scannedDocument", ".", "features", ")", "{", "if", "(", "isResolvable", "(", "scannedFeature", ")", ")", "{", "const", "feature", "=", "scannedFeature", ".", "resolve", "(", "this", ")", ";", "if", "(", "feature", ")", "{", "this", ".", "_addFeature", "(", "feature", ")", ";", "}", "}", "}", "this", ".", "_doneResolving", "=", "true", ";", "}", "/**\n * Adds and indexes a feature to this document before resolve().\n */", "_addFeature", "(", "feature", ")", "{", "if", "(", "this", ".", "_doneResolving", ")", "{", "throw", "new", "Error", "(", "'_addFeature can not be called after _resolve()'", ")", ";", "}", "this", ".", "_indexFeature", "(", "feature", ")", ";", "this", ".", "_localFeatures", ".", "add", "(", "feature", ")", ";", "if", "(", "isDeclaredWithStatement", "(", "feature", ")", "&&", "feature", ".", "statementAst", "!==", "undefined", ")", "{", "this", ".", "_localFeaturesByStatement", ".", "get", "(", "feature", ".", "statementAst", ")", ".", "add", "(", "feature", ")", ";", "}", "}", "/**\n * Get features on the document.\n *\n * Be default it includes only features on the document, but you can specify\n * whether to include features that are reachable by imports, features from\n * outside the current package, etc. See the documentation for Query for more\n * details.\n *\n * You can also narrow by feature kind and identifier.\n */", "getFeatures", "<", "K", "extends", "FeatureKind", ">", "(", "query", ")", ";", "getFeatures", "(", "query", "?", ")", ";", "getFeatures", "(", "query", "=", "{", "}", ")", "{", "if", "(", "query", ".", "statement", "!==", "undefined", ")", "{", "return", "this", ".", "_getByStatement", "(", "query", ".", "statement", ",", "query", ".", "kind", ")", ";", "}", "if", "(", "query", ".", "id", "&&", "query", ".", "kind", ")", "{", "return", "this", ".", "_getById", "(", "query", ".", "kind", ",", "query", ".", "id", ",", "query", ")", ";", "}", "else", "if", "(", "query", ".", "kind", ")", "{", "return", "this", ".", "_getByKind", "(", "query", ".", "kind", ",", "query", ")", ";", "}", "const", "features", "=", "new", "Set", "(", ")", ";", "this", ".", "_listFeatures", "(", "features", ",", "new", "Set", "(", ")", ",", "query", ")", ";", "const", "queryId", "=", "query", ".", "id", ";", "if", "(", "queryId", ")", "{", "const", "filteredFeatures", "=", "Array", ".", "from", "(", "features", ")", ".", "filter", "(", "(", "f", ")", "=>", "f", ".", "identifiers", ".", "has", "(", "queryId", ")", ")", ";", "return", "new", "Set", "(", "filteredFeatures", ")", ";", "}", "return", "features", ";", "}", "private", "_getByKind", "<", "K", "extends", "FeatureKind", ">", "(", "kind", ",", "query", "?", ")", ";", "private", "_getByKind", "(", "kind", ",", "query", "?", ")", ";", "private", "_getByKind", "(", "kind", ",", "query", "=", "{", "}", ")", "{", "if", "(", "this", ".", "_featuresByKind", "&&", "this", ".", "_isCachable", "(", "query", ")", ")", "{", "const", "features", "=", "this", ".", "_featuresByKind", ".", "get", "(", "kind", ")", "||", "new", "Set", "(", ")", ";", "if", "(", "!", "query", ".", "externalPackages", ")", "{", "return", "this", ".", "_filterOutExternal", "(", "features", ")", ";", "}", "return", "features", ";", "}", "else", "if", "(", "this", ".", "_doneResolving", "&&", "this", ".", "_isCachable", "(", "query", ")", ")", "{", "this", ".", "_buildIndexes", "(", ")", ";", "return", "this", ".", "_getByKind", "(", "kind", ",", "query", ")", ";", "}", "return", "this", ".", "_getSlowlyByKind", "(", "kind", ",", "query", ")", ";", "}", "private", "_getById", "<", "K", "extends", "FeatureKind", ">", "(", "kind", ",", "identifier", ",", "query", "?", ")", ";", "private", "_getById", "(", "kind", ",", "identifier", ",", "query", "?", ")", ";", "private", "_getById", "(", "kind", ",", "identifier", ",", "query", "=", "{", "}", ")", "{", "if", "(", "this", ".", "_featuresByKindAndId", "&&", "this", ".", "_isCachable", "(", "query", ")", ")", "{", "const", "idMap", "=", "this", ".", "_featuresByKindAndId", ".", "get", "(", "kind", ")", ";", "const", "features", "=", "(", "idMap", "&&", "idMap", ".", "get", "(", "identifier", ")", ")", "||", "new", "Set", "(", ")", ";", "if", "(", "!", "query", ".", "externalPackages", ")", "{", "return", "this", ".", "_filterOutExternal", "(", "features", ")", ";", "}", "return", "features", ";", "}", "else", "if", "(", "this", ".", "_doneResolving", "&&", "this", ".", "_isCachable", "(", "query", ")", ")", "{", "this", ".", "_buildIndexes", "(", ")", ";", "return", "this", ".", "_getById", "(", "kind", ",", "identifier", ",", "query", ")", ";", "}", "const", "result", "=", "new", "Set", "<", "Feature", ">", "(", ")", ";", "for", "(", "const", "featureOfKind", "of", "this", ".", "_getByKind", "(", "kind", ",", "query", ")", ")", "{", "if", "(", "featureOfKind", ".", "identifiers", ".", "has", "(", "identifier", ")", ")", "{", "result", ".", "add", "(", "featureOfKind", ")", ";", "}", "}", "return", "result", ";", "}", "private", "_getByStatement", "(", "statement", ",", "kind", ")", "{", "const", "result", "=", "this", ".", "_localFeaturesByStatement", ".", "get", "(", "statement", ")", ";", "if", "(", "kind", "===", "undefined", ")", "{", "return", "result", ";", "}", "return", "this", ".", "_filterByKind", "(", "result", ",", "kind", ")", ";", "}", "/** Filters out the given features by the given kind. */", "private", "_filterByKind", "(", "features", ",", "kind", ")", "{", "const", "result", "=", "new", "Set", "<", "Feature", ">", "(", ")", ";", "for", "(", "const", "feature", "of", "features", ")", "{", "if", "(", "feature", ".", "kinds", ".", "has", "(", "kind", ")", ")", "{", "result", ".", "add", "(", "feature", ")", ";", "}", "}", "return", "result", ";", "}", "private", "_isCachable", "(", "query", "=", "{", "}", ")", "{", "return", "!", "!", "query", ".", "imported", "&&", "!", "query", ".", "noLazyImports", "&&", "!", "query", ".", "excludeBackreferences", ";", "}", "private", "_getSlowlyByKind", "(", "kind", ",", "query", ")", "{", "const", "allFeatures", "=", "new", "Set", "<", "Feature", ">", "(", ")", ";", "this", ".", "_listFeatures", "(", "allFeatures", ",", "new", "Set", "(", ")", ",", "query", ")", ";", "const", "result", "=", "new", "Set", "<", "Feature", ">", "(", ")", ";", "for", "(", "const", "feature", "of", "allFeatures", ")", "{", "if", "(", "feature", ".", "kinds", ".", "has", "(", "kind", ")", ")", "{", "result", ".", "add", "(", "feature", ")", ";", "}", "}", "return", "result", ";", "}", "/**\n * Walks the graph of documents, starting from `this`, finding features which\n * match the given query and adding them to the `result` set. Uses `visited`\n * to deal with cycles.\n *\n * This method is O(numFeatures), though it does not walk documents that are\n * not relevant to the query (e.g. based on whether the query follows imports,\n * or excludes lazy imports)\n */", "private", "_listFeatures", "(", "result", ",", "visited", ",", "query", ")", "{", "if", "(", "visited", ".", "has", "(", "this", ")", ")", "{", "return", ";", "}", "visited", ".", "add", "(", "this", ")", ";", "for", "(", "const", "feature", "of", "this", ".", "_localFeatures", ")", "{", "if", "(", "!", "feature", ".", "kinds", ".", "has", "(", "'document-backreference'", ")", "||", "!", "query", ".", "excludeBackreferences", ")", "{", "result", ".", "add", "(", "feature", ")", ";", "}", "if", "(", "feature", ".", "kinds", ".", "has", "(", "'document-backreference'", ")", "&&", "!", "query", ".", "excludeBackreferences", ")", "{", "const", "containerDocument", "=", "(", "feature", "as", "DocumentBackreference", ")", ".", "document", ";", "result", ".", "add", "(", "containerDocument", ")", ";", "containerDocument", ".", "_listFeatures", "(", "result", ",", "visited", ",", "query", ")", ";", "}", "if", "(", "feature", ".", "kinds", ".", "has", "(", "'document'", ")", ")", "{", "(", "feature", "as", "Document", ")", ".", "_listFeatures", "(", "result", ",", "visited", ",", "query", ")", ";", "}", "if", "(", "feature", ".", "kinds", ".", "has", "(", "'import'", ")", "&&", "query", ".", "imported", ")", "{", "const", "imprt", "=", "feature", "as", "Import", ";", "const", "isPackageInternal", "=", "imprt", ".", "document", "&&", "!", "Analysis", ".", "isExternal", "(", "imprt", ".", "url", ")", ";", "const", "externalityOk", "=", "query", ".", "externalPackages", "||", "isPackageInternal", ";", "const", "lazinessOk", "=", "!", "query", ".", "noLazyImports", "||", "!", "imprt", ".", "lazy", ";", "if", "(", "imprt", ".", "document", "!==", "undefined", "&&", "externalityOk", "&&", "lazinessOk", ")", "{", "imprt", ".", "document", ".", "_listFeatures", "(", "result", ",", "visited", ",", "query", ")", ";", "}", "}", "}", "}", "private", "_filterOutExternal", "(", "features", ")", "{", "const", "result", "=", "new", "Set", "(", ")", ";", "for", "(", "const", "feature", "of", "features", ")", "{", "if", "(", "feature", ".", "sourceRange", "&&", "Analysis", ".", "isExternal", "(", "feature", ".", "sourceRange", ".", "file", ")", ")", "{", "continue", ";", "}", "result", ".", "add", "(", "feature", ")", ";", "}", "return", "result", ";", "}", "/**\n * Get warnings for the document and all matched features.\n */", "getWarnings", "(", "query", "=", "{", "}", ")", "{", "const", "warnings", "=", "new", "Set", "(", "this", ".", "warnings", ")", ";", "for", "(", "const", "feature", "of", "this", ".", "getFeatures", "(", "query", ")", ")", "{", "for", "(", "const", "warning", "of", "feature", ".", "warnings", ")", "{", "warnings", ".", "add", "(", "warning", ")", ";", "}", "}", "return", "Array", ".", "from", "(", "warnings", ")", ";", "}", "toString", "(", ")", "{", "return", "this", ".", "_toString", "(", "new", "Set", "(", ")", ")", ".", "join", "(", "'\\n'", ")", ";", "}", "private", "_toString", "(", "documentsWalked", ")", "{", "let", "result", "=", "[", "`<Document type=${", "this", ".", "parsedDocument", ".", "type", "} url=${", "this", ".", "url", "}>\\n`", "]", ";", "if", "(", "documentsWalked", ".", "has", "(", "this", ")", ")", "{", "return", "result", ";", "}", "documentsWalked", ".", "add", "(", "this", ")", ";", "for", "(", "const", "localFeature", "of", "this", ".", "_localFeatures", ")", "{", "if", "(", "localFeature", "instanceof", "Document", ")", "{", "result", "=", "result", ".", "concat", "(", "localFeature", ".", "_toString", "(", "documentsWalked", ")", ".", "map", "(", "(", "line", ")", "=>", "` ${", "line", "}`", ")", ")", ";", "}", "else", "{", "let", "subResult", "=", "localFeature", ".", "toString", "(", ")", ";", "if", "(", "subResult", "===", "'[object Object]'", ")", "{", "subResult", "=", "`<${", "localFeature", ".", "constructor", ".", "name", "} kinds=\"${", "Array", ".", "from", "(", "localFeature", ".", "kinds", ")", ".", "join", "(", "', '", ")", "}\" ids=\"${", "Array", ".", "from", "(", "localFeature", ".", "identifiers", ")", ".", "join", "(", "','", ")", "}\">}`", ";", "}", "result", ".", "push", "(", "` ${", "subResult", "}`", ")", ";", "}", "}", "return", "result", ";", "}", "stringify", "(", ")", "{", "const", "inlineDocuments", "=", "(", "Array", ".", "from", "(", "this", ".", "_localFeatures", ")", ".", "filter", "(", "(", "f", ")", "=>", "f", "instanceof", "Document", "&&", "f", ".", "isInline", ")", "as", "Document", "[", "]", ")", ".", "map", "(", "(", "d", ")", "=>", "d", ".", "parsedDocument", ")", ";", "return", "this", ".", "parsedDocument", ".", "stringify", "(", "{", "inlineDocuments", ":", "inlineDocuments", "}", ")", ";", "}", "private", "_indexFeature", "(", "feature", ")", "{", "if", "(", "!", "this", ".", "_featuresByKind", "||", "!", "this", ".", "_featuresByKindAndId", ")", "{", "return", ";", "}", "for", "(", "const", "kind", "of", "feature", ".", "kinds", ")", "{", "const", "kindSet", "=", "this", ".", "_featuresByKind", ".", "get", "(", "kind", ")", "||", "new", "Set", "<", "Feature", ">", "(", ")", ";", "kindSet", ".", "add", "(", "feature", ")", ";", "this", ".", "_featuresByKind", ".", "set", "(", "kind", ",", "kindSet", ")", ";", "for", "(", "const", "id", "of", "feature", ".", "identifiers", ")", "{", "const", "identifiersMap", "=", "this", ".", "_featuresByKindAndId", ".", "get", "(", "kind", ")", "||", "new", "Map", "<", "string", ",", "Set", "<", "Feature", ">", ">", "(", ")", ";", "this", ".", "_featuresByKindAndId", ".", "set", "(", "kind", ",", "identifiersMap", ")", ";", "const", "idSet", "=", "identifiersMap", ".", "get", "(", "id", ")", "||", "new", "Set", "<", "Feature", ">", "(", ")", ";", "identifiersMap", ".", "set", "(", "id", ",", "idSet", ")", ";", "idSet", ".", "add", "(", "feature", ")", ";", "}", "}", "}", "private", "_featuresByKind", ":", "Map", "<", "string", ",", "Set", "<", "Feature", ">", ">", "|", "null", "=", "null", ";", "private", "_featuresByKindAndId", ":", "Map", "<", "string", ",", "Map", "<", "string", ",", "Set", "<", "Feature", ">", ">", ">", "|", "null", "=", "null", ";", "private", "_buildIndexes", "(", ")", "{", "if", "(", "this", ".", "_featuresByKind", ")", "{", "throw", "new", "Error", "(", "'Tried to build indexes multiple times. This should never happen.'", ")", ";", "}", "if", "(", "!", "this", ".", "_doneResolving", ")", "{", "throw", "new", "Error", "(", "`Tried to build indexes before finished resolving. `", "+", "`Need to wait until afterwards or the indexes would be incomplete.`", ")", ";", "}", "this", ".", "_featuresByKind", "=", "new", "Map", "<", "string", ",", "Set", "<", "Feature", ">", ">", "(", ")", ";", "this", ".", "_featuresByKindAndId", "=", "new", "Map", "<", "string", ",", "Map", "<", "string", ",", "Set", "<", "Feature", ">", ">", ">", "(", ")", ";", "for", "(", "const", "feature", "of", "this", ".", "getFeatures", "(", "{", "imported", ":", "true", ",", "externalPackages", ":", "true", "}", ")", ")", "{", "this", ".", "_indexFeature", "(", "feature", ")", ";", "}", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 12625, null, 5, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 5, null, null, null, null, null, 24293, null, null, null, null, null, null, null, 20, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 24294, null, 10984, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 24293, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, 0, null, null, 30, null, 186, null, null, null, 30, null, 186, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, 68, null, 186, null, null, null, null, 30, null, 2, null, 186, null, null, null, null, 30, null, 2, null, 186, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, 68, null, 2, null, 186, null, null, null, null, 30, null, 2, null, 2, null, 186, null, null, null, null, 30, null, 2, null, 2, null, 186, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, 0, null, 2, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, 114, null, 2, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 186, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, 2, null, 186, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 30, null, 30, null, 186, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1670, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, 30, null, null, null, 30, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 186, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, 5893, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 30, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1275
[ "license", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "*", "as", "dom5", "from", "'dom5/lib/index-next'", ";", "import", "{", "ASTNode", "}", "from", "'parse5'", ";", "import", "*", "as", "util", "from", "'util'", ";", "import", "{", "isFakeNode", ",", "ParsedHtmlDocument", "}", "from", "'../html/html-document'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'../javascript/javascript-document'", ";", "import", "*", "as", "jsdoc", "from", "'../javascript/jsdoc'", ";", "import", "{", "Document", ",", "ScannedDocument", "}", "from", "'./document'", ";", "import", "{", "DocumentBackreference", "}", "from", "'./document-backreference'", ";", "import", "{", "ScannedFeature", "}", "from", "'./feature'", ";", "import", "{", "unsafeAsMutable", "}", "from", "'./immutable'", ";", "import", "{", "Resolvable", "}", "from", "'./resolvable'", ";", "import", "{", "LocationOffset", ",", "SourceRange", "}", "from", "'./source-range'", ";", "import", "{", "ResolvedUrl", "}", "from", "'./url'", ";", "import", "{", "Warning", "}", "from", "'./warning'", ";", "export", "interface", "InlineDocInfo", "{", "astNode", "?", ":", "AstNodeWithLanguage", ";", "locationOffset", "?", ":", "LocationOffset", ";", "baseUrl", "?", ":", "ResolvedUrl", ";", "}", "export", "type", "AstNodeWithLanguage", "=", "{", "language", ":", "'html'", ";", "node", ":", "dom5", ".", "Node", ";", "containingDocument", ":", "ParsedHtmlDocument", ";", "}", "|", "{", "language", ":", "'js'", ";", "node", ":", "babel", ".", "Node", ";", "containingDocument", ":", "JavaScriptDocument", ";", "}", ";", "template", "N", "export", "class", "ScannedInlineDocument", "implements", "ScannedFeature", ",", "Resolvable", "{", "readonly", "type", ":", "'html'", "|", "'js'", "|", "'css'", "|", "string", ";", "readonly", "contents", ":", "string", ";", "/** The location offset of this document within the containing document. */", "readonly", "locationOffset", ":", "LocationOffset", ";", "readonly", "attachedComment", "?", ":", "string", ";", "scannedDocument", "?", ":", "ScannedDocument", ";", "readonly", "sourceRange", ":", "SourceRange", ";", "readonly", "warnings", ":", "Warning", "[", "]", "=", "[", "]", ";", "readonly", "astNode", ":", "AstNodeWithLanguage", ";", "constructor", "(", "type", ",", "contents", ",", "locationOffset", ",", "attachedComment", ",", "sourceRange", ",", "astNode", ")", "{", "this", ".", "type", "=", "type", ";", "this", ".", "contents", "=", "contents", ";", "this", ".", "locationOffset", "=", "locationOffset", ";", "this", ".", "attachedComment", "=", "attachedComment", ";", "this", ".", "sourceRange", "=", "sourceRange", ";", "this", ".", "astNode", "=", "astNode", ";", "}", "resolve", "(", "document", ")", "{", "if", "(", "!", "this", ".", "scannedDocument", ")", "{", "return", ";", "}", "const", "inlineDocument", "=", "new", "InlineDocument", "(", "this", ".", "scannedDocument", ",", "document", ")", ";", "inlineDocument", ".", "resolve", "(", ")", ";", "return", "inlineDocument", ";", "}", "}", "declare", "module", "'./queryable'", "{", "interface", "FeatureKindMap", "{", "'inline-document'", ":", "InlineDocument", ";", "}", "}", "export", "class", "InlineDocument", "extends", "Document", "{", "constructor", "(", "base", ",", "containerDocument", ")", "{", "super", "(", "base", ",", "containerDocument", ".", "_analysisContext", ")", ";", "unsafeAsMutable", "(", "this", ".", "kinds", ")", ".", "add", "(", "'inline-document'", ")", ";", "this", ".", "_addFeature", "(", "new", "DocumentBackreference", "(", "containerDocument", ")", ")", ";", "}", "}", "export", "function", "getAttachedCommentText", "(", "node", ")", "{", "const", "commentNode", "=", "getAttachedCommentNode", "(", "node", ")", ";", "if", "(", "!", "commentNode", ")", "{", "return", ";", "}", "const", "comment", "=", "dom5", ".", "getTextContent", "(", "commentNode", ")", ";", "if", "(", "!", "comment", "||", "/@license/", ".", "test", "(", "comment", ")", ")", "{", "return", ";", "}", "return", "jsdoc", ".", "unindent", "(", "comment", ")", ".", "trim", "(", ")", ";", "}", "function", "getAttachedCommentNode", "(", "node", ")", "{", "const", "predecessors", "=", "getPreviousSiblings", "(", "node", ")", ";", "const", "visiblePredecessors", "=", "filterOutInvisibleNodes", "(", "predecessors", ")", ";", "const", "[", "closestVisiblePredecessor", "]", "=", "visiblePredecessors", ";", "if", "(", "!", "closestVisiblePredecessor", ")", "{", "return", ";", "}", "if", "(", "!", "dom5", ".", "isCommentNode", "(", "closestVisiblePredecessor", ")", ")", "{", "return", ";", "}", "return", "closestVisiblePredecessor", ";", "}", "/**\n * Filter out nodes that are just whitespace, or aren't present in the original\n * source text of the file.\n */", "function", "*", "filterOutInvisibleNodes", "(", "nodeIter", ")", "{", "for", "(", "const", "node", "of", "nodeIter", ")", "{", "if", "(", "isFakeNode", "(", "node", ")", ")", "{", "continue", ";", "}", "if", "(", "dom5", ".", "isTextNode", "(", "node", ")", ")", "{", "const", "text", "=", "dom5", ".", "getTextContent", "(", "node", ")", ".", "trim", "(", ")", ";", "if", "(", "text", "===", "''", ")", "{", "continue", ";", "}", "}", "yield", "node", ";", "}", "}", "/**\n * An iterable over siblings that come before the given node.\n *\n * Note that this method gives siblings from the author's point of view, not\n * the pedantic parser's point of view, so we need to traverse some fake\n * nodes. e.g. consider this document\n *\n * <link rel=\"import\" href=\"foo.html\">\n * <dom-module></dom-module>\n *\n * For this method's purposes, these nodes are siblings, but in the AST\n * they're actually cousins! The link is in a hallucinated <head> node, and\n * the dom-module is in a hallucinated <body> node, so to get to the link we\n * need to go up to the body, then back to the head, then back down, but\n * only if the head and body are hallucinated.\n */", "function", "*", "getPreviousSiblings", "(", "node", ")", "{", "const", "parent", "=", "node", ".", "parentNode", ";", "if", "(", "parent", ")", "{", "const", "siblings", "=", "parent", ".", "childNodes", "!", ";", "for", "(", "let", "i", "=", "siblings", ".", "indexOf", "(", "node", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "const", "predecessor", "=", "siblings", "[", "i", "]", ";", "if", "(", "isFakeNode", "(", "predecessor", ")", ")", "{", "if", "(", "predecessor", ".", "childNodes", ")", "{", "yield", "*", "iterReverse", "(", "predecessor", ".", "childNodes", ")", ";", "}", "}", "else", "{", "yield", "predecessor", ";", "}", "}", "if", "(", "isFakeNode", "(", "parent", ")", ")", "{", "yield", "*", "getPreviousSiblings", "(", "parent", ")", ";", "}", "}", "}", "function", "*", "iterReverse", "<", "V", ">", "(", "arr", ")", "{", "for", "(", "let", "i", "=", "arr", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "yield", "arr", "[", "i", "]", ";", "}", "}", "export", "function", "getLocationOffsetOfStartOfTextContent", "(", "node", ",", "parsedDocument", ")", "{", "const", "sourceRange", "=", "parsedDocument", ".", "sourceRangeForStartTag", "(", "node", ")", ";", "if", "(", "!", "sourceRange", ")", "{", "throw", "new", "Error", "(", "`Couldn't extract a location offset from HTML node: `", "+", "`${", "util", ".", "inspect", "(", "node", ")", "}`", ")", ";", "}", "return", "{", "line", ":", "sourceRange", ".", "end", ".", "line", ",", "col", ":", "sourceRange", ".", "end", ".", "column", "}", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, 29923, null, 2, null, 2351, null, 35102, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 91, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 24294, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 330, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 330, null, 330, null, null, null, 114, null, null, null, null, null, null, null, 114, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 114, null, 114, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 114, null, 330, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 114, null, null, null, null, 13, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 29923, null, 330, null, 5827, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1276
[ "license", "import", "{", "AstNodeWithLanguage", "}", "from", "'../model/inline-document'", ";", "import", "{", "correctSourceRange", ",", "LocationOffset", ",", "SourcePosition", ",", "SourceRange", ",", "uncorrectSourceRange", "}", "from", "'../model/source-range'", ";", "import", "{", "ResolvedUrl", "}", "from", "'../model/url'", ";", "template", "AstNode", "template", "Visitor", "export", "abstract", "class", "ParsedDocument", "<", "AstNode", "=", "any", ",", "Visitor", "=", "any", ">", "{", "abstract", "type", ":", "string", ";", "url", ":", "ResolvedUrl", ";", "baseUrl", ":", "ResolvedUrl", ";", "contents", ":", "string", ";", "ast", ":", "AstNode", ";", "isInline", ":", "boolean", ";", "/**\n * If not null, this is an inline document, and astNode is the AST Node of\n * this document inside of the parent. (e.g. the <style> or <script> tag)\n */", "readonly", "astNode", ":", "AstNodeWithLanguage", "|", "undefined", ";", "sourceRange", ":", "SourceRange", ";", "private", "readonly", "_locationOffset", ":", "LocationOffset", "|", "undefined", ";", "/**\n * The 0-based offsets into `contents` of all newline characters.\n *\n * Useful for converting between string offsets and SourcePositions.\n */", "readonly", "newlineIndexes", ":", "number", "[", "]", "=", "[", "]", ";", "constructor", "(", "from", ")", "{", "this", ".", "url", "=", "from", ".", "url", ";", "this", ".", "baseUrl", "=", "from", ".", "baseUrl", "===", "undefined", "?", "this", ".", "url", ":", "from", ".", "baseUrl", ";", "this", ".", "contents", "=", "from", ".", "contents", ";", "this", ".", "ast", "=", "from", ".", "ast", ";", "this", ".", "_locationOffset", "=", "from", ".", "locationOffset", ";", "this", ".", "astNode", "=", "from", ".", "astNode", ";", "this", ".", "isInline", "=", "from", ".", "isInline", ";", "let", "lastSeenLine", "=", "-", "1", ";", "while", "(", "true", ")", "{", "lastSeenLine", "=", "from", ".", "contents", ".", "indexOf", "(", "'\\n'", ",", "lastSeenLine", "+", "1", ")", ";", "if", "(", "lastSeenLine", "===", "-", "1", ")", "{", "break", ";", "}", "this", ".", "newlineIndexes", ".", "push", "(", "lastSeenLine", ")", ";", "}", "this", ".", "sourceRange", "=", "this", ".", "offsetsToSourceRange", "(", "0", ",", "this", ".", "contents", ".", "length", ")", ";", "}", "/**\n * Runs a set of document-type specific visitors against the document.\n */", "abstract", "visit", "(", "visitors", ")", ";", "sourceRangeForNode", "(", "node", ")", "{", "const", "baseSource", "=", "this", ".", "_sourceRangeForNode", "(", "node", ")", ";", "return", "this", ".", "relativeToAbsoluteSourceRange", "(", "baseSource", ")", ";", "}", "protected", "abstract", "_sourceRangeForNode", "(", "node", ")", ";", "/**\n * Convert `this.ast` back into a string document.\n */", "abstract", "stringify", "(", "options", ")", ";", "offsetToSourcePosition", "(", "offset", ")", "{", "const", "linesLess", "=", "binarySearch", "(", "offset", ",", "this", ".", "newlineIndexes", ")", ";", "let", "colOffset", "=", "this", ".", "newlineIndexes", "[", "linesLess", "-", "1", "]", ";", "if", "(", "colOffset", "==", "null", ")", "{", "colOffset", "=", "0", ";", "}", "else", "{", "colOffset", "=", "colOffset", "+", "1", ";", "}", "return", "{", "line", ":", "linesLess", ",", "column", ":", "offset", "-", "colOffset", "}", ";", "}", "offsetsToSourceRange", "(", "start", ",", "end", ")", "{", "const", "sourceRange", "=", "{", "file", ":", "this", ".", "url", ",", "start", ":", "this", ".", "offsetToSourcePosition", "(", "start", ")", ",", "end", ":", "this", ".", "offsetToSourcePosition", "(", "end", ")", "}", ";", "return", "correctSourceRange", "(", "sourceRange", ",", "this", ".", "_locationOffset", ")", "!", ";", "}", "sourcePositionToOffset", "(", "position", ")", "{", "const", "line", "=", "Math", ".", "max", "(", "0", ",", "position", ".", "line", ")", ";", "let", "lineOffset", ";", "if", "(", "line", "===", "0", ")", "{", "lineOffset", "=", "-", "1", ";", "}", "else", "if", "(", "line", ">", "this", ".", "newlineIndexes", ".", "length", ")", "{", "lineOffset", "=", "this", ".", "contents", ".", "length", "-", "1", ";", "}", "else", "{", "lineOffset", "=", "this", ".", "newlineIndexes", "[", "line", "-", "1", "]", ";", "}", "const", "result", "=", "position", ".", "column", "+", "lineOffset", "+", "1", ";", "return", "Math", ".", "min", "(", "Math", ".", "max", "(", "0", ",", "result", ")", ",", "this", ".", "contents", ".", "length", ")", ";", "}", "relativeToAbsoluteSourceRange", "(", "sourceRange", ")", ";", "relativeToAbsoluteSourceRange", "(", "sourceRange", ")", ";", "relativeToAbsoluteSourceRange", "(", "sourceRange", ")", ";", "relativeToAbsoluteSourceRange", "(", "sourceRange", ")", "{", "return", "correctSourceRange", "(", "sourceRange", ",", "this", ".", "_locationOffset", ")", ";", "}", "absoluteToRelativeSourceRange", "(", "sourceRange", ")", ";", "absoluteToRelativeSourceRange", "(", "sourceRange", ")", ";", "absoluteToRelativeSourceRange", "(", "sourceRange", ")", ";", "absoluteToRelativeSourceRange", "(", "sourceRange", ")", "{", "return", "uncorrectSourceRange", "(", "sourceRange", ",", "this", ".", "_locationOffset", ")", ";", "}", "sourceRangeToOffsets", "(", "range", ")", "{", "return", "[", "this", ".", "sourcePositionToOffset", "(", "range", ".", "start", ")", ",", "this", ".", "sourcePositionToOffset", "(", "range", ".", "end", ")", "]", ";", "}", "toString", "(", ")", "{", "if", "(", "this", ".", "isInline", ")", "{", "return", "`Inline ${", "this", ".", "constructor", ".", "name", "} on line `", "+", "`${", "this", ".", "sourceRange", ".", "start", ".", "line", "} of ${", "this", ".", "url", "}`", ";", "}", "return", "`${", "this", ".", "constructor", ".", "name", "} at ${", "this", ".", "url", "}`", ";", "}", "}", "export", "interface", "Options", "<", "A", ">", "{", "url", ":", "ResolvedUrl", ";", "baseUrl", ":", "ResolvedUrl", "|", "undefined", ";", "contents", ":", "string", ";", "ast", ":", "A", ";", "locationOffset", ":", "LocationOffset", "|", "undefined", ";", "astNode", ":", "AstNodeWithLanguage", "|", "undefined", ";", "isInline", ":", "boolean", ";", "}", "export", "interface", "StringifyOptions", "{", "/** The desired level of indentation of to stringify at. */", "indent", "?", ":", "number", ";", "/**\n * Parsed (and possibly modified) documents that exist inside this document\n * whose stringified contents should be used instead of what is in `ast`.\n */", "inlineDocuments", "?", ":", "ParsedDocument", "[", "]", ";", "}", "/**\n * Used solely for constructing warnings about unparsable or unloadable\n * documents.\n */", "export", "class", "UnparsableParsedDocument", "extends", "ParsedDocument", "{", "type", ":", "string", "=", "'unparsable'", ";", "constructor", "(", "url", ",", "contents", ")", "{", "super", "(", "{", "ast", ":", "null", ",", "url", ",", "baseUrl", ":", "url", ",", "astNode", ":", "undefined", ",", "contents", ":", "contents", ",", "isInline", ":", "false", ",", "locationOffset", ":", "undefined", "}", ")", ";", "}", "visit", "(", "_visitors", ")", "{", "return", ";", "}", "protected", "_sourceRangeForNode", "(", "_node", ")", "{", "return", "undefined", ";", "}", "stringify", "(", ")", "{", "return", "`<FakeParsedDocument url=\"${", "this", ".", "url", "}\">`", ";", "}", "}", "/**\n * The variant of binary search that returns the number of elements in the\n * array that is strictly less than the target.\n */", "function", "binarySearch", "(", "target", ",", "arr", ")", "{", "let", "lower", "=", "0", ";", "let", "upper", "=", "arr", ".", "length", "-", "1", ";", "while", "(", "true", ")", "{", "if", "(", "lower", ">", "upper", ")", "{", "return", "lower", ";", "}", "const", "m", "=", "Math", ".", "floor", "(", "(", "upper", "+", "lower", ")", "/", "2", ")", ";", "if", "(", "target", "===", "arr", "[", "m", "]", ")", "{", "return", "m", ";", "}", "if", "(", "target", ">", "arr", "[", "m", "]", ")", "{", "lower", "=", "m", "+", "1", ";", "}", "else", "{", "upper", "=", "m", "-", "1", ";", "}", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 74, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 5, null, null, 2351, null, 1294, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 1294, null, null, null, null, 2, null, 17963, null, null, 3806, null, 3, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 3, null, 3, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, 3806, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 2351, null, null, 126, null, 126, null, null, 2351, null, 2351, null, null, 2351, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 2351, null, null, 126, null, 126, null, null, 2351, null, 2351, null, null, 2351, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1462, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 5, null, null, null, null, null, null, 126, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, 3, null, 5, null, null, null, 3, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1277
[ "license", "import", "*", "as", "shady", "from", "'shady-css-parser'", ";", "import", "{", "SourceRange", "}", "from", "'../model/model'", ";", "import", "{", "ParsedDocument", ",", "StringifyOptions", "}", "from", "'../parser/document'", ";", "import", "cssbeautify", "=", "require", "(", "'cssbeautify'", ")", ";", "export", "interface", "Visitor", "{", "visit", "(", "node", ")", ":", "void", ";", "}", "export", "class", "ParsedCssDocument", "extends", "ParsedDocument", "<", "shady", ".", "Node", ",", "Visitor", ">", "{", "readonly", "type", "=", "'css'", ";", "visit", "(", "visitors", ")", "{", "for", "(", "const", "node", "of", "this", ")", "{", "for", "(", "const", "visitor", "of", "visitors", ")", "{", "visitor", ".", "visit", "(", "node", ")", ";", "}", "}", "}", "sourceRangeForNode", "(", "node", ")", "{", "return", "this", ".", "sourceRangeForShadyRange", "(", "node", ".", "range", ")", ";", "}", "/**\n * Takes a range from a shadycss node directly, rather than a shadycss node.\n * Useful when there are multiple ranges for a given node.\n */", "sourceRangeForShadyRange", "(", "range", ")", "{", "return", "this", ".", "offsetsToSourceRange", "(", "range", ".", "start", ",", "range", ".", "end", ")", ";", "}", "protected", "_sourceRangeForNode", "(", "node", ")", "{", "return", "this", ".", "sourceRangeForShadyRange", "(", "node", ".", "range", ")", ";", "}", "stringify", "(", "options", "?", ")", "{", "options", "=", "options", "||", "{", "}", ";", "shadyStringifier", ".", "visit", ";", "const", "beautifulResults", "=", "cssbeautify", "(", "shadyStringifier", ".", "stringify", "(", "this", ".", "ast", ")", ",", "{", "indent", ":", "' '", ",", "autosemicolon", ":", "true", ",", "openbrace", ":", "'end-of-line'", "}", ")", ";", "const", "indent", "=", "' '", ".", "repeat", "(", "options", ".", "indent", "||", "0", ")", ";", "return", "beautifulResults", ".", "split", "(", "'\\n'", ")", ".", "map", "(", "(", "line", ")", "=>", "line", "===", "''", "?", "''", ":", "indent", "+", "line", ")", ".", "join", "(", "'\\n'", ")", "+", "'\\n'", ";", "}", "*", "[", "Symbol", ".", "iterator", "]", "(", ")", "{", "yield", "*", "shady", ".", "iterateOverAst", "(", "this", ".", "ast", ")", ";", "}", "}", "const", "shadyStringifier", "=", "new", "shady", ".", "Stringifier", "(", ")", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 5, null, null, null, null, null, 24, null, null, null, null, null, null, null, 953, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 17963, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1278
[ "license", "import", "{", "Analyzer", "}", "from", "'../core/analyzer'", ";", "import", "{", "ImmutableArray", "}", "from", "'../model/immutable'", ";", "import", "{", "ScannedFeature", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "ParsedDocument", "}", "from", "'../parser/document'", ";", "template", "D", "template", "A", "template", "V", "export", "interface", "Scanner", "<", "D", "extends", "ParsedDocument", "<", "A", ",", "V", ">", ",", "A", ",", "V", ">", "{", "scan", "(", "document", ",", "visit", ")", ":", "Promise", "<", "{", "features", ":", "ImmutableArray", "<", "ScannedFeature", ">", ";", "warnings", "?", ":", "ImmutableArray", "<", "Warning", ">", ";", "}", ">", ";", "}", "export", "interface", "ScannerConstructor", "{", "new", "(", "analyzer", ")", ":", "Scanner", "<", "any", ",", "any", ",", "any", ">", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 344, null, 7, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1344, null, null, null, null, null, null, null, null, null, null, null, null ]
1279
[ "license", "import", "*", "as", "shady", "from", "'shady-css-parser'", ";", "import", "{", "ImmutableArray", "}", "from", "'../model/immutable'", ";", "import", "{", "Feature", ",", "ScannedFeature", ",", "SourceRange", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "ParsedCssDocument", ",", "Visitor", "}", "from", "'./css-document'", ";", "import", "{", "CssScanner", "}", "from", "'./css-scanner'", ";", "export", "class", "CssCustomPropertyScanner", "implements", "CssScanner", "{", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "warnings", "=", "[", "]", ";", "const", "visitor", "=", "new", "CssCustomPropertyVisitor", "(", "document", ")", ";", "await", "visit", "(", "visitor", ")", ";", "return", "{", "features", ":", "visitor", ".", "features", ",", "warnings", "}", ";", "}", "}", "declare", "module", "'../model/queryable'", "{", "interface", "FeatureKindMap", "{", "'css-custom-property-assignment'", ":", "CssCustomPropertyAssignment", ";", "}", "}", "export", "class", "CssCustomPropertyAssignment", "implements", "ScannedFeature", ",", "Feature", "{", "readonly", "sourceRange", ":", "SourceRange", ";", "readonly", "warnings", ":", "ImmutableArray", "<", "Warning", ">", "=", "[", "]", ";", "readonly", "kinds", "=", "new", "Set", "(", "[", "'css-custom-property-assignment'", "]", ")", ";", "readonly", "identifiers", ":", "Set", "<", "string", ">", ";", "readonly", "name", ":", "string", ";", "constructor", "(", "name", ",", "sourceRange", ")", "{", "this", ".", "identifiers", "=", "new", "Set", "(", "[", "name", "]", ")", ";", "this", ".", "name", "=", "name", ";", "this", ".", "sourceRange", "=", "sourceRange", ";", "}", "resolve", "(", ")", "{", "return", "this", ";", "}", "}", "declare", "module", "'../model/queryable'", "{", "interface", "FeatureKindMap", "{", "'css-custom-property-use'", ":", "CssCustomPropertyUse", ";", "}", "}", "export", "class", "CssCustomPropertyUse", "implements", "ScannedFeature", ",", "Feature", "{", "readonly", "sourceRange", ":", "SourceRange", ";", "readonly", "warnings", ":", "ImmutableArray", "<", "Warning", ">", "=", "[", "]", ";", "readonly", "kinds", "=", "new", "Set", "(", "[", "'css-custom-property-use'", "]", ")", ";", "readonly", "identifiers", ":", "Set", "<", "string", ">", ";", "readonly", "name", ":", "string", ";", "constructor", "(", "name", ",", "sourceRange", ")", "{", "this", ".", "identifiers", "=", "new", "Set", "(", "[", "name", "]", ")", ";", "this", ".", "sourceRange", "=", "sourceRange", ";", "this", ".", "name", "=", "name", ";", "}", "resolve", "(", ")", "{", "return", "this", ";", "}", "}", "class", "CssCustomPropertyVisitor", "implements", "Visitor", "{", "features", ":", "CssCustomPropertyAssignment", "[", "]", "=", "[", "]", ";", "constructor", "(", "private", "document", ")", "{", "}", "visit", "(", "node", ")", "{", "if", "(", "node", ".", "type", "===", "shady", ".", "nodeType", ".", "declaration", "&&", "node", ".", "name", ".", "startsWith", "(", "'--'", ")", ")", "{", "this", ".", "features", ".", "push", "(", "new", "CssCustomPropertyAssignment", "(", "node", ".", "name", ",", "this", ".", "document", ".", "sourceRangeForShadyRange", "(", "node", ".", "nameRange", ")", ")", ")", ";", "}", "else", "if", "(", "node", ".", "type", "===", "shady", ".", "nodeType", ".", "expression", ")", "{", "this", ".", "getCustomPropertiesIn", "(", "node", ".", "text", ",", "node", ".", "range", ")", ";", "}", "else", "if", "(", "node", ".", "type", "===", "shady", ".", "nodeType", ".", "atRule", "&&", "node", ".", "parametersRange", ")", "{", "this", ".", "getCustomPropertiesIn", "(", "node", ".", "parameters", ",", "node", ".", "parametersRange", ")", ";", "}", "}", "private", "static", "readonly", "customPropRegex", "=", "/--[A-Za-z0-9_\\-]+/", ";", "private", "getCustomPropertiesIn", "(", "text", ",", "range", ")", "{", "const", "matches", "=", "findAllMatchesInString", "(", "CssCustomPropertyVisitor", ".", "customPropRegex", ",", "text", ")", ";", "const", "baseOffset", "=", "range", ".", "start", ";", "for", "(", "const", "{", "offset", ",", "matched", "}", "of", "matches", ")", "{", "const", "range", "=", "this", ".", "document", ".", "sourceRangeForShadyRange", "(", "{", "start", ":", "offset", "+", "baseOffset", ",", "end", ":", "offset", "+", "baseOffset", "+", "matched", ".", "length", "}", ")", ";", "this", ".", "features", ".", "push", "(", "new", "CssCustomPropertyUse", "(", "matched", ",", "range", ")", ")", ";", "}", "}", "}", "function", "*", "findAllMatchesInString", "(", "regex", ",", "haystack", ")", "{", "regex", "=", "new", "RegExp", "(", "regex", ",", "'g'", ")", ";", "let", "match", ";", "while", "(", "match", "=", "regex", ".", "exec", "(", "haystack", ")", ")", "{", "yield", "{", "offset", ":", "match", ".", "index", ",", "matched", ":", "match", "[", "0", "]", "}", ";", "}", "}", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 29924, null, 7, null, null, null, 5, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 29924, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 2, null, 0, null, null, null, 95, null, null, null, null, null, null, null, null, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 95, null, 27, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1280
[ "license", "import", "{", "parse", "as", "parseUrl_", ",", "resolve", "as", "resolveUrl_", ",", "Url", "}", "from", "'url'", ";", "const", "unspecifiedProtocol", "=", "'-'", ";", "export", "function", "parseUrl", "(", "url", ",", "defaultProtocol", "=", "unspecifiedProtocol", ")", "{", "const", "urlObject", "=", "parseUrl_", "(", "ensureProtocol", "(", "url", ",", "defaultProtocol", ")", ")", ";", "if", "(", "urlObject", ".", "protocol", "&&", "urlObject", ".", "protocol", ".", "slice", "(", "0", ",", "-", "1", ")", "===", "unspecifiedProtocol", ")", "{", "urlObject", ".", "protocol", "=", "undefined", ";", "urlObject", ".", "href", "=", "urlObject", ".", "href", "&&", "urlObject", ".", "href", ".", "slice", "(", "unspecifiedProtocol", ".", "length", "+", "1", ")", ";", "}", "return", "urlObject", ";", "}", "export", "function", "ensureProtocol", "(", "url", ",", "defaultProtocol", ")", "{", "return", "url", ".", "startsWith", "(", "'//'", ")", "?", "`${", "defaultProtocol", "}:${", "url", "}`", ":", "url", ";", "}", "export", "function", "resolveUrl", "(", "baseUrl", ",", "targetUrl", ",", "defaultProtocol", ")", "{", "const", "baseProtocol", "=", "(", "parseUrl_", "(", "baseUrl", ")", ".", "protocol", "||", "''", ")", ".", "slice", "(", "0", ",", "-", "1", ")", ";", "const", "protocol", "=", "baseProtocol", "!==", "'file'", "&&", "baseProtocol", "||", "defaultProtocol", ";", "return", "resolveUrl_", "(", "ensureProtocol", "(", "baseUrl", ",", "protocol", ")", ",", "ensureProtocol", "(", "targetUrl", ",", "protocol", ")", ")", ";", "}", "export", "function", "trimLeft", "(", "str", ",", "char", ")", "{", "let", "leftEdge", "=", "0", ";", "while", "(", "str", "[", "leftEdge", "]", "===", "char", ")", "{", "leftEdge", "++", ";", "}", "return", "str", ".", "substring", "(", "leftEdge", ")", ";", "}", "export", "class", "Deferred", "<", "T", ">", "{", "promise", ":", "Promise", "<", "T", ">", ";", "resolve", "!", ":", "(", "result", ":", "T", ")", "=>", "void", ";", "reject", "!", ":", "(", "error", ":", "Error", ")", "=>", "void", ";", "resolved", "=", "false", ";", "rejected", "=", "false", ";", "error", ":", "any", ";", "constructor", "(", ")", "{", "this", ".", "promise", "=", "new", "Promise", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "this", ".", "resolve", "=", "(", "result", ")", "=>", "{", "if", "(", "this", ".", "resolved", ")", "{", "throw", "new", "Error", "(", "'Already resolved'", ")", ";", "}", "if", "(", "this", ".", "rejected", ")", "{", "throw", "new", "Error", "(", "'Already rejected'", ")", ";", "}", "this", ".", "resolved", "=", "true", ";", "resolve", "(", "result", ")", ";", "}", ";", "this", ".", "reject", "=", "(", "error", ")", "=>", "{", "if", "(", "this", ".", "resolved", ")", "{", "throw", "new", "Error", "(", "'Already resolved'", ")", ";", "}", "if", "(", "this", ".", "rejected", ")", "{", "throw", "new", "Error", "(", "'Already rejected'", ")", ";", "}", "this", ".", "rejected", "=", "true", ";", "this", ".", "error", "=", "error", ";", "reject", "(", "error", ")", ";", "}", ";", "}", ")", ";", "}", "toNodeCallback", "(", ")", "{", "return", "(", "error", ",", "value", ")", "=>", "{", "if", "(", "error", ")", "{", "this", ".", "reject", "(", "error", ")", ";", "}", "else", "{", "this", ".", "resolve", "(", "value", ")", ";", "}", "}", ";", "}", "}", "export", "function", "addAll", "<", "T", ">", "(", "set1", ",", "set2", ")", "{", "for", "(", "const", "val", "of", "set2", ")", "{", "set1", ".", "add", "(", "val", ")", ";", "}", "return", "set1", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, 3426, null, 2, null, 2, null, null, null, null, null, 3426, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, 2, null, 2, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2, null, 2, null, null, null, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 4, null, null, null, null, null, null, null, null, 11, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 25, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, null, null, null, null, 11, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 30, null, null, null, null, 30, null, 30, null, null, null, null, null, 11, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1281
[ "license", "import", "*", "as", "path", "from", "'path'", ";", "import", "{", "format", "as", "urlLibFormat", "}", "from", "'url'", ";", "import", "{", "parseUrl", ",", "resolveUrl", "}", "from", "'../core/utils'", ";", "import", "{", "PackageRelativeUrl", ",", "ScannedImport", "}", "from", "'../index'", ";", "import", "{", "FileRelativeUrl", ",", "ResolvedUrl", "}", "from", "'../model/url'", ";", "/**\n * Resolves the given URL to the concrete URL that a resource can\n * be loaded from.\n *\n * This can be useful to resolve name to paths, such as resolving 'polymer' to\n * '../polymer/polymer.html', or component paths, like '../polymer/polymer.html'\n * to '/bower_components/polymer/polymer.html'.\n */", "export", "abstract", "class", "UrlResolver", "{", "/**\n * Resoves `url` to a new location.\n *\n * Returns `undefined` if the given url cannot be resolved.\n */", "abstract", "resolve", "(", "url", ")", ";", "abstract", "resolve", "(", "baseUrl", ",", "url", ",", "scannedImport", "?", ")", ";", "abstract", "relative", "(", "to", ")", ";", "abstract", "relative", "(", "from", ",", "to", ",", "kind", "?", ")", ";", "protected", "getBaseAndUnresolved", "(", "url1", ",", "url2", "?", ")", "{", "return", "url2", "===", "undefined", "?", "[", "undefined", ",", "this", ".", "brandAsPackageRelative", "(", "url1", ")", "]", ":", "[", "this", ".", "brandAsResolved", "(", "url1", ")", ",", "this", ".", "brandAsFileRelative", "(", "url2", ")", "]", ";", "}", "protected", "simpleUrlResolve", "(", "baseUrl", ",", "url", ",", "defaultProtocol", ")", "{", "return", "this", ".", "brandAsResolved", "(", "resolveUrl", "(", "baseUrl", ",", "url", ",", "defaultProtocol", ")", ")", ";", "}", "protected", "simpleUrlRelative", "(", "from", ",", "to", ")", "{", "const", "fromUrl", "=", "parseUrl", "(", "from", ")", ";", "const", "toUrl", "=", "parseUrl", "(", "to", ")", ";", "if", "(", "typeof", "toUrl", ".", "protocol", "===", "'string'", "&&", "fromUrl", ".", "protocol", "!==", "toUrl", ".", "protocol", "||", "typeof", "toUrl", ".", "slashes", "===", "'boolean'", "&&", "fromUrl", ".", "slashes", "!==", "toUrl", ".", "slashes", "||", "typeof", "toUrl", ".", "host", "===", "'string'", "&&", "fromUrl", ".", "host", "!==", "toUrl", ".", "host", "||", "typeof", "toUrl", ".", "auth", "===", "'string'", "&&", "fromUrl", ".", "auth", "!==", "toUrl", ".", "auth", ")", "{", "return", "this", ".", "brandAsFileRelative", "(", "to", ")", ";", "}", "let", "pathname", ";", "const", "{", "search", ",", "hash", "}", "=", "toUrl", ";", "if", "(", "fromUrl", ".", "pathname", "===", "toUrl", ".", "pathname", ")", "{", "pathname", "=", "''", ";", "}", "else", "{", "const", "fromDir", "=", "typeof", "fromUrl", ".", "pathname", "===", "'string'", "?", "fromUrl", ".", "pathname", ".", "replace", "(", "/[^/]+$/", ",", "''", ")", ":", "''", ";", "const", "toDir", "=", "typeof", "toUrl", ".", "pathname", "===", "'string'", "&&", "typeof", "toUrl", ".", "pathname", "===", "'string'", "?", "toUrl", ".", "pathname", ":", "''", ";", "const", "pathlib", "=", "path", ".", "posix", "||", "path", ";", "pathname", "=", "pathlib", ".", "relative", "(", "fromDir", ",", "toDir", "+", "'_'", ")", ".", "replace", "(", "/_$/", ",", "''", ")", ";", "}", "return", "this", ".", "brandAsFileRelative", "(", "urlLibFormat", "(", "{", "pathname", ",", "search", ",", "hash", "}", ")", ")", ";", "}", "protected", "brandAsFileRelative", "(", "url", ")", "{", "return", "url", "as", "FileRelativeUrl", ";", "}", "protected", "brandAsPackageRelative", "(", "url", ")", "{", "return", "url", "as", "PackageRelativeUrl", ";", "}", "protected", "brandAsResolved", "(", "url", ")", "{", "return", "url", "as", "ResolvedUrl", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1462, null, 17964, null, null, null, 1462, null, 1462, null, 7135, null, 18800, null, null, null, null, 17964, null, 1462, null, null, null, 7135, null, 1462, null, 1462, null, 2, null, null, null, null, 5, null, null, null, 7135, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1462, null, 1462, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7135, null, 1462, null, 1462, null, null, null, 3426, null, null, null, null, null, null, null, 3426, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7135, null, 2, null, null, null, null, null, null, null, null, null, 17964, null, 2, null, null, null, null, null, null, null, null, null, 1462, null, 2, null, null, null, null, null, null, null, null, null ]
1282
[ "license", "import", "*", "as", "shadyCss", "from", "'shady-css-parser'", ";", "import", "{", "InlineDocInfo", "}", "from", "'../model/model'", ";", "import", "{", "ResolvedUrl", "}", "from", "'../model/url'", ";", "import", "{", "Parser", "}", "from", "'../parser/parser'", ";", "import", "{", "UrlResolver", "}", "from", "'../url-loader/url-resolver'", ";", "import", "{", "ParsedCssDocument", "}", "from", "'./css-document'", ";", "export", "class", "CssParser", "implements", "Parser", "<", "ParsedCssDocument", ">", "{", "private", "_parser", ":", "shadyCss", ".", "Parser", ";", "constructor", "(", ")", "{", "this", ".", "_parser", "=", "new", "shadyCss", ".", "Parser", "(", ")", ";", "}", "parse", "(", "contents", ",", "url", ",", "_urlResolver", ",", "inlineInfo", "?", ")", "{", "const", "ast", "=", "this", ".", "_parser", ".", "parse", "(", "contents", ")", ";", "const", "isInline", "=", "!", "!", "inlineInfo", ";", "inlineInfo", "=", "inlineInfo", "||", "{", "}", ";", "return", "new", "ParsedCssDocument", "(", "{", "url", ",", "baseUrl", ":", "inlineInfo", ".", "baseUrl", ",", "contents", ",", "ast", ",", "locationOffset", ":", "inlineInfo", ".", "locationOffset", ",", "astNode", ":", "inlineInfo", ".", "astNode", ",", "isInline", ",", "}", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 29924, null, 2, null, 1462, null, 13912, null, 0, null, null, null, null, 2847, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1283
[ "license", "import", "*", "as", "dom5", "from", "'dom5/lib/index-next'", ";", "import", "{", "Feature", ",", "Resolvable", ",", "SourceRange", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "Document", "}", "from", "'./document'", ";", "import", "{", "ImmutableArray", ",", "ImmutableMap", ",", "ImmutableSet", "}", "from", "'./immutable'", ";", "export", "interface", "Attribute", "{", "readonly", "name", ":", "string", ";", "readonly", "sourceRange", ":", "SourceRange", ";", "readonly", "nameSourceRange", ":", "SourceRange", ";", "readonly", "valueSourceRange", ":", "SourceRange", "|", "undefined", ";", "readonly", "value", "?", ":", "string", ";", "}", "declare", "module", "'../model/queryable'", "{", "interface", "FeatureKindMap", "{", "'element-reference'", ":", "ElementReference", ";", "}", "}", "export", "class", "ElementReference", "implements", "Feature", "{", "readonly", "tagName", ":", "string", ";", "readonly", "attributes", ":", "ImmutableMap", "<", "string", ",", "Attribute", ">", ";", "readonly", "sourceRange", ":", "SourceRange", ";", "readonly", "astNode", ":", "dom5", ".", "Node", ";", "readonly", "warnings", ":", "ImmutableArray", "<", "Warning", ">", ";", "readonly", "kinds", ":", "ImmutableSet", "<", "string", ">", "=", "new", "Set", "(", "[", "'element-reference'", "]", ")", ";", "constructor", "(", "scannedRef", ",", "_document", ")", "{", "this", ".", "tagName", "=", "scannedRef", ".", "tagName", ";", "this", ".", "attributes", "=", "scannedRef", ".", "attributes", ";", "this", ".", "sourceRange", "=", "scannedRef", ".", "sourceRange", ";", "this", ".", "astNode", "=", "scannedRef", ".", "astNode", ";", "this", ".", "warnings", "=", "scannedRef", ".", "warnings", ";", "}", "get", "identifiers", "(", ")", ":", "ImmutableSet", "<", "string", ">", "{", "return", "new", "Set", "(", "[", "this", ".", "tagName", "]", ")", ";", "}", "}", "export", "class", "ScannedElementReference", "implements", "Resolvable", "{", "readonly", "tagName", ":", "string", ";", "readonly", "attributes", "=", "new", "Map", "<", "string", ",", "Attribute", ">", "(", ")", ";", "readonly", "sourceRange", ":", "SourceRange", ";", "readonly", "astNode", ":", "dom5", ".", "Node", ";", "readonly", "warnings", ":", "ImmutableArray", "<", "Warning", ">", "=", "[", "]", ";", "constructor", "(", "tagName", ",", "sourceRange", ",", "ast", ")", "{", "this", ".", "tagName", "=", "tagName", ";", "this", ".", "sourceRange", "=", "sourceRange", ";", "this", ".", "astNode", "=", "ast", ";", "}", "resolve", "(", "document", ")", "{", "return", "new", "ElementReference", "(", "this", ",", "document", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 46497, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 2351, null, 16520, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1284
[ "license", "import", "*", "as", "dom5", "from", "'dom5/lib/index-next'", ";", "import", "{", "ScannedImport", "}", "from", "'../model/model'", ";", "import", "{", "FileRelativeUrl", ",", "PackageRelativeUrl", ",", "ResolvedUrl", "}", "from", "'../model/url'", ";", "import", "{", "HtmlVisitor", ",", "ParsedHtmlDocument", "}", "from", "'./html-document'", ";", "import", "{", "HtmlScanner", "}", "from", "'./html-scanner'", ";", "const", "p", "=", "dom5", ".", "predicates", ";", "const", "linkTag", "=", "p", ".", "hasTagName", "(", "'link'", ")", ";", "const", "notCssLink", "=", "p", ".", "NOT", "(", "p", ".", "hasAttrValue", "(", "'type'", ",", "'css'", ")", ")", ";", "const", "isHtmlImportNode", "=", "p", ".", "AND", "(", "linkTag", ",", "p", ".", "hasAttr", "(", "'href'", ")", ",", "p", ".", "hasSpaceSeparatedAttrValue", "(", "'rel'", ",", "'import'", ")", ",", "p", ".", "NOT", "(", "p", ".", "hasSpaceSeparatedAttrValue", "(", "'rel'", ",", "'lazy-import'", ")", ")", ",", "notCssLink", ",", "p", ".", "NOT", "(", "p", ".", "parentMatches", "(", "p", ".", "hasTagName", "(", "'template'", ")", ")", ")", ")", ";", "const", "isLazyImportNode", "=", "p", ".", "AND", "(", "p", ".", "hasTagName", "(", "'link'", ")", ",", "p", ".", "hasSpaceSeparatedAttrValue", "(", "'rel'", ",", "'lazy-import'", ")", ",", "p", ".", "hasAttr", "(", "'href'", ")", ",", "p", ".", "NOT", "(", "p", ".", "hasSpaceSeparatedAttrValue", "(", "'rel'", ",", "'import'", ")", ")", ",", "notCssLink", ",", "p", ".", "NOT", "(", "p", ".", "parentMatches", "(", "p", ".", "hasTagName", "(", "'template'", ")", ")", ")", ")", ";", "/**\n * Scans for <link rel=\"import\"> and <link rel=\"lazy-import\">\n */", "export", "class", "HtmlImportScanner", "implements", "HtmlScanner", "{", "constructor", "(", "private", "_lazyEdges", "?", ")", "{", "}", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "imports", "=", "[", "]", ";", "const", "type", "=", "'html-import'", ";", "await", "visit", "(", "(", "node", ")", "=>", "{", "let", "lazy", ";", "if", "(", "isHtmlImportNode", "(", "node", ")", ")", "{", "lazy", "=", "false", ";", "}", "else", "if", "(", "isLazyImportNode", "(", "node", ")", ")", "{", "lazy", "=", "true", ";", "}", "else", "{", "return", ";", "}", "const", "href", "=", "dom5", ".", "getAttribute", "(", "node", ",", "'href'", ")", "!", "as", "FileRelativeUrl", ";", "imports", ".", "push", "(", "new", "ScannedImport", "(", "type", ",", "href", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "document", ".", "sourceRangeForAttributeValue", "(", "node", ",", "'href'", ")", "!", ",", "node", ",", "lazy", ")", ")", ";", "}", ")", ";", "if", "(", "this", ".", "_lazyEdges", ")", "{", "const", "edges", "=", "this", ".", "_lazyEdges", ".", "get", "(", "document", ".", "url", ")", ";", "if", "(", "edges", ")", "{", "for", "(", "const", "edge", "of", "edges", ")", "{", "imports", ".", "push", "(", "new", "ScannedImport", "(", "type", ",", "edge", "as", "any", ",", "undefined", ",", "undefined", ",", "null", ",", "true", ")", ")", ";", "}", "}", "}", "return", "{", "features", ":", "imports", "}", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, 305, null, null, null, null, null, null, null, null, null, 305, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 305, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 305, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, null, null, 7, null, 5827, null, 7, null, null, null, 5, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7135, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 17964, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1285
[ "license", "import", "{", "Document", ",", "DocumentBackreference", ",", "Import", ",", "ScannedImport", "}", "from", "'../model/model'", ";", "/**\n * <script> tags are represented in two different ways: as inline documents,\n * or as imports, depending on whether the tag has a `src` attribute. This class\n * represents a script tag with a `src` attribute as an import, so that the\n * analyzer loads and parses the referenced document.\n */", "export", "class", "ScriptTagImport", "extends", "Import", "{", "readonly", "type", "=", "'html-script'", ";", "}", "export", "class", "ScannedScriptTagImport", "extends", "ScannedImport", "{", "resolve", "(", "document", ")", "{", "const", "resolvedUrl", "=", "this", ".", "getLoadableUrlOrWarn", "(", "document", ")", ";", "if", "(", "this", ".", "url", "===", "undefined", "||", "resolvedUrl", "===", "undefined", ")", "{", "return", "undefined", ";", "}", "const", "scannedDocument", "=", "document", ".", "_analysisContext", ".", "_getScannedDocument", "(", "resolvedUrl", ")", ";", "let", "importedDocument", ";", "if", "(", "scannedDocument", "===", "undefined", ")", "{", "this", ".", "addCouldNotLoadWarning", "(", "document", ")", ";", "importedDocument", "=", "undefined", ";", "}", "else", "{", "importedDocument", "=", "new", "Document", "(", "scannedDocument", ",", "document", ".", "_analysisContext", ")", ";", "const", "backReference", "=", "new", "DocumentBackreference", "(", "document", ")", ";", "importedDocument", ".", "_addFeature", "(", "backReference", ")", ";", "importedDocument", ".", "resolve", "(", ")", ";", "}", "return", "new", "ScriptTagImport", "(", "resolvedUrl", ",", "this", ".", "url", ",", "this", ".", "type", ",", "importedDocument", ",", "this", ".", "sourceRange", ",", "this", ".", "urlSourceRange", ",", "this", ".", "astNode", ",", "this", ".", "warnings", ",", "false", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 91, null, null, null, 1462, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 24294, null, null, null, null, null, null, null, null, null, null, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1286
[ "license", "import", "{", "NodePath", "}", "from", "'@babel/traverse'", ";", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "*", "as", "util", "from", "'util'", ";", "import", "*", "as", "esutil", "from", "'../javascript/esutil'", ";", "import", "{", "Annotation", "}", "from", "'../javascript/jsdoc'", ";", "import", "{", "Result", "}", "from", "'./analysis'", ";", "import", "{", "Document", "}", "from", "'./document'", ";", "import", "{", "Feature", ",", "ScannedFeature", "}", "from", "'./feature'", ";", "import", "{", "FeatureKindMap", "}", "from", "'./queryable'", ";", "import", "{", "Resolvable", "}", "from", "'./resolvable'", ";", "import", "{", "SourceRange", "}", "from", "'./source-range'", ";", "import", "{", "Severity", ",", "Warning", "}", "from", "'./warning'", ";", "/**\n * A reference to another feature by identifier.\n */", "export", "class", "ScannedReference", "<", "K", "extends", "keyof", "FeatureKindMap", ">", "extends", "ScannedFeature", "implements", "Resolvable", "{", "readonly", "identifier", ":", "string", ";", "readonly", "kind", ":", "K", ";", "readonly", "sourceRange", ":", "SourceRange", "|", "undefined", ";", "readonly", "astPath", ":", "NodePath", ";", "readonly", "astNode", ":", "babel", ".", "Node", "|", "undefined", ";", "constructor", "(", "kind", ",", "identifier", ",", "sourceRange", ",", "astNode", ",", "astPath", ",", "description", "?", ",", "jsdoc", "?", ",", "warnings", "?", ")", "{", "super", "(", "sourceRange", ",", "astNode", ",", "description", ",", "jsdoc", ",", "warnings", ")", ";", "this", ".", "kind", "=", "kind", ";", "this", ".", "astNode", "=", "astNode", ";", "this", ".", "astPath", "=", "astPath", ";", "this", ".", "sourceRange", "=", "sourceRange", ";", "this", ".", "identifier", "=", "identifier", ";", "}", "resolve", "(", "document", ")", "{", "return", "this", ".", "resolveWithKind", "(", "document", ",", "this", ".", "kind", ")", ";", "}", "resolveWithKind", "<", "DK", "extends", "keyof", "FeatureKindMap", ">", "(", "document", ",", "kind", ")", "{", "let", "feature", ";", "const", "warnings", "=", "[", "...", "this", ".", "warnings", "]", ";", "const", "scopedResult", "=", "resolveScopedAt", "(", "this", ".", "astPath", ",", "this", ".", "identifier", ",", "document", ",", "kind", ")", ";", "if", "(", "scopedResult", ".", "successful", ")", "{", "feature", "=", "scopedResult", ".", "value", ";", "}", "else", "{", "if", "(", "scopedResult", ".", "error", "!==", "undefined", ")", "{", "warnings", ".", "push", "(", "scopedResult", ".", "error", ")", ";", "}", "}", "if", "(", "feature", "===", "undefined", ")", "{", "const", "features", "=", "document", ".", "getFeatures", "(", "{", "imported", ":", "true", ",", "externalPackages", ":", "true", ",", "kind", ",", "id", ":", "this", ".", "identifier", "}", ")", ";", "if", "(", "this", ".", "sourceRange", ")", "{", "if", "(", "features", ".", "size", "===", "0", ")", "{", "let", "message", "=", "`Could not resolve reference to ${", "this", ".", "kind", "}`", ";", "if", "(", "kind", "===", "'behavior'", ")", "{", "message", "+=", "`. Is it annotated with @polymerBehavior?`", ";", "}", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "code", ":", "'could-not-resolve-reference'", ",", "sourceRange", ":", "this", ".", "sourceRange", ",", "message", ",", "parsedDocument", ":", "document", ".", "parsedDocument", ",", "severity", ":", "Severity", ".", "WARNING", "}", ")", ")", ";", "}", "else", "if", "(", "features", ".", "size", ">", "1", ")", "{", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "code", ":", "'multiple-global-declarations'", ",", "sourceRange", ":", "this", ".", "sourceRange", ",", "message", ":", "`Multiple global declarations of ${", "this", ".", "kind", "} with identifier ${", "this", ".", "identifier", "}`", ",", "parsedDocument", ":", "document", ".", "parsedDocument", ",", "severity", ":", "Severity", ".", "WARNING", "}", ")", ")", ";", "}", "}", "[", "feature", "]", "=", "features", ";", "}", "return", "new", "Reference", "<", "FeatureKindMap", "[", "K", "]", ">", "(", "this", ",", "feature", ",", "warnings", ")", ";", "}", "}", "function", "resolveScopedAt", "<", "K", "extends", "keyof", "FeatureKindMap", ">", "(", "path", ",", "identifier", ",", "document", ",", "kind", ")", "{", "if", "(", "isSomeKindOfImport", "(", "path", ")", ")", "{", "const", "exportedIdentifier", "=", "getExportedIdentifier", "(", "path", ".", "node", ",", "identifier", ")", ";", "return", "resolveThroughImport", "(", "path", ",", "exportedIdentifier", ",", "document", ",", "kind", ")", ";", "}", "const", "statement", "=", "esutil", ".", "getCanonicalStatement", "(", "path", ")", ";", "if", "(", "statement", "===", "undefined", ")", "{", "return", "{", "successful", ":", "false", ",", "error", ":", "undefined", "}", ";", "}", "const", "features", "=", "document", ".", "getFeatures", "(", "{", "kind", ",", "id", ":", "identifier", ",", "statement", "}", ")", ";", "if", "(", "features", ".", "size", ">", "1", ")", "{", "return", "{", "successful", ":", "false", ",", "error", ":", "undefined", "}", ";", "}", "const", "[", "feature", "]", "=", "features", ";", "if", "(", "feature", "!==", "undefined", ")", "{", "return", "{", "successful", ":", "true", ",", "value", ":", "feature", "}", ";", "}", "const", "hasASingleDotInName", "=", "/^[^\\.]+\\.[^\\.]+$/", ";", "if", "(", "hasASingleDotInName", ".", "test", "(", "identifier", ")", ")", "{", "const", "[", "namespace", ",", "name", "]", "=", "identifier", ".", "split", "(", "'.'", ")", ";", "const", "namespaceBinding", "=", "path", ".", "scope", ".", "getBinding", "(", "namespace", ")", ";", "if", "(", "namespaceBinding", "!==", "undefined", ")", "{", "const", "node", "=", "namespaceBinding", ".", "path", ".", "node", ";", "if", "(", "babel", ".", "isImportNamespaceSpecifier", "(", "node", ")", ")", "{", "return", "resolveThroughImport", "(", "namespaceBinding", ".", "path", ",", "name", ",", "document", ",", "kind", ")", ";", "}", "}", "}", "const", "binding", "=", "path", ".", "scope", ".", "getBinding", "(", "identifier", ")", ";", "if", "(", "binding", "===", "undefined", "||", "binding", ".", "path", ".", "node", "===", "path", ".", "node", ")", "{", "return", "{", "successful", ":", "false", ",", "error", ":", "undefined", "}", ";", "}", "return", "resolveScopedAt", "(", "binding", ".", "path", ",", "identifier", ",", "document", ",", "kind", ")", ";", "}", "function", "resolveThroughImport", "<", "K", "extends", "keyof", "FeatureKindMap", ">", "(", "path", ",", "exportedAs", ",", "document", ",", "kind", ")", "{", "const", "statement", "=", "esutil", ".", "getCanonicalStatement", "(", "path", ")", ";", "if", "(", "statement", "===", "undefined", ")", "{", "throw", "new", "Error", "(", "`Internal error, could not get statement for node of type ${", "path", ".", "node", ".", "type", "}`", ")", ";", "}", "const", "[", "import_", "]", "=", "document", ".", "getFeatures", "(", "{", "kind", ":", "'import'", ",", "statement", "}", ")", ";", "if", "(", "import_", "===", "undefined", "||", "import_", ".", "document", "===", "undefined", ")", "{", "return", "{", "successful", ":", "false", ",", "error", ":", "undefined", "}", ";", "}", "const", "[", "export_", "]", "=", "import_", ".", "document", ".", "getFeatures", "(", "{", "kind", ":", "'export'", ",", "id", ":", "exportedAs", "}", ")", ";", "if", "(", "export_", "===", "undefined", ")", "{", "return", "{", "successful", ":", "false", ",", "error", ":", "undefined", "}", ";", "}", "return", "resolveScopedAt", "(", "export_", ".", "astNodePath", ",", "exportedAs", ",", "import_", ".", "document", ",", "kind", ")", ";", "}", "type", "ImportIndicator", "=", "babel", ".", "ImportDefaultSpecifier", "|", "babel", ".", "ImportSpecifier", "|", "babel", ".", "ExportNamedDeclaration", "|", "babel", ".", "ExportAllDeclaration", ";", "function", "isSomeKindOfImport", "(", "path", ")", "{", "const", "node", "=", "path", ".", "node", ";", "return", "babel", ".", "isImportSpecifier", "(", "node", ")", "||", "babel", ".", "isImportDefaultSpecifier", "(", "node", ")", "||", "(", "babel", ".", "isExportNamedDeclaration", "(", "node", ")", "&&", "node", ".", "source", "!=", "null", ")", "||", "(", "babel", ".", "isExportAllDeclaration", "(", "node", ")", ")", ";", "}", "function", "getExportedIdentifier", "(", "node", ",", "localIdentifier", ")", "{", "switch", "(", "node", ".", "type", ")", "{", "case", "'ImportDefaultSpecifier'", ":", "return", "'default'", ";", "case", "'ExportNamedDeclaration'", ":", "for", "(", "const", "specifier", "of", "node", ".", "specifiers", ")", "{", "if", "(", "specifier", ".", "exported", ".", "name", "===", "localIdentifier", ")", "{", "return", "specifier", ".", "local", ".", "name", ";", "}", "}", "throw", "new", "Error", "(", "`Internal error: could not find import specifier for '${", "localIdentifier", "}'. Please report this bug.`", ")", ";", "case", "'ExportAllDeclaration'", ":", "return", "localIdentifier", ";", "case", "'ImportSpecifier'", ":", "return", "node", ".", "imported", ".", "name", ";", "}", "return", "assertNever", "(", "node", ")", ";", "}", "function", "assertNever", "(", "never", ")", "{", "throw", "new", "Error", "(", "`Unexpected ast node: ${", "util", ".", "inspect", "(", "never", ")", "}`", ")", ";", "}", "declare", "module", "'./queryable'", "{", "interface", "FeatureKindMap", "{", "'reference'", ":", "Reference", "<", "Feature", ">", ";", "}", "}", "const", "referenceSet", "=", "new", "Set", "<", "'reference'", ">", "(", "[", "'reference'", "]", ")", ";", "const", "emptySet", "=", "new", "Set", "(", ")", ";", "/**\n * A reference to another feature by identifier.\n */", "export", "class", "Reference", "<", "F", "extends", "Feature", ">", "implements", "Feature", "{", "readonly", "kinds", "=", "referenceSet", ";", "readonly", "identifiers", "=", "emptySet", ";", "readonly", "identifier", ":", "string", ";", "readonly", "sourceRange", ":", "SourceRange", "|", "undefined", ";", "readonly", "astNode", ":", "any", ";", "readonly", "feature", ":", "F", "|", "undefined", ";", "readonly", "warnings", ":", "ReadonlyArray", "<", "Warning", ">", ";", "constructor", "(", "scannedReference", ",", "feature", ",", "warnings", ")", "{", "this", ".", "identifier", "=", "scannedReference", ".", "identifier", ";", "this", ".", "sourceRange", "=", "scannedReference", ".", "sourceRange", ";", "this", ".", "warnings", "=", "warnings", ";", "this", ".", "feature", "=", "feature", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 68, null, 2, null, 2351, null, 4788, null, 224, null, 2, null, null, 1066, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 491, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 491, null, null, null, null, null, null, null, 91, null, 0, null, null, null, 126, null, null, 5, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, 224, null, 2, null, 91, null, 68, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 391, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 27, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1045, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 24, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1045, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, 224, null, 2, null, 91, null, 68, null, null, null, 391, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 224, null, null, null, 24, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 0, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3391, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 497, null, null, null, null, null, null, null, null, null, null, null, null, null, 497, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 17341, null, 623, null, 130, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1287
[ "license", "import", "generate", "from", "'@babel/generator'", ";", "import", "babelTraverse", "from", "'@babel/traverse'", ";", "import", "{", "NodePath", "}", "from", "'@babel/traverse'", ";", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "*", "as", "doctrine", "from", "'doctrine'", ";", "import", "*", "as", "util", "from", "'util'", ";", "import", "{", "MethodParam", ",", "ScannedMethod", ",", "ScannedProperty", "}", "from", "'../index'", ";", "import", "{", "Result", "}", "from", "'../model/analysis'", ";", "import", "{", "ImmutableSet", "}", "from", "'../model/immutable'", ";", "import", "{", "Privacy", "}", "from", "'../model/model'", ";", "import", "{", "ScannedEvent", ",", "Severity", ",", "SourceRange", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "ParsedDocument", "}", "from", "'../parser/document'", ";", "import", "*", "as", "docs", "from", "'../polymer/docs'", ";", "import", "{", "annotateEvent", "}", "from", "'../polymer/docs'", ";", "import", "*", "as", "astValue", "from", "'./ast-value'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'./javascript-document'", ";", "import", "*", "as", "jsdoc", "from", "'./jsdoc'", ";", "param", "{", "babel", ".", "Node", "}", "expression", "param", "{", "Array", "<", "string", ">", "}", "path", "export", "function", "matchesCallExpression", "(", "expression", ",", "path", ")", "{", "if", "(", "!", "expression", ".", "property", "||", "!", "expression", ".", "object", ")", "{", "return", "false", ";", "}", "console", ".", "assert", "(", "path", ".", "length", ">=", "2", ")", ";", "if", "(", "!", "babel", ".", "isIdentifier", "(", "expression", ".", "property", ")", ")", "{", "return", "false", ";", "}", "if", "(", "expression", ".", "property", ".", "name", "!==", "path", "[", "path", ".", "length", "-", "1", "]", ")", "{", "return", "false", ";", "}", "if", "(", "path", ".", "length", "===", "2", "&&", "babel", ".", "isIdentifier", "(", "expression", ".", "object", ")", ")", "{", "return", "expression", ".", "object", ".", "name", "===", "path", "[", "0", "]", ";", "}", "if", "(", "path", ".", "length", ">", "2", "&&", "babel", ".", "isMemberExpression", "(", "expression", ".", "object", ")", ")", "{", "return", "matchesCallExpression", "(", "expression", ".", "object", ",", "path", ".", "slice", "(", "0", ",", "path", ".", "length", "-", "1", ")", ")", ";", "}", "return", "false", ";", "}", "export", "type", "PropertyOrMethod", "=", "babel", ".", "ObjectProperty", "|", "babel", ".", "ObjectMethod", "|", "babel", ".", "ClassMethod", "|", "babel", ".", "AssignmentProperty", ";", "/**\n * Given a property or method, return its name, or undefined if that name can't\n * be determined.\n */", "export", "function", "getPropertyName", "(", "prop", ")", "{", "const", "key", "=", "prop", ".", "key", ";", "if", "(", "!", "prop", ".", "computed", "&&", "babel", ".", "isIdentifier", "(", "key", ")", ")", "{", "return", "key", ".", "name", ";", "}", "const", "keyValue", "=", "astValue", ".", "expressionToValue", "(", "key", ")", ";", "if", "(", "keyValue", "!==", "undefined", ")", "{", "return", "''", "+", "keyValue", ";", "}", "return", "undefined", ";", "}", "/**\n * Yields properties and methods, filters out spread expressions or anything\n * else.\n */", "export", "function", "*", "getSimpleObjectProperties", "(", "node", ")", "{", "for", "(", "const", "property", "of", "node", ".", "properties", ")", "{", "if", "(", "babel", ".", "isObjectProperty", "(", "property", ")", "||", "babel", ".", "isObjectMethod", "(", "property", ")", ")", "{", "yield", "property", ";", "}", "}", "}", "export", "const", "CLOSURE_CONSTRUCTOR_MAP", "=", "new", "Map", "(", "[", "[", "'Boolean'", ",", "'boolean'", "]", ",", "[", "'Number'", ",", "'number'", "]", ",", "[", "'String'", ",", "'string'", "]", "]", ")", ";", "const", "VALID_EXPRESSION_TYPES", "=", "new", "Map", "(", "[", "[", "'ArrayExpression'", ",", "'Array'", "]", ",", "[", "'BlockStatement'", ",", "'Function'", "]", ",", "[", "'BooleanLiteral'", ",", "'boolean'", "]", ",", "[", "'FunctionExpression'", ",", "'Function'", "]", ",", "[", "'NullLiteral'", ",", "'null'", "]", ",", "[", "'NumericLiteral'", ",", "'number'", "]", ",", "[", "'ObjectExpression'", ",", "'Object'", "]", ",", "[", "'RegExpLiteral'", ",", "'RegExp'", "]", ",", "[", "'StringLiteral'", ",", "'string'", "]", ",", "[", "'TemplateLiteral'", ",", "'string'", "]", ",", "]", ")", ";", "param", "{", "Node", "}", "node", "return", "{", "string", "}", "export", "function", "getClosureType", "(", "node", ",", "parsedJsdoc", ",", "sourceRange", ",", "document", ")", "{", "if", "(", "parsedJsdoc", ")", "{", "const", "typeTag", "=", "jsdoc", ".", "getTag", "(", "parsedJsdoc", ",", "'type'", ")", ";", "if", "(", "typeTag", ")", "{", "return", "{", "successful", ":", "true", ",", "value", ":", "doctrine", ".", "type", ".", "stringify", "(", "typeTag", ".", "type", "!", ")", "}", ";", "}", "}", "const", "type", "=", "VALID_EXPRESSION_TYPES", ".", "get", "(", "node", ".", "type", ")", ";", "if", "(", "type", ")", "{", "return", "{", "successful", ":", "true", ",", "value", ":", "type", "}", ";", "}", "if", "(", "babel", ".", "isIdentifier", "(", "node", ")", ")", "{", "return", "{", "successful", ":", "true", ",", "value", ":", "CLOSURE_CONSTRUCTOR_MAP", ".", "get", "(", "node", ".", "name", ")", "||", "node", ".", "name", "}", ";", "}", "const", "warning", "=", "new", "Warning", "(", "{", "code", ":", "'no-closure-type'", ",", "message", ":", "`Unable to determine closure type for expression of type `", "+", "`${", "node", ".", "type", "}`", ",", "severity", ":", "Severity", ".", "WARNING", ",", "sourceRange", ",", "parsedDocument", ":", "document", ",", "}", ")", ";", "return", "{", "successful", ":", "false", ",", "error", ":", "warning", "}", ";", "}", "/**\n * Tries to find the comment for the given node.\n *\n * Will look up the tree at comments on parents as appropriate, but should\n * not look at unrelated nodes. Stops at the nearest statement boundary.\n */", "export", "function", "getBestComment", "(", "nodePath", ")", "{", "const", "maybeComment", "=", "getAttachedComment", "(", "nodePath", ".", "node", ")", ";", "if", "(", "maybeComment", "!==", "undefined", ")", "{", "return", "maybeComment", ";", "}", "const", "parent", "=", "nodePath", ".", "parentPath", ";", "if", "(", "parent", "===", "undefined", ")", "{", "return", "undefined", ";", "}", "if", "(", "!", "isStatementWithUniqueStatementChild", "(", "parent", ".", "node", ")", "&&", "babel", ".", "isStatement", "(", "nodePath", ".", "node", ")", ")", "{", "return", "undefined", ";", "}", "if", "(", "babel", ".", "isVariableDeclaration", "(", "parent", ".", "node", ")", "&&", "parent", ".", "node", ".", "declarations", ".", "length", "!==", "1", ")", "{", "return", "undefined", ";", "}", "return", "getBestComment", "(", "parent", ")", ";", "}", "export", "function", "getAttachedComment", "(", "node", ")", "{", "const", "comments", "=", "getLeadingComments", "(", "node", ")", "||", "[", "]", ";", "return", "comments", "&&", "comments", "[", "comments", ".", "length", "-", "1", "]", ";", "}", "/**\n * Returns all comments from a tree defined with @event.\n */", "export", "function", "getEventComments", "(", "node", ")", "{", "const", "eventComments", "=", "new", "Set", "<", "string", ">", "(", ")", ";", "babelTraverse", "(", "node", ",", "{", "enter", "(", "path", ")", "{", "const", "node", "=", "path", ".", "node", ";", "[", "...", "(", "node", ".", "leadingComments", "||", "[", "]", ")", ",", "...", "(", "node", ".", "trailingComments", "||", "[", "]", ")", "]", ".", "map", "(", "(", "commentAST", ")", "=>", "commentAST", ".", "value", ")", ".", "filter", "(", "(", "comment", ")", "=>", "comment", ".", "indexOf", "(", "'@event'", ")", "!==", "-", "1", ")", ".", "forEach", "(", "(", "comment", ")", "=>", "eventComments", ".", "add", "(", "comment", ")", ")", ";", "}", ",", "noScope", ":", "true", ",", "}", ")", ";", "const", "events", "=", "[", "...", "eventComments", "]", ".", "map", "(", "(", "comment", ")", "=>", "annotateEvent", "(", "jsdoc", ".", "parseJsdoc", "(", "jsdoc", ".", "removeLeadingAsterisks", "(", "comment", ")", ".", "trim", "(", ")", ")", ")", ")", ".", "filter", "(", "(", "ev", ")", "=>", "!", "!", "ev", ")", ".", "sort", "(", "(", "ev1", ",", "ev2", ")", "=>", "ev1", ".", "name", ".", "localeCompare", "(", "ev2", ".", "name", ")", ")", ";", "return", "new", "Map", "(", "events", ".", "map", "(", "(", "e", ")", "=>", "[", "e", ".", "name", ",", "e", "]", "as", "[", "string", ",", "ScannedEvent", "]", ")", ")", ";", "}", "function", "getLeadingComments", "(", "node", ")", "{", "if", "(", "!", "node", ")", "{", "return", ";", "}", "const", "comments", "=", "[", "]", ";", "for", "(", "const", "comment", "of", "node", ".", "leadingComments", "||", "[", "]", ")", "{", "if", "(", "!", "node", ".", "loc", "||", "!", "comment", ".", "loc", "||", "node", ".", "loc", ".", "start", ".", "line", "-", "comment", ".", "loc", ".", "end", ".", "line", "<", "2", ")", "{", "comments", ".", "push", "(", "comment", ".", "value", ")", ";", "}", "}", "return", "comments", ".", "length", "?", "comments", ":", "undefined", ";", "}", "export", "function", "getPropertyValue", "(", "node", ",", "name", ")", "{", "for", "(", "const", "property", "of", "getSimpleObjectProperties", "(", "node", ")", ")", "{", "if", "(", "getPropertyName", "(", "property", ")", "===", "name", ")", "{", "return", "property", ".", "value", ";", "}", "}", "}", "/**\n * Create a ScannedMethod object from an estree Property AST node.\n */", "export", "function", "toScannedMethod", "(", "node", ",", "sourceRange", ",", "document", ")", "{", "const", "parsedJsdoc", "=", "jsdoc", ".", "parseJsdoc", "(", "getAttachedComment", "(", "node", ")", "||", "''", ")", ";", "const", "description", "=", "parsedJsdoc", ".", "description", ".", "trim", "(", ")", ";", "const", "maybeName", "=", "getPropertyName", "(", "node", ")", ";", "const", "warnings", "=", "[", "]", ";", "if", "(", "!", "maybeName", ")", "{", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "code", ":", "'unknown-method-name'", ",", "message", ":", "`Could not determine name of method from expression of type: `", "+", "`${", "node", ".", "key", ".", "type", "}`", ",", "sourceRange", ":", "sourceRange", ",", "severity", ":", "Severity", ".", "INFO", ",", "parsedDocument", ":", "document", "}", ")", ")", ";", "}", "const", "value", "=", "babel", ".", "isObjectProperty", "(", "node", ")", "?", "node", ".", "value", ":", "node", ";", "const", "result", "=", "getClosureType", "(", "value", ",", "parsedJsdoc", ",", "sourceRange", ",", "document", ")", ";", "const", "type", "=", "result", ".", "successful", "===", "true", "?", "result", ".", "value", ":", "'Function'", ";", "const", "name", "=", "maybeName", "||", "''", ";", "const", "scannedMethod", "=", "{", "name", ",", "type", ",", "description", ",", "sourceRange", ",", "warnings", ",", "astNode", ":", "node", ",", "jsdoc", ":", "parsedJsdoc", ",", "privacy", ":", "getOrInferPrivacy", "(", "name", ",", "parsedJsdoc", ")", "}", ";", "if", "(", "value", "&&", "babel", ".", "isFunction", "(", "value", ")", ")", "{", "if", "(", "scannedMethod", ".", "jsdoc", "!==", "undefined", ")", "{", "scannedMethod", ".", "return", "=", "getReturnFromAnnotation", "(", "scannedMethod", ".", "jsdoc", ")", ";", "}", "if", "(", "scannedMethod", ".", "return", "===", "undefined", ")", "{", "scannedMethod", ".", "return", "=", "inferReturnFromBody", "(", "value", ")", ";", "}", "scannedMethod", ".", "params", "=", "(", "value", ".", "params", "||", "[", "]", ")", ".", "map", "(", "(", "nodeParam", ")", "=>", "toMethodParam", "(", "nodeParam", ",", "scannedMethod", ".", "jsdoc", ")", ")", ";", "}", "return", "scannedMethod", ";", "}", "export", "function", "getReturnFromAnnotation", "(", "jsdocAnn", ")", "{", "const", "tag", "=", "jsdoc", ".", "getTag", "(", "jsdocAnn", ",", "'return'", ")", "||", "jsdoc", ".", "getTag", "(", "jsdocAnn", ",", "'returns'", ")", ";", "if", "(", "!", "tag", "||", "(", "!", "tag", ".", "type", "&&", "!", "tag", ".", "description", ")", ")", "{", "return", "undefined", ";", "}", "const", "type", "=", "{", "}", ";", "if", "(", "tag", "&&", "(", "tag", ".", "type", "||", "tag", ".", "description", ")", ")", "{", "if", "(", "tag", ".", "type", ")", "{", "type", ".", "type", "=", "doctrine", ".", "type", ".", "stringify", "(", "tag", ".", "type", ")", ";", "}", "if", "(", "tag", ".", "description", ")", "{", "type", ".", "desc", "=", "tag", ".", "description", ";", "}", "}", "return", "type", ";", "}", "/**\n * Examine the body of a function to see if we can infer something about its\n * return type. This currently only handles the case where a function definitely\n * returns void.\n */", "export", "function", "inferReturnFromBody", "(", "node", ")", "{", "if", "(", "node", ".", "async", "===", "true", "||", "node", ".", "generator", "===", "true", ")", "{", "return", "undefined", ";", "}", "if", "(", "babel", ".", "isArrowFunctionExpression", "(", "node", ")", "&&", "!", "babel", ".", "isBlockStatement", "(", "node", ".", "body", ")", ")", "{", "return", "undefined", ";", "}", "let", "returnsVoid", "=", "true", ";", "babelTraverse", "(", "node", ",", "{", "ReturnStatement", "(", "path", ")", "{", "const", "statement", "=", "path", ".", "node", ";", "if", "(", "statement", ".", "argument", "!==", "null", ")", "{", "returnsVoid", "=", "false", ";", "path", ".", "stop", "(", ")", ";", "}", "}", ",", "FunctionDeclaration", "(", "path", ")", "{", "path", ".", "skip", "(", ")", ";", "}", ",", "FunctionExpression", "(", "path", ")", "{", "path", ".", "skip", "(", ")", ";", "}", ",", "ClassMethod", "(", "path", ")", "{", "path", ".", "skip", "(", ")", ";", "}", ",", "ArrowFunctionExpression", "(", "path", ")", "{", "path", ".", "skip", "(", ")", ";", "}", ",", "ObjectMethod", "(", "path", ")", "{", "path", ".", "skip", "(", ")", ";", "}", ",", "noScope", ":", "true", "}", ")", ";", "if", "(", "returnsVoid", ")", "{", "return", "{", "type", ":", "'void'", "}", ";", "}", "return", "undefined", ";", "}", "export", "function", "toMethodParam", "(", "nodeParam", ",", "jsdocAnn", "?", ")", "{", "const", "paramTags", "=", "new", "Map", "<", "string", ",", "doctrine", ".", "Tag", ">", "(", ")", ";", "let", "name", ";", "let", "defaultValue", ";", "let", "rest", ";", "if", "(", "jsdocAnn", ")", "{", "for", "(", "const", "tag", "of", "(", "jsdocAnn", ".", "tags", "||", "[", "]", ")", ")", "{", "if", "(", "tag", ".", "title", "===", "'param'", "&&", "tag", ".", "name", ")", "{", "paramTags", ".", "set", "(", "tag", ".", "name", ",", "tag", ")", ";", "}", "}", "}", "if", "(", "babel", ".", "isIdentifier", "(", "nodeParam", ")", ")", "{", "name", "=", "nodeParam", ".", "name", ";", "}", "else", "if", "(", "babel", ".", "isRestElement", "(", "nodeParam", ")", "&&", "babel", ".", "isIdentifier", "(", "nodeParam", ".", "argument", ")", ")", "{", "name", "=", "nodeParam", ".", "argument", ".", "name", ";", "rest", "=", "true", ";", "}", "else", "if", "(", "babel", ".", "isAssignmentPattern", "(", "nodeParam", ")", "&&", "babel", ".", "isIdentifier", "(", "nodeParam", ".", "left", ")", "&&", "babel", ".", "isLiteral", "(", "nodeParam", ".", "right", ")", ")", "{", "name", "=", "nodeParam", ".", "left", ".", "name", ";", "defaultValue", "=", "generate", "(", "nodeParam", ".", "right", ")", ".", "code", ";", "}", "else", "{", "name", "=", "generate", "(", "nodeParam", ")", ".", "code", ";", "}", "let", "type", ";", "let", "description", ";", "const", "tag", "=", "paramTags", ".", "get", "(", "name", ")", ";", "if", "(", "tag", ")", "{", "if", "(", "tag", ".", "type", ")", "{", "type", "=", "doctrine", ".", "type", ".", "stringify", "(", "tag", ".", "type", ")", ";", "}", "if", "(", "tag", ".", "description", ")", "{", "description", "=", "tag", ".", "description", ";", "}", "}", "const", "param", "=", "{", "name", ",", "type", ",", "defaultValue", ",", "rest", ",", "description", "}", ";", "return", "param", ";", "}", "export", "function", "getOrInferPrivacy", "(", "name", ",", "annotation", ",", "defaultPrivacy", "=", "'public'", ")", "{", "const", "explicitPrivacy", "=", "jsdoc", ".", "getPrivacy", "(", "annotation", ")", ";", "const", "specificName", "=", "name", ".", "slice", "(", "name", ".", "lastIndexOf", "(", "'.'", ")", "+", "1", ")", ";", "if", "(", "explicitPrivacy", ")", "{", "return", "explicitPrivacy", ";", "}", "if", "(", "specificName", ".", "startsWith", "(", "'__'", ")", ")", "{", "return", "'private'", ";", "}", "else", "if", "(", "specificName", ".", "startsWith", "(", "'_'", ")", ")", "{", "return", "'protected'", ";", "}", "else", "if", "(", "specificName", ".", "endsWith", "(", "'_'", ")", ")", "{", "return", "'private'", ";", "}", "else", "if", "(", "configurationProperties", ".", "has", "(", "specificName", ")", ")", "{", "return", "'protected'", ";", "}", "return", "defaultPrivacy", ";", "}", "/**\n * Properties on element prototypes that are part of the custom elment\n * lifecycle or Polymer configuration syntax.\n *\n * TODO(rictic): only treat the Polymer ones as private when dealing with\n * Polymer.\n */", "export", "const", "configurationProperties", "=", "new", "Set", "(", "[", "'attached'", ",", "'attributeChanged'", ",", "'beforeRegister'", ",", "'configure'", ",", "'constructor'", ",", "'created'", ",", "'detached'", ",", "'enableCustomStyleProperties'", ",", "'extends'", ",", "'hostAttributes'", ",", "'is'", ",", "'listeners'", ",", "'mixins'", ",", "'observers'", ",", "'properties'", ",", "'ready'", ",", "'registered'", ",", "]", ")", ";", "/**\n * Scan any methods on the given node, if it's a class expression/declaration.\n */", "export", "function", "getMethods", "(", "node", ",", "document", ")", "{", "const", "methods", "=", "new", "Map", "<", "string", ",", "ScannedMethod", ">", "(", ")", ";", "for", "(", "const", "statement", "of", "_getMethods", "(", "node", ")", ")", "{", "if", "(", "statement", ".", "static", "===", "false", ")", "{", "const", "method", "=", "toScannedMethod", "(", "statement", ",", "document", ".", "sourceRangeForNode", "(", "statement", ")", "!", ",", "document", ")", ";", "docs", ".", "annotate", "(", "method", ")", ";", "methods", ".", "set", "(", "method", ".", "name", ",", "method", ")", ";", "}", "}", "return", "methods", ";", "}", "/**\n * Scan any static methods on the given node, if it's a class\n * expression/declaration.\n */", "export", "function", "getStaticMethods", "(", "node", ",", "document", ")", "{", "const", "methods", "=", "new", "Map", "<", "string", ",", "ScannedMethod", ">", "(", ")", ";", "for", "(", "const", "method", "of", "_getMethods", "(", "node", ")", ")", "{", "if", "(", "method", ".", "static", "===", "true", ")", "{", "const", "scannedMethod", "=", "toScannedMethod", "(", "method", ",", "document", ".", "sourceRangeForNode", "(", "method", ")", "!", ",", "document", ")", ";", "docs", ".", "annotate", "(", "scannedMethod", ")", ";", "methods", ".", "set", "(", "scannedMethod", ".", "name", ",", "scannedMethod", ")", ";", "}", "}", "return", "methods", ";", "}", "function", "*", "_getMethods", "(", "node", ")", "{", "if", "(", "!", "babel", ".", "isClassDeclaration", "(", "node", ")", "&&", "!", "babel", ".", "isClassExpression", "(", "node", ")", ")", "{", "return", ";", "}", "for", "(", "const", "statement", "of", "node", ".", "body", ".", "body", ")", "{", "if", "(", "babel", ".", "isClassMethod", "(", "statement", ")", "&&", "statement", ".", "kind", "===", "'method'", ")", "{", "yield", "statement", ";", "}", "}", "}", "export", "function", "extractPropertyFromGetterOrSetter", "(", "method", ",", "jsdocAnn", ",", "document", ")", "{", "if", "(", "babel", ".", "isClassMethod", "(", "method", ")", "&&", "method", ".", "static", ")", "{", "return", "null", ";", "}", "if", "(", "method", ".", "kind", "!==", "'get'", "&&", "method", ".", "kind", "!==", "'set'", ")", "{", "return", "null", ";", "}", "const", "name", "=", "getPropertyName", "(", "method", ")", ";", "if", "(", "name", "===", "undefined", ")", "{", "return", "null", ";", "}", "let", "type", ";", "let", "description", ";", "let", "privacy", "=", "'public'", ";", "let", "readOnly", "=", "false", ";", "if", "(", "jsdocAnn", ")", "{", "const", "ret", "=", "getReturnFromAnnotation", "(", "jsdocAnn", ")", ";", "type", "=", "ret", "?", "ret", ".", "type", ":", "undefined", ";", "description", "=", "jsdoc", ".", "getDescription", "(", "jsdocAnn", ")", ";", "privacy", "=", "getOrInferPrivacy", "(", "name", ",", "jsdocAnn", ")", ";", "readOnly", "=", "jsdoc", ".", "hasTag", "(", "jsdocAnn", ",", "'readonly'", ")", ";", "}", "return", "{", "name", ",", "astNode", ":", "method", ",", "type", ",", "jsdoc", ":", "jsdocAnn", ",", "sourceRange", ":", "document", ".", "sourceRangeForNode", "(", "method", ")", "!", ",", "description", ",", "privacy", ",", "warnings", ":", "[", "]", ",", "readOnly", ",", "}", ";", "}", "/**\n * Extracts properties (including accessors) from a given class\n * or object expression.\n */", "export", "function", "extractPropertiesFromClassOrObjectBody", "(", "node", ",", "document", ")", "{", "const", "properties", "=", "new", "Map", "<", "string", ",", "ScannedProperty", ">", "(", ")", ";", "const", "accessors", "=", "new", "Map", "<", "string", ",", "{", "getter", "?", ":", "babel", ".", "ClassMethod", "|", "babel", ".", "ObjectMethod", ";", "setter", "?", ":", "babel", ".", "ClassMethod", "|", "babel", ".", "ObjectMethod", ";", "}", ">", "(", ")", ";", "let", "body", ";", "if", "(", "babel", ".", "isClass", "(", "node", ")", ")", "{", "body", "=", "node", ".", "body", ".", "body", ";", "}", "else", "{", "body", "=", "node", ".", "properties", ";", "}", "for", "(", "const", "member", "of", "body", ")", "{", "if", "(", "!", "babel", ".", "isMethod", "(", "member", ")", "&&", "!", "babel", ".", "isObjectProperty", "(", "member", ")", ")", "{", "continue", ";", "}", "const", "name", "=", "getPropertyName", "(", "member", ")", ";", "if", "(", "name", "===", "undefined", ")", "{", "continue", ";", "}", "if", "(", "babel", ".", "isMethod", "(", "member", ")", "||", "babel", ".", "isFunction", "(", "member", ".", "value", ")", ")", "{", "if", "(", "babel", ".", "isMethod", "(", "member", ")", "&&", "(", "member", ".", "kind", "===", "'get'", "||", "member", ".", "kind", "===", "'set'", ")", ")", "{", "let", "accessor", "=", "accessors", ".", "get", "(", "name", ")", ";", "if", "(", "!", "accessor", ")", "{", "accessor", "=", "{", "}", ";", "accessors", ".", "set", "(", "name", ",", "accessor", ")", ";", "}", "if", "(", "member", ".", "kind", "===", "'get'", ")", "{", "accessor", ".", "getter", "=", "member", ";", "}", "else", "{", "accessor", ".", "setter", "=", "member", ";", "}", "}", "continue", ";", "}", "const", "astNode", "=", "member", ".", "key", ";", "const", "sourceRange", "=", "document", ".", "sourceRangeForNode", "(", "member", ")", "!", ";", "const", "jsdocAnn", "=", "jsdoc", ".", "parseJsdoc", "(", "getAttachedComment", "(", "member", ")", "||", "''", ")", ";", "const", "detectedType", "=", "getClosureType", "(", "member", ".", "value", ",", "jsdocAnn", ",", "sourceRange", ",", "document", ")", ";", "let", "type", "=", "undefined", ";", "if", "(", "detectedType", ".", "successful", ")", "{", "type", "=", "detectedType", ".", "value", ";", "}", "properties", ".", "set", "(", "name", ",", "{", "name", ",", "astNode", ",", "type", ",", "jsdoc", ":", "jsdocAnn", ",", "sourceRange", ",", "description", ":", "jsdocAnn", "?", "jsdoc", ".", "getDescription", "(", "jsdocAnn", ")", ":", "undefined", ",", "privacy", ":", "getOrInferPrivacy", "(", "name", ",", "jsdocAnn", ")", ",", "warnings", ":", "[", "]", ",", "readOnly", ":", "jsdoc", ".", "hasTag", "(", "jsdocAnn", ",", "'readonly'", ")", ",", "}", ")", ";", "}", "for", "(", "const", "val", "of", "accessors", ".", "values", "(", ")", ")", "{", "let", "getter", "=", "null", ";", "let", "setter", "=", "null", ";", "if", "(", "val", ".", "getter", ")", "{", "const", "parsedJsdoc", "=", "jsdoc", ".", "parseJsdoc", "(", "getAttachedComment", "(", "val", ".", "getter", ")", "||", "''", ")", ";", "getter", "=", "extractPropertyFromGetterOrSetter", "(", "val", ".", "getter", ",", "parsedJsdoc", ",", "document", ")", ";", "}", "if", "(", "val", ".", "setter", ")", "{", "const", "parsedJsdoc", "=", "jsdoc", ".", "parseJsdoc", "(", "getAttachedComment", "(", "val", ".", "setter", ")", "||", "''", ")", ";", "setter", "=", "extractPropertyFromGetterOrSetter", "(", "val", ".", "setter", ",", "parsedJsdoc", ",", "document", ")", ";", "}", "const", "prop", "=", "getter", "||", "setter", ";", "if", "(", "!", "prop", ")", "{", "continue", ";", "}", "if", "(", "!", "prop", ".", "readOnly", ")", "{", "prop", ".", "readOnly", "=", "(", "val", ".", "setter", "===", "undefined", ")", ";", "}", "properties", ".", "set", "(", "prop", ".", "name", ",", "prop", ")", ";", "}", "return", "properties", ";", "}", "/**\n * Get the canonical statement or declaration for the given node.\n *\n * It would otherwise be difficult, or require specialized code for each kind of\n * feature, to determine which node is the canonical node for a feature. This\n * function is simple, it only walks up, and it stops once it reaches a clear\n * feature boundary. And since we're calling this function both on the indexing\n * and the lookup sides, we can be confident that both will agree on the same\n * node.\n *\n * There may be more than one feature within a single statement (e.g. `export\n * class Foo {}` is both a Class and an Export, but between `kind` and `id` we\n * should still have enough info to narrow down to the intended feature.\n *\n * See `DeclaredWithStatement` and `BaseDocumentQuery` to see where this is\n * used.\n */", "export", "function", "getCanonicalStatement", "(", "nodePath", ")", "{", "const", "node", "=", "nodePath", ".", "node", ";", "const", "parent", "=", "nodePath", ".", "parentPath", ";", "if", "(", "(", "parent", "&&", "!", "isStatementWithUniqueStatementChild", "(", "parent", ".", "node", ")", ")", "&&", "babel", ".", "isStatement", "(", "node", ")", ")", "{", "return", "node", ";", "}", "if", "(", "parent", "!=", "null", ")", "{", "return", "getCanonicalStatement", "(", "parent", ")", ";", "}", "return", "undefined", ";", "}", "/**\n * Some statements have many statments as children, like a BlockStatement.\n *\n * Some statements have a single unique statement child, like\n * ExportNamedDeclaration or ExportDefaultDeclaration. When we're talking up the\n * node tree but we want to stay within a single statement, we don't want to\n * walk up to a BlockStatement, as that's a group of many statements, but we do\n * want to walk up to ExportNamedDeclaration.\n */", "function", "isStatementWithUniqueStatementChild", "(", "node", ")", "{", "return", "babel", ".", "isExportNamedDeclaration", "(", "node", ")", "||", "babel", ".", "isExportDefaultDeclaration", "(", "node", ")", ";", "}", "/** What names does a declaration assign to? */", "export", "function", "*", "getBindingNamesFromDeclaration", "(", "declaration", ")", "{", "if", "(", "declaration", "==", "null", ")", "{", "return", ";", "}", "switch", "(", "declaration", ".", "type", ")", "{", "case", "'ClassDeclaration'", ":", "case", "'DeclareClass'", ":", "yield", "declaration", ".", "id", ".", "name", ";", "break", ";", "case", "'VariableDeclaration'", ":", "for", "(", "const", "varDecl", "of", "declaration", ".", "declarations", ")", "{", "yield", "*", "getNamesFromLValue", "(", "varDecl", ".", "id", ")", ";", "}", "break", ";", "case", "'FunctionDeclaration'", ":", "case", "'DeclareFunction'", ":", "case", "'DeclareInterface'", ":", "case", "'DeclareTypeAlias'", ":", "case", "'InterfaceDeclaration'", ":", "case", "'DeclareVariable'", ":", "case", "'TypeAlias'", ":", "yield", "declaration", ".", "id", ".", "name", ";", "break", ";", "case", "'ExportAllDeclaration'", ":", "break", ";", "case", "'ExportDefaultDeclaration'", ":", "yield", "'default'", ";", "break", ";", "case", "'ExportNamedDeclaration'", ":", "for", "(", "const", "specifier", "of", "declaration", ".", "specifiers", ")", "{", "if", "(", "specifier", ".", "exported", ".", "type", "===", "'Identifier'", ")", "{", "yield", "specifier", ".", "exported", ".", "name", ";", "}", "}", "yield", "*", "getBindingNamesFromDeclaration", "(", "declaration", ".", "declaration", ")", ";", "break", ";", "case", "'DeclareModule'", ":", "if", "(", "declaration", ".", "id", ".", "type", "===", "'StringLiteral'", ")", "{", "yield", "declaration", ".", "id", ".", "value", ";", "}", "else", "{", "yield", "declaration", ".", "id", ".", "name", ";", "}", "break", ";", "case", "'ImportDeclaration'", ":", "for", "(", "const", "specifier", "of", "declaration", ".", "specifiers", ")", "{", "yield", "specifier", ".", "local", ".", "name", ";", "}", "break", ";", "default", ":", "assertNever", "(", "declaration", ")", ";", "}", "}", "/**\n * Given an LValue, what are the names it assigns to?\n *\n * Internal utility function for getBindingNamesFromDeclaration.\n */", "function", "*", "getNamesFromLValue", "(", "lhs", ")", "{", "switch", "(", "lhs", ".", "type", ")", "{", "case", "'Identifier'", ":", "yield", "lhs", ".", "name", ";", "break", ";", "case", "'ArrayPattern'", ":", "for", "(", "const", "element", "of", "lhs", ".", "elements", ")", "{", "if", "(", "babel", ".", "isLVal", "(", "element", ")", ")", "{", "yield", "*", "getNamesFromLValue", "(", "element", ")", ";", "}", "}", "break", ";", "case", "'RestElement'", ":", "yield", "*", "getNamesFromLValue", "(", "lhs", ".", "argument", ")", ";", "break", ";", "case", "'MemberExpression'", ":", "const", "name", "=", "astValue", ".", "getIdentifierName", "(", "lhs", ")", ";", "if", "(", "name", "!==", "undefined", ")", "{", "yield", "name", ";", "}", "break", ";", "case", "'ObjectPattern'", ":", "for", "(", "const", "prop", "of", "lhs", ".", "properties", ")", "{", "switch", "(", "prop", ".", "type", ")", "{", "case", "'ObjectProperty'", ":", "yield", "*", "getNamesFromLValue", "(", "prop", ".", "value", ")", ";", "break", ";", "case", "'RestProperty'", ":", "yield", "*", "getNamesFromLValue", "(", "prop", ".", "argument", ")", ";", "break", ";", "default", ":", "assertNever", "(", "prop", ")", ";", "}", "}", "break", ";", "case", "'AssignmentPattern'", ":", "yield", "*", "getNamesFromLValue", "(", "lhs", ".", "left", ")", ";", "break", ";", "default", ":", "assertNever", "(", "lhs", ")", ";", "}", "}", "function", "assertNever", "(", "never", ")", "{", "throw", "new", "Error", "(", "`Unexpected ast node: ${", "util", ".", "inspect", "(", "never", ")", "}`", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 0, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 0, null, null, null, 71, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1737, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 95, null, 42382, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, 4788, null, 0, null, 2351, null, 12625, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5893, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 224, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 224, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, 4788, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, 4788, null, null, null, 30, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 224, null, null, null, 24, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 686, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, 6, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, 686, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4788, null, 42382, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 17965, null, null, null, 2351, null, 12625, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, 17965, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8171, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, 21742, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, 4, null, 224, null, null, null, 3300, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 224, null, null, null, null, null, null, null, null, null, null, 4, null, 224, null, null, null, null, null, null, null, null, null, null, 4, null, 224, null, null, null, null, null, null, null, null, null, null, 4, null, 224, null, null, null, null, null, null, null, null, null, null, 4, null, 224, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 31919, null, 0, null, 21742, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 31919, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 31915, null, 2, null, 21742, null, 31915, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5993, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, 4788, null, 6782, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 20794, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 17965, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, 4788, null, 6782, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 20794, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 17965, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 95, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 21743, null, null, null, 21742, null, 6782, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 31915, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, 6782, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 71, null, null, null, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, 21743, null, null, null, null, 21743, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 21743, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 224, null, null, null, 24, null, null, null, null, null, null, 224, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 223, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5894, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 3391, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 223, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 71, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1288
[ "license", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "{", "configurationProperties", ",", "getAttachedComment", ",", "getClosureType", ",", "getOrInferPrivacy", ",", "getPropertyName", "}", "from", "'../javascript/esutil'", ";", "import", "*", "as", "jsdoc", "from", "'../javascript/jsdoc'", ";", "import", "{", "Severity", ",", "SourceRange", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "ParsedDocument", "}", "from", "'../parser/document'", ";", "import", "{", "ScannedPolymerProperty", "}", "from", "'./polymer-element'", ";", "/**\n * Create a ScannedProperty object from an estree Property AST node.\n */", "export", "function", "toScannedPolymerProperty", "(", "node", ",", "sourceRange", ",", "document", ")", "{", "const", "parsedJsdoc", "=", "jsdoc", ".", "parseJsdoc", "(", "getAttachedComment", "(", "node", ")", "||", "''", ")", ";", "const", "description", "=", "parsedJsdoc", ".", "description", ".", "trim", "(", ")", ";", "const", "maybeName", "=", "getPropertyName", "(", "node", ")", ";", "const", "warnings", "=", "[", "]", ";", "if", "(", "!", "maybeName", ")", "{", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "code", ":", "'unknown-prop-name'", ",", "message", ":", "`Could not determine name of property from expression of type: `", "+", "`${", "node", ".", "key", ".", "type", "}`", ",", "sourceRange", ":", "sourceRange", ",", "severity", ":", "Severity", ".", "WARNING", ",", "parsedDocument", ":", "document", "}", ")", ")", ";", "return", ";", "}", "const", "value", "=", "babel", ".", "isObjectProperty", "(", "node", ")", "?", "node", ".", "value", ":", "node", ";", "const", "typeResult", "=", "getClosureType", "(", "value", ",", "parsedJsdoc", ",", "sourceRange", ",", "document", ")", ";", "let", "type", ";", "if", "(", "typeResult", ".", "successful", ")", "{", "type", "=", "typeResult", ".", "value", ";", "}", "else", "{", "warnings", ".", "push", "(", "typeResult", ".", "error", ")", ";", "type", "=", "'Object'", ";", "}", "const", "name", "=", "maybeName", "||", "''", ";", "const", "result", "=", "{", "name", ",", "type", ",", "description", ",", "sourceRange", ",", "warnings", ",", "astNode", ":", "node", ",", "isConfiguration", ":", "configurationProperties", ".", "has", "(", "name", ")", ",", "jsdoc", ":", "parsedJsdoc", ",", "privacy", ":", "getOrInferPrivacy", "(", "name", ",", "parsedJsdoc", ")", "}", ";", "return", "result", ";", "}", ";" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 13364, null, null, null, 2351, null, 12625, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, 13364, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1289
[ "license", "import", "{", "NodePath", "}", "from", "'@babel/traverse'", ";", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "*", "as", "astValue", "from", "'../javascript/ast-value'", ";", "import", "{", "getSimpleObjectProperties", "}", "from", "'../javascript/esutil'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'../javascript/javascript-document'", ";", "import", "{", "Result", "}", "from", "'../model/analysis'", ";", "import", "{", "ScannedReference", ",", "Severity", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "analyzeProperties", "}", "from", "'./analyze-properties'", ";", "import", "{", "parseExpressionInJsStringLiteral", "}", "from", "'./expression-scanner'", ";", "import", "{", "Observer", ",", "ScannedPolymerElement", "}", "from", "'./polymer-element'", ";", "export", "type", "BehaviorReferenceOrWarning", "=", "{", "kind", ":", "'warning'", ";", "warning", ":", "Warning", ";", "}", "|", "{", "kind", ":", "'behaviorReference'", ";", "reference", ":", "ScannedReference", "<", "'behavior'", ">", ";", "}", ";", "export", "function", "getBehaviorReference", "(", "argNode", ",", "document", ",", "path", ")", "{", "const", "behaviorName", "=", "astValue", ".", "getIdentifierName", "(", "argNode", ")", ";", "if", "(", "!", "behaviorName", ")", "{", "return", "{", "successful", ":", "false", ",", "error", ":", "new", "Warning", "(", "{", "code", ":", "'could-not-determine-behavior-name'", ",", "message", ":", "`Could not determine behavior name from expression of type `", "+", "`${", "argNode", ".", "type", "}`", ",", "severity", ":", "Severity", ".", "WARNING", ",", "sourceRange", ":", "document", ".", "sourceRangeForNode", "(", "argNode", ")", "!", ",", "parsedDocument", ":", "document", "}", ")", "}", ";", "}", "return", "{", "successful", ":", "true", ",", "value", ":", "new", "ScannedReference", "(", "'behavior'", ",", "behaviorName", ",", "document", ".", "sourceRangeForNode", "(", "argNode", ")", "!", ",", "argNode", ",", "path", ")", "}", ";", "}", "export", "type", "PropertyHandlers", "=", "{", "[", "key", "]", ":", "(", "node", ":", "babel", ".", "Node", ")", "=>", "void", ";", "}", ";", "/**\n * Returns an object containing functions that will annotate `declaration` with\n * the polymer-specific meaning of the value nodes for the named properties.\n */", "export", "function", "declarationPropertyHandlers", "(", "declaration", ",", "document", ",", "path", ")", "{", "return", "{", "is", "(", "node", ")", "{", "if", "(", "babel", ".", "isLiteral", "(", "node", ")", ")", "{", "declaration", ".", "tagName", "=", "''", "+", "astValue", ".", "expressionToValue", "(", "node", ")", ";", "}", "}", ",", "properties", "(", "node", ")", "{", "for", "(", "const", "prop", "of", "analyzeProperties", "(", "node", ",", "document", ")", ")", "{", "declaration", ".", "addProperty", "(", "prop", ")", ";", "}", "}", ",", "behaviors", "(", "node", ")", "{", "if", "(", "!", "babel", ".", "isArrayExpression", "(", "node", ")", ")", "{", "return", ";", "}", "for", "(", "const", "element", "of", "node", ".", "elements", ")", "{", "const", "result", "=", "getBehaviorReference", "(", "element", ",", "document", ",", "path", ")", ";", "if", "(", "result", ".", "successful", "===", "false", ")", "{", "declaration", ".", "warnings", ".", "push", "(", "result", ".", "error", ")", ";", "}", "else", "{", "declaration", ".", "behaviorAssignments", ".", "push", "(", "result", ".", "value", ")", ";", "}", "}", "}", ",", "observers", "(", "node", ")", "{", "const", "observers", "=", "extractObservers", "(", "node", ",", "document", ")", ";", "if", "(", "!", "observers", ")", "{", "return", ";", "}", "declaration", ".", "warnings", "=", "declaration", ".", "warnings", ".", "concat", "(", "observers", ".", "warnings", ")", ";", "declaration", ".", "observers", "=", "declaration", ".", "observers", ".", "concat", "(", "observers", ".", "observers", ")", ";", "}", ",", "listeners", "(", "node", ")", "{", "if", "(", "!", "babel", ".", "isObjectExpression", "(", "node", ")", ")", "{", "declaration", ".", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "code", ":", "'invalid-listeners-declaration'", ",", "message", ":", "'`listeners` property should be an object expression'", ",", "severity", ":", "Severity", ".", "WARNING", ",", "sourceRange", ":", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "parsedDocument", ":", "document", "}", ")", ")", ";", "return", ";", "}", "for", "(", "const", "p", "of", "getSimpleObjectProperties", "(", "node", ")", ")", "{", "const", "evtName", "=", "babel", ".", "isLiteral", "(", "p", ".", "key", ")", "&&", "astValue", ".", "expressionToValue", "(", "p", ".", "key", ")", "||", "babel", ".", "isIdentifier", "(", "p", ".", "key", ")", "&&", "p", ".", "key", ".", "name", ";", "const", "handler", "=", "!", "babel", ".", "isLiteral", "(", "p", ".", "value", ")", "||", "astValue", ".", "expressionToValue", "(", "p", ".", "value", ")", ";", "if", "(", "typeof", "evtName", "!==", "'string'", "||", "typeof", "handler", "!==", "'string'", ")", "{", "continue", ";", "}", "declaration", ".", "listeners", ".", "push", "(", "{", "event", ":", "evtName", ",", "handler", ":", "handler", "}", ")", ";", "}", "}", "}", ";", "}", "export", "function", "extractObservers", "(", "observersArray", ",", "document", ")", "{", "if", "(", "!", "babel", ".", "isArrayExpression", "(", "observersArray", ")", ")", "{", "return", ";", "}", "let", "warnings", "=", "[", "]", ";", "const", "observers", "=", "[", "]", ";", "for", "(", "const", "element", "of", "observersArray", ".", "elements", ")", "{", "let", "v", "=", "astValue", ".", "expressionToValue", "(", "element", ")", ";", "if", "(", "v", "===", "undefined", ")", "{", "v", "=", "astValue", ".", "CANT_CONVERT", ";", "}", "const", "parseResult", "=", "parseExpressionInJsStringLiteral", "(", "document", ",", "element", ",", "'callExpression'", ")", ";", "warnings", "=", "warnings", ".", "concat", "(", "parseResult", ".", "warnings", ")", ";", "observers", ".", "push", "(", "{", "javascriptNode", ":", "element", ",", "expression", ":", "v", ",", "parsedExpression", ":", "parseResult", ".", "databinding", "}", ")", ";", "}", "return", "{", "observers", ",", "warnings", "}", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, 4788, null, 6782, null, 224, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 19659, null, 6782, null, 224, null, null, null, null, 4, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 4788, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1737, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4788, null, 6782, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1737, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1290
[ "license", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "*", "as", "doctrine", "from", "'doctrine'", ";", "import", "{", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "comparePosition", "}", "from", "'../model/source-range'", ";", "import", "{", "getIdentifierName", ",", "getNamespacedIdentifier", "}", "from", "'./ast-value'", ";", "import", "{", "Visitor", "}", "from", "'./estree-visitor'", ";", "import", "{", "getAttachedComment", ",", "getOrInferPrivacy", ",", "getPropertyName", ",", "getReturnFromAnnotation", ",", "getSimpleObjectProperties", ",", "inferReturnFromBody", "}", "from", "'./esutil'", ";", "import", "{", "ScannedFunction", "}", "from", "'./function'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'./javascript-document'", ";", "import", "{", "JavaScriptScanner", "}", "from", "'./javascript-scanner'", ";", "import", "*", "as", "jsdoc", "from", "'./jsdoc'", ";", "export", "class", "FunctionScanner", "implements", "JavaScriptScanner", "{", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "visitor", "=", "new", "FunctionVisitor", "(", "document", ")", ";", "await", "visit", "(", "visitor", ")", ";", "return", "{", "features", ":", "[", "...", "visitor", ".", "functions", "]", ".", "sort", "(", "(", "a", ",", "b", ")", "=>", "comparePosition", "(", "a", ".", "sourceRange", ".", "start", ",", "b", ".", "sourceRange", ".", "start", ")", ")", ",", "}", ";", "}", "}", "class", "FunctionVisitor", "implements", "Visitor", "{", "functions", "=", "new", "Set", "<", "ScannedFunction", ">", "(", ")", ";", "document", ":", "JavaScriptDocument", ";", "warnings", ":", "Warning", "[", "]", "=", "[", "]", ";", "constructor", "(", "document", ")", "{", "this", ".", "document", "=", "document", ";", "}", "/**\n * Scan standalone function declarations.\n */", "enterFunctionDeclaration", "(", "node", ",", "_parent", ")", "{", "this", ".", "_initFunction", "(", "node", ",", "getIdentifierName", "(", "node", ".", "id", ")", ")", ";", "}", "/**\n * Scan object method declarations.\n */", "enterObjectMethod", "(", "node", ",", "_parent", ")", "{", "this", ".", "_initFunction", "(", "node", ",", "getIdentifierName", "(", "node", ".", "key", ")", ")", ";", "}", "/**\n * Scan functions assigned to newly declared variables.\n */", "enterVariableDeclaration", "(", "node", ",", "_parent", ")", "{", "if", "(", "node", ".", "declarations", ".", "length", "!==", "1", ")", "{", "return", ";", "}", "const", "declaration", "=", "node", ".", "declarations", "[", "0", "]", ";", "const", "declarationValue", "=", "declaration", ".", "init", ";", "if", "(", "declarationValue", "&&", "babel", ".", "isFunction", "(", "declarationValue", ")", ")", "{", "this", ".", "_initFunction", "(", "declarationValue", ",", "getIdentifierName", "(", "declaration", ".", "id", ")", ",", "node", ")", ";", "}", "}", "/**\n * Scan functions assigned to variables and object properties.\n */", "enterAssignmentExpression", "(", "node", ",", "parent", ")", "{", "if", "(", "babel", ".", "isFunction", "(", "node", ".", "right", ")", ")", "{", "this", ".", "_initFunction", "(", "node", ".", "right", ",", "getIdentifierName", "(", "node", ".", "left", ")", ",", "parent", ")", ";", "}", "}", "/**\n * Scan functions defined inside of object literals.\n */", "enterObjectExpression", "(", "node", ",", "_parent", ")", "{", "for", "(", "const", "prop", "of", "getSimpleObjectProperties", "(", "node", ")", ")", "{", "const", "propValue", "=", "prop", ".", "value", ";", "const", "name", "=", "getPropertyName", "(", "prop", ")", ";", "if", "(", "babel", ".", "isFunction", "(", "propValue", ")", ")", "{", "this", ".", "_initFunction", "(", "propValue", ",", "name", ",", "prop", ")", ";", "continue", ";", "}", "const", "comment", "=", "getAttachedComment", "(", "prop", ")", "||", "''", ";", "const", "docs", "=", "jsdoc", ".", "parseJsdoc", "(", "comment", ")", ";", "if", "(", "jsdoc", ".", "getTag", "(", "docs", ",", "'function'", ")", ")", "{", "this", ".", "_initFunction", "(", "prop", ",", "name", ")", ";", "continue", ";", "}", "}", "}", "private", "_initFunction", "(", "node", ",", "analyzedName", "?", ",", "docNode", "?", ")", "{", "if", "(", "docNode", "===", "undefined", ")", "{", "docNode", "=", "node", ";", "}", ";", "const", "docs", "=", "jsdoc", ".", "parseJsdoc", "(", "getAttachedComment", "(", "docNode", ")", "||", "''", ")", ";", "const", "functionTag", "=", "jsdoc", ".", "getTag", "(", "docs", ",", "'function'", ")", ";", "if", "(", "functionTag", "&&", "functionTag", ".", "name", ")", "{", "analyzedName", "=", "functionTag", ".", "name", ";", "}", "if", "(", "!", "analyzedName", ")", "{", "return", ";", "}", "if", "(", "!", "jsdoc", ".", "hasTag", "(", "docs", ",", "'global'", ")", "&&", "!", "jsdoc", ".", "hasTag", "(", "docs", ",", "'memberof'", ")", ")", "{", "return", ";", "}", "if", "(", "jsdoc", ".", "hasTag", "(", "docs", ",", "'mixinFunction'", ")", "||", "jsdoc", ".", "hasTag", "(", "docs", ",", "'polymerMixin'", ")", ")", "{", "return", ";", "}", "const", "functionName", "=", "getNamespacedIdentifier", "(", "analyzedName", ",", "docs", ")", ";", "const", "sourceRange", "=", "this", ".", "document", ".", "sourceRangeForNode", "(", "docNode", ")", "!", ";", "const", "summaryTag", "=", "jsdoc", ".", "getTag", "(", "docs", ",", "'summary'", ")", ";", "const", "summary", "=", "(", "summaryTag", "&&", "summaryTag", ".", "description", ")", "||", "''", ";", "const", "description", "=", "docs", ".", "description", ";", "let", "functionReturn", "=", "getReturnFromAnnotation", "(", "docs", ")", ";", "if", "(", "functionReturn", "===", "undefined", "&&", "babel", ".", "isFunction", "(", "node", ")", ")", "{", "functionReturn", "=", "inferReturnFromBody", "(", "node", ")", ";", "}", "const", "functionParams", "=", "[", "]", ";", "const", "templateTypes", "=", "[", "]", ";", "for", "(", "const", "tag", "of", "docs", ".", "tags", ")", "{", "if", "(", "tag", ".", "title", "===", "'param'", ")", "{", "functionParams", ".", "push", "(", "{", "type", ":", "tag", ".", "type", "?", "doctrine", ".", "type", ".", "stringify", "(", "tag", ".", "type", ")", ":", "'N/A'", ",", "desc", ":", "tag", ".", "description", "||", "''", ",", "name", ":", "tag", ".", "name", "||", "'N/A'", "}", ")", ";", "}", "else", "if", "(", "tag", ".", "title", "===", "'template'", ")", "{", "for", "(", "let", "t", "of", "(", "tag", ".", "description", "||", "''", ")", ".", "split", "(", "','", ")", ")", "{", "t", "=", "t", ".", "trim", "(", ")", ";", "if", "(", "t", ".", "length", ">", "0", ")", "{", "templateTypes", ".", "push", "(", "t", ")", ";", "}", "}", "}", "}", "const", "specificName", "=", "functionName", ".", "slice", "(", "functionName", ".", "lastIndexOf", "(", "'.'", ")", "+", "1", ")", ";", "this", ".", "functions", ".", "add", "(", "new", "ScannedFunction", "(", "functionName", ",", "description", ",", "summary", ",", "getOrInferPrivacy", "(", "specificName", ",", "docs", ")", ",", "node", ",", "docs", ",", "sourceRange", ",", "functionParams", ",", "functionReturn", ",", "templateTypes", ")", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 6782, null, 7, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6782, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5894, null, null, null, null, null, null, null, null, null, 71, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 42382, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 71, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, null, null, 2, null, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, 5, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1291
[ "license", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "{", "ScannedInlineDocument", "}", "from", "'../model/model'", ";", "import", "{", "getIdentifierName", "}", "from", "'./ast-value'", ";", "import", "{", "Visitor", "}", "from", "'./estree-visitor'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'./javascript-document'", ";", "import", "{", "JavaScriptScanner", "}", "from", "'./javascript-scanner'", ";", "/**\n * Finds inline HTML documents in Javascript source.\n *\n * e.g.\n * html`<div></div>`;\n */", "export", "class", "InlineHtmlDocumentScanner", "implements", "JavaScriptScanner", "{", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "features", "=", "[", "]", ";", "const", "myVisitor", "=", "{", "enterTaggedTemplateExpression", "(", "node", ")", "{", "const", "tagName", "=", "getIdentifierName", "(", "node", ".", "tag", ")", ";", "if", "(", "tagName", "===", "undefined", "||", "!", "/(^|\\.)html$/", ".", "test", "(", "tagName", ")", ")", "{", "return", ";", "}", "const", "inlineDocument", "=", "getInlineDocument", "(", "node", ",", "document", ")", ";", "if", "(", "inlineDocument", "!==", "undefined", ")", "{", "features", ".", "push", "(", "inlineDocument", ")", ";", "}", "}", "}", ";", "await", "visit", "(", "myVisitor", ")", ";", "return", "{", "features", "}", ";", "}", "}", "export", "interface", "Options", "{", "/**\n * If true, uses the \"raw\" template string contents rather than the \"cooked\"\n * contents. For example: raw contents yields `\\n` as two characters, cooked\n * yields it as a newline.\n */", "useRawContents", "?", ":", "boolean", ";", "}", "/**\n * Parses the given string as an inline HTML document.\n */", "export", "function", "getInlineDocument", "(", "node", ",", "parsedDocument", ",", "options", "=", "{", "}", ")", "{", "const", "sourceRangeForLiteral", "=", "parsedDocument", ".", "sourceRangeForNode", "(", "node", ".", "quasi", ")", ";", "if", "(", "sourceRangeForLiteral", "===", "undefined", ")", "{", "return", ";", "}", "const", "sourceRangeForContents", "=", "{", "file", ":", "sourceRangeForLiteral", ".", "file", ",", "start", ":", "{", "line", ":", "sourceRangeForLiteral", ".", "start", ".", "line", ",", "column", ":", "sourceRangeForLiteral", ".", "start", ".", "column", "+", "1", "}", ",", "end", ":", "{", "line", ":", "sourceRangeForLiteral", ".", "end", ".", "line", ",", "column", ":", "sourceRangeForLiteral", ".", "end", ".", "column", "-", "1", "}", "}", ";", "let", "contents", "=", "''", ";", "let", "previousEnd", ";", "for", "(", "const", "quasi", "of", "node", ".", "quasi", ".", "quasis", ")", "{", "if", "(", "previousEnd", "!==", "undefined", ")", "{", "const", "fullExpressionTextWithDelimitors", "=", "parsedDocument", ".", "contents", ".", "slice", "(", "previousEnd", ",", "quasi", ".", "start", ")", ";", "/**\n * Replace everything but whitespace in ${expressions} (including the\n * ${} delimitor part) with whitespace.\n * This skips over the problem of handling expressions, and there's lots\n * of cases it doesn't handle correctly, but it's a start.\n * Consider the js file:\n * ```js\n * html`<div>${\n * 'Hello world'\n * }</div>\n * ```\n *\n * If we remove the expression entirely, the html parser receives\n * `<div></div>` and when we ask for the source range of the closing tag\n * it'll give one on the first line, and starting just after the `<div>`.\n * By preserving whitespace and replacing every other character with a\n * space, the HTML parser will receive\n *\n * ```html\n * <div>\n * (a bunch of spaces on this line)\n * </div>\n * ```\n *\n * and so the html parser's source locations will map cleanly onto offsets\n * in the original template literal (excluding characters like `\\n`). We\n * could do something more sophisticated later, but this works for most\n * cases and is quick and easy to implement.\n */", "contents", "+=", "fullExpressionTextWithDelimitors", ".", "replace", "(", "/\\S/g", ",", "' '", ")", ";", "}", "if", "(", "options", ".", "useRawContents", ")", "{", "contents", "+=", "quasi", ".", "value", ".", "raw", ";", "}", "else", "{", "contents", "+=", "quasi", ".", "value", ".", "cooked", ";", "}", "previousEnd", "=", "quasi", ".", "end", ";", "}", "let", "commentText", ";", "if", "(", "node", ".", "leadingComments", "!=", "null", ")", "{", "commentText", "=", "node", ".", "leadingComments", ".", "map", "(", "(", "c", ")", "=>", "c", ".", "value", ")", ".", "join", "(", "'\\n'", ")", ";", "}", "else", "{", "commentText", "=", "''", ";", "}", "return", "new", "ScannedInlineDocument", "(", "'html'", ",", "contents", ",", "{", "filename", ":", "sourceRangeForContents", ".", "file", ",", "col", ":", "sourceRangeForContents", ".", "start", ".", "column", ",", "line", ":", "sourceRangeForContents", ".", "start", ".", "line", "}", ",", "commentText", ",", "sourceRangeForContents", ",", "{", "language", ":", "'js'", ",", "node", ",", "containingDocument", ":", "parsedDocument", "}", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 6782, null, 7, null, null, null, 5, null, null, null, null, null, 953, null, null, 4, null, 4524, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 0, null, 6782, null, 74, null, null, null, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, 3, null, null, null, null, 3881, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 686, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1292
[ "license", "import", "{", "NodePath", "}", "from", "'@babel/traverse'", ";", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "{", "Document", ",", "Feature", ",", "SourceRange", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "Resolvable", "}", "from", "'../model/resolvable'", ";", "import", "{", "Visitor", "}", "from", "'./estree-visitor'", ";", "import", "*", "as", "esutil", "from", "'./esutil'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'./javascript-document'", ";", "import", "{", "JavaScriptScanner", "}", "from", "'./javascript-scanner'", ";", "export", "type", "ExportNode", "=", "babel", ".", "ExportNamedDeclaration", "|", "babel", ".", "ExportAllDeclaration", "|", "babel", ".", "ExportDefaultDeclaration", ";", "declare", "module", "'../model/queryable'", "{", "interface", "FeatureKindMap", "{", "'export'", ":", "Export", ";", "}", "}", "const", "exportKinds", "=", "new", "Set", "(", "[", "'export'", "]", ")", ";", "export", "class", "Export", "implements", "Resolvable", ",", "Feature", "{", "readonly", "kinds", "=", "exportKinds", ";", "readonly", "identifiers", "=", "new", "Set", "<", "string", ">", "(", ")", ";", "readonly", "description", ":", "undefined", ";", "readonly", "jsdoc", ":", "undefined", ";", "readonly", "sourceRange", ":", "SourceRange", "|", "undefined", ";", "readonly", "astNodePath", ":", "NodePath", "<", "babel", ".", "Node", ">", ";", "readonly", "astNode", ":", "ExportNode", ";", "readonly", "statementAst", ":", "babel", ".", "Statement", ";", "readonly", "warnings", ":", "ReadonlyArray", "<", "Warning", ">", "=", "[", "]", ";", "constructor", "(", "astNode", ",", "statementAst", ",", "sourceRange", ",", "nodePath", ",", "exportingAllFrom", "?", ")", "{", "this", ".", "astNode", "=", "astNode", ";", "this", ".", "statementAst", "=", "statementAst", ";", "let", "exportedIdentifiers", ";", "if", "(", "exportingAllFrom", "!==", "undefined", ")", "{", "exportedIdentifiers", "=", "flatMap", "(", "exportingAllFrom", ",", "(", "export_", ")", "=>", "[", "...", "export_", ".", "identifiers", "]", ".", "filter", "(", "(", "i", ")", "=>", "i", "!==", "'default'", ")", ")", ";", "}", "else", "{", "exportedIdentifiers", "=", "esutil", ".", "getBindingNamesFromDeclaration", "(", "astNode", ")", ";", "}", "for", "(", "const", "name", "of", "exportedIdentifiers", ")", "{", "this", ".", "identifiers", ".", "add", "(", "name", ")", ";", "}", "this", ".", "astNodePath", "=", "nodePath", ";", "this", ".", "sourceRange", "=", "sourceRange", ";", "}", "resolve", "(", "document", ")", "{", "if", "(", "babel", ".", "isExportAllDeclaration", "(", "this", ".", "astNode", ")", ")", "{", "const", "[", "import_", "]", "=", "document", ".", "getFeatures", "(", "{", "kind", ":", "'import'", ",", "statement", ":", "this", ".", "statementAst", "}", ")", ";", "if", "(", "import_", "===", "undefined", "||", "import_", ".", "document", "===", "undefined", ")", "{", "return", "undefined", ";", "}", "return", "new", "Export", "(", "this", ".", "astNode", ",", "this", ".", "statementAst", ",", "this", ".", "sourceRange", ",", "this", ".", "astNodePath", ",", "import_", ".", "document", ".", "getFeatures", "(", "{", "kind", ":", "'export'", "}", ")", ")", ";", "}", "return", "this", ";", "}", "}", "function", "*", "flatMap", "<", "In", ",", "Out", ">", "(", "inputs", ",", "map", ")", "{", "for", "(", "const", "input", "of", "inputs", ")", "{", "yield", "*", "map", "(", "input", ")", ";", "}", "}", "export", "class", "JavaScriptExportScanner", "implements", "JavaScriptScanner", "{", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "exports", "=", "[", "]", ";", "const", "warnings", "=", "[", "]", ";", "await", "visit", "(", "{", "enterExportNamedDeclaration", "(", "node", ",", "_parent", ",", "path", ")", "{", "exports", ".", "push", "(", "new", "Export", "(", "node", ",", "esutil", ".", "getCanonicalStatement", "(", "path", ")", "!", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", ",", "path", ")", ")", ";", "}", ",", "enterExportAllDeclaration", "(", "node", ",", "_parent", ",", "path", ")", "{", "exports", ".", "push", "(", "new", "Export", "(", "node", ",", "esutil", ".", "getCanonicalStatement", "(", "path", ")", "!", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", ",", "path", ")", ")", ";", "}", ",", "enterExportDefaultDeclaration", "(", "node", ",", "_parent", ",", "path", ")", "{", "exports", ".", "push", "(", "new", "Export", "(", "node", ",", "esutil", ".", "getCanonicalStatement", "(", "path", ")", "!", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", ",", "path", ")", ")", ";", "}", "}", ")", ";", "return", "{", "features", ":", "exports", ",", "warnings", "}", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 497, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 0, null, 2351, null, 224, null, 114, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6783, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 114, null, null, null, null, null, null, 114, null, 114, null, null, null, null, null, 11624, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 6782, null, 7, null, null, null, 5, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, 4, null, 15353, null, 24, null, 224, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 24, null, 224, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 23114, null, 24, null, 224, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1293
[ "license", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "{", "parseURL", ",", "URL", "}", "from", "'whatwg-url'", ";", "import", "{", "Document", ",", "FileRelativeUrl", ",", "Import", ",", "ResolvedUrl", ",", "ScannedImport", ",", "Severity", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "Visitor", "}", "from", "'./estree-visitor'", ";", "import", "*", "as", "esutil", "from", "'./esutil'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'./javascript-document'", ";", "import", "{", "JavaScriptScanner", "}", "from", "'./javascript-scanner'", ";", "import", "{", "resolve", "}", "from", "'./resolve-specifier-node'", ";", "import", "isWindows", "=", "require", "(", "'is-windows'", ")", ";", "import", "{", "SourceRange", "}", "from", "'../model/model'", ";", "import", "{", "DeclaredWithStatement", "}", "from", "'../model/document'", ";", "const", "isPathSpecifier", "=", "(", "s", ")", "=>", "/^\\.{0,2}\\//", ".", "test", "(", "s", ")", ";", "export", "interface", "JavaScriptImportScannerOptions", "{", "/**\n * Algorithm to use for resolving module specifiers in import\n * and export statements when converting them to URLs.\n * A value of 'node' uses Node.js resolution to find modules.\n *\n * If this argument is not given, module specifiers must be web-compatible\n * urls.\n */", "moduleResolution", "?", ":", "'node'", ";", "}", "export", "class", "ScannedJavascriptImport", "extends", "ScannedImport", "{", "readonly", "type", "!", ":", "'js-import'", ";", "readonly", "specifier", ":", "string", ";", "readonly", "statementAst", ":", "babel", ".", "Statement", "|", "undefined", ";", "constructor", "(", "url", ",", "sourceRange", ",", "urlSourceRange", ",", "ast", ",", "lazy", ",", "originalSpecifier", ",", "statementAst", ")", "{", "super", "(", "'js-import'", ",", "url", ",", "sourceRange", ",", "urlSourceRange", ",", "ast", ",", "lazy", ")", ";", "this", ".", "specifier", "=", "originalSpecifier", ";", "this", ".", "statementAst", "=", "statementAst", ";", "}", "protected", "constructImport", "(", "resolvedUrl", ",", "relativeUrl", ",", "importedDocument", ",", "_containingDocument", ")", "{", "return", "new", "JavascriptImport", "(", "resolvedUrl", ",", "relativeUrl", ",", "this", ".", "type", ",", "importedDocument", ",", "this", ".", "sourceRange", ",", "this", ".", "urlSourceRange", ",", "this", ".", "astNode", ",", "this", ".", "warnings", ",", "this", ".", "lazy", ",", "this", ".", "specifier", ",", "this", ".", "statementAst", ")", ";", "}", "}", "declare", "module", "'../model/queryable'", "{", "interface", "FeatureKindMap", "{", "'js-import'", ":", "JavascriptImport", ";", "}", "}", "export", "class", "JavascriptImport", "extends", "Import", "implements", "DeclaredWithStatement", "{", "/**\n * The original text of the specifier. Unlike `this.url`, this may not\n * be a URL, but may be a bare module specifier, like 'jquery'.\n */", "readonly", "specifier", ":", "string", ";", "readonly", "statementAst", ":", "babel", ".", "Statement", "|", "undefined", ";", "constructor", "(", "url", ",", "originalUrl", ",", "type", ",", "document", ",", "sourceRange", ",", "urlSourceRange", ",", "ast", ",", "warnings", ",", "lazy", ",", "specifier", ",", "statementAst", ")", "{", "super", "(", "url", ",", "originalUrl", ",", "type", ",", "document", ",", "sourceRange", ",", "urlSourceRange", ",", "ast", ",", "warnings", ",", "lazy", ")", ";", "this", ".", "specifier", "=", "specifier", ";", "this", ".", "statementAst", "=", "statementAst", ";", "}", "}", "export", "class", "JavaScriptImportScanner", "implements", "JavaScriptScanner", "{", "moduleResolution", "?", ":", "'node'", ";", "constructor", "(", "options", "?", ")", "{", "this", ".", "moduleResolution", "=", "options", "&&", "options", ".", "moduleResolution", ";", "}", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "imports", "=", "[", "]", ";", "const", "warnings", "=", "[", "]", ";", "const", "scanner", "=", "this", ";", "await", "visit", "(", "{", "enterCallExpression", "(", "node", ",", "_", ",", "path", ")", "{", "if", "(", "node", ".", "callee", ".", "type", "as", "string", "!==", "'Import'", ")", "{", "return", ";", "}", "if", "(", "node", ".", "arguments", ".", "length", "!==", "1", ")", "{", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "message", ":", "'Malformed import'", ",", "sourceRange", ":", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "severity", ":", "Severity", ".", "WARNING", ",", "code", ":", "'malformed-import'", ",", "parsedDocument", ":", "document", ",", "}", ")", ")", ";", "return", ";", "}", "const", "arg", "=", "node", ".", "arguments", "[", "0", "]", ";", "if", "(", "arg", ".", "type", "!==", "'StringLiteral'", ")", "{", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "message", ":", "'Cannot analyze dynamic imports with non-literal arguments'", ",", "sourceRange", ":", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "severity", ":", "Severity", ".", "WARNING", ",", "code", ":", "'non-literal-import'", ",", "parsedDocument", ":", "document", ",", "}", ")", ")", ";", "return", ";", "}", "const", "specifier", "=", "arg", ".", "value", "as", "string", ";", "imports", ".", "push", "(", "new", "ScannedJavascriptImport", "(", "scanner", ".", "_resolveSpecifier", "(", "specifier", ",", "document", ",", "node", ",", "warnings", ")", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "document", ".", "sourceRangeForNode", "(", "node", ".", "callee", ")", "!", ",", "node", ",", "true", ",", "specifier", ",", "esutil", ".", "getCanonicalStatement", "(", "path", ")", ")", ")", ";", "}", ",", "enterImportDeclaration", "(", "node", ",", "_", ",", "path", ")", "{", "const", "specifier", "=", "node", ".", "source", ".", "value", ";", "imports", ".", "push", "(", "new", "ScannedJavascriptImport", "(", "scanner", ".", "_resolveSpecifier", "(", "specifier", ",", "document", ",", "node", ",", "warnings", ")", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "document", ".", "sourceRangeForNode", "(", "node", ".", "source", ")", "!", ",", "node", ",", "false", ",", "specifier", ",", "esutil", ".", "getCanonicalStatement", "(", "path", ")", ")", ")", ";", "}", ",", "enterExportAllDeclaration", "(", "node", ",", "_parent", ",", "path", ")", "{", "const", "specifier", "=", "node", ".", "source", ".", "value", ";", "imports", ".", "push", "(", "new", "ScannedJavascriptImport", "(", "scanner", ".", "_resolveSpecifier", "(", "specifier", ",", "document", ",", "node", ",", "warnings", ")", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "document", ".", "sourceRangeForNode", "(", "node", ".", "source", ")", "!", ",", "node", ",", "false", ",", "specifier", ",", "esutil", ".", "getCanonicalStatement", "(", "path", ")", ")", ")", ";", "}", ",", "enterExportNamedDeclaration", "(", "node", ",", "_parent", ",", "path", ")", "{", "if", "(", "node", ".", "source", "==", "null", ")", "{", "return", ";", "}", "const", "specifier", "=", "node", ".", "source", ".", "value", ";", "imports", ".", "push", "(", "new", "ScannedJavascriptImport", "(", "scanner", ".", "_resolveSpecifier", "(", "specifier", ",", "document", ",", "node", ",", "warnings", ")", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "document", ".", "sourceRangeForNode", "(", "node", ".", "source", ")", "!", ",", "node", ",", "false", ",", "specifier", ",", "esutil", ".", "getCanonicalStatement", "(", "path", ")", ")", ")", ";", "}", "}", ")", ";", "return", "{", "features", ":", "imports", ",", "warnings", "}", ";", "}", "private", "_resolveSpecifier", "(", "specifier", ",", "document", ",", "node", ",", "warnings", ")", "{", "if", "(", "parseURL", "(", "specifier", ")", "!==", "null", ")", "{", "return", "specifier", "as", "FileRelativeUrl", ";", "}", "const", "documentURL", "=", "new", "URL", "(", "document", ".", "baseUrl", ")", ";", "if", "(", "documentURL", ".", "protocol", "!==", "'file:'", ")", "{", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "message", ":", "'Cannot resolve module specifier in non-local document'", ",", "sourceRange", ":", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "severity", ":", "Severity", ".", "WARNING", ",", "code", ":", "'cant-resolve-module-specifier'", ",", "parsedDocument", ":", "document", ",", "}", ")", ")", ";", "return", "undefined", ";", "}", "let", "documentPath", "=", "decodeURIComponent", "(", "documentURL", ".", "pathname", ")", ";", "if", "(", "isWindows", "(", ")", "&&", "documentPath", ".", "startsWith", "(", "'/'", ")", ")", "{", "documentPath", "=", "documentPath", ".", "substring", "(", "1", ")", ";", "}", "if", "(", "this", ".", "moduleResolution", "===", "'node'", ")", "{", "try", "{", "return", "resolve", "(", "specifier", ",", "documentPath", ")", ";", "}", "catch", "(", "e", ")", "{", "}", "}", "if", "(", "isPathSpecifier", "(", "specifier", ")", ")", "{", "return", "specifier", "as", "FileRelativeUrl", ";", "}", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "message", ":", "'Cannot resolve module specifier with resolution algorithm: '", "+", "(", "this", ".", "moduleResolution", "||", "'none'", ")", ",", "sourceRange", ":", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "severity", ":", "Severity", ".", "WARNING", ",", "code", ":", "'cant-resolve-module-specifier'", ",", "parsedDocument", ":", "document", ",", "}", ")", ")", ";", "return", "undefined", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7135, null, 2351, null, 2351, null, null, null, 8, null, 2, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 1462, null, 7135, null, 91, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 1462, null, 7135, null, 2, null, 91, null, 2351, null, 2351, null, null, null, 5, null, 8, null, 2, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 6782, null, 7, null, null, null, 5, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 462, null, 24, null, 224, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 786, null, 24, null, 224, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 24, null, 224, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 15353, null, 24, null, 224, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7135, null, 2, null, 6782, null, 4788, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 113, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1294
[ "license", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "{", "Result", "}", "from", "'../model/analysis'", ";", "import", "{", "ScannedProperty", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "getIdentifierName", ",", "getNamespacedIdentifier", "}", "from", "'./ast-value'", ";", "import", "{", "Visitor", "}", "from", "'./estree-visitor'", ";", "import", "*", "as", "esutil", "from", "'./esutil'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'./javascript-document'", ";", "import", "{", "JavaScriptScanner", "}", "from", "'./javascript-scanner'", ";", "import", "*", "as", "jsdoc", "from", "'./jsdoc'", ";", "import", "{", "ScannedNamespace", "}", "from", "'./namespace'", ";", "/**\n * Find namespaces from source code.\n */", "export", "class", "NamespaceScanner", "implements", "JavaScriptScanner", "{", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "visitor", "=", "new", "NamespaceVisitor", "(", "document", ")", ";", "await", "visit", "(", "visitor", ")", ";", "return", "{", "features", ":", "[", "...", "visitor", ".", "namespaces", ".", "values", "(", ")", "]", ",", "warnings", ":", "visitor", ".", "warnings", "}", ";", "}", "}", "class", "NamespaceVisitor", "implements", "Visitor", "{", "namespaces", "=", "new", "Map", "<", "string", ",", "ScannedNamespace", ">", "(", ")", ";", "document", ":", "JavaScriptDocument", ";", "warnings", ":", "Warning", "[", "]", "=", "[", "]", ";", "constructor", "(", "document", ")", "{", "this", ".", "document", "=", "document", ";", "}", "/**\n * Look for object declarations with @namespace in the docs.\n */", "enterVariableDeclaration", "(", "node", ",", "_parent", ")", "{", "if", "(", "node", ".", "declarations", ".", "length", "!==", "1", ")", "{", "return", ";", "}", "this", ".", "_initNamespace", "(", "node", ",", "node", ".", "declarations", "[", "0", "]", ".", "id", ")", ";", "}", "/**\n * Look for object assignments with @namespace in the docs.\n */", "enterAssignmentExpression", "(", "node", ",", "parent", ")", "{", "this", ".", "_initNamespace", "(", "parent", ",", "node", ".", "left", ")", ";", "}", "enterObjectProperty", "(", "node", ",", "_parent", ")", "{", "this", ".", "_initNamespace", "(", "node", ",", "node", ".", "key", ")", ";", "}", "enterExpressionStatement", "(", "node", ")", "{", "if", "(", "!", "babel", ".", "isAssignmentExpression", "(", "node", ".", "expression", ")", "&&", "!", "babel", ".", "isMemberExpression", "(", "node", ".", "expression", ")", ")", "{", "return", ";", "}", "const", "jsdocAnn", "=", "jsdoc", ".", "parseJsdoc", "(", "esutil", ".", "getAttachedComment", "(", "node", ")", "||", "''", ")", ";", "if", "(", "!", "jsdoc", ".", "hasTag", "(", "jsdocAnn", ",", "'memberof'", ")", ")", "{", "return", ";", "}", "const", "memberofTag", "=", "jsdoc", ".", "getTag", "(", "jsdocAnn", ",", "'memberof'", ")", ";", "const", "namespaceName", "=", "memberofTag", "&&", "memberofTag", ".", "description", ";", "let", "prop", "=", "undefined", ";", "let", "namespacedIdentifier", ";", "if", "(", "!", "namespaceName", "||", "!", "this", ".", "namespaces", ".", "has", "(", "namespaceName", ")", ")", "{", "return", ";", "}", "if", "(", "babel", ".", "isAssignmentExpression", "(", "node", ".", "expression", ")", ")", "{", "if", "(", "babel", ".", "isFunctionExpression", "(", "node", ".", "expression", ".", "right", ")", ")", "{", "return", ";", "}", "namespacedIdentifier", "=", "getIdentifierName", "(", "node", ".", "expression", ".", "left", ")", ";", "}", "else", "if", "(", "babel", ".", "isMemberExpression", "(", "node", ".", "expression", ")", ")", "{", "namespacedIdentifier", "=", "getIdentifierName", "(", "node", ".", "expression", ")", ";", "}", "if", "(", "!", "namespacedIdentifier", "||", "namespacedIdentifier", ".", "indexOf", "(", "'.prototype.'", ")", "!==", "-", "1", ")", "{", "return", ";", "}", "const", "namespace", "=", "this", ".", "namespaces", ".", "get", "(", "namespaceName", ")", "!", ";", "const", "name", "=", "namespacedIdentifier", ".", "substring", "(", "namespacedIdentifier", ".", "lastIndexOf", "(", "'.'", ")", "+", "1", ")", ";", "prop", "=", "this", ".", "_createPropertyFromExpression", "(", "name", ",", "node", ".", "expression", ",", "jsdocAnn", ")", ";", "if", "(", "prop", ")", "{", "namespace", ".", "properties", ".", "set", "(", "name", ",", "prop", ")", ";", "}", "}", "private", "_createPropertyFromExpression", "(", "name", ",", "node", ",", "jsdocAnn", ")", "{", "let", "description", ";", "let", "type", ";", "let", "readOnly", "=", "false", ";", "const", "privacy", "=", "esutil", ".", "getOrInferPrivacy", "(", "name", ",", "jsdocAnn", ")", ";", "const", "sourceRange", "=", "this", ".", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ";", "const", "warnings", "=", "[", "]", ";", "if", "(", "jsdocAnn", ")", "{", "description", "=", "jsdoc", ".", "getDescription", "(", "jsdocAnn", ")", ";", "readOnly", "=", "jsdoc", ".", "hasTag", "(", "jsdocAnn", ",", "'readonly'", ")", ";", "}", "let", "detectedType", ";", "if", "(", "babel", ".", "isAssignmentExpression", "(", "node", ")", ")", "{", "detectedType", "=", "esutil", ".", "getClosureType", "(", "node", ".", "right", ",", "jsdocAnn", ",", "sourceRange", ",", "this", ".", "document", ")", ";", "}", "else", "{", "detectedType", "=", "esutil", ".", "getClosureType", "(", "node", ",", "jsdocAnn", ",", "sourceRange", ",", "this", ".", "document", ")", ";", "}", "if", "(", "detectedType", ".", "successful", ")", "{", "type", "=", "detectedType", ".", "value", ";", "}", "else", "{", "warnings", ".", "push", "(", "detectedType", ".", "error", ")", ";", "type", "=", "'?'", ";", "}", "return", "{", "name", ",", "astNode", ":", "node", ",", "type", ",", "jsdoc", ":", "jsdocAnn", ",", "sourceRange", ",", "description", ",", "privacy", ",", "warnings", ",", "readOnly", ",", "}", ";", "}", "private", "_initNamespace", "(", "node", ",", "nameNode", ")", "{", "const", "comment", "=", "esutil", ".", "getAttachedComment", "(", "node", ")", ";", "if", "(", "!", "comment", "||", "comment", ".", "indexOf", "(", "'@namespace'", ")", "===", "-", "1", ")", "{", "return", ";", "}", "const", "analyzedName", "=", "getIdentifierName", "(", "nameNode", ")", ";", "const", "docs", "=", "jsdoc", ".", "parseJsdoc", "(", "comment", ")", ";", "const", "namespaceTag", "=", "jsdoc", ".", "getTag", "(", "docs", ",", "'namespace'", ")", ";", "const", "explicitName", "=", "namespaceTag", "&&", "namespaceTag", ".", "name", ";", "let", "namespaceName", ";", "if", "(", "explicitName", ")", "{", "namespaceName", "=", "explicitName", ";", "}", "else", "if", "(", "analyzedName", ")", "{", "namespaceName", "=", "getNamespacedIdentifier", "(", "analyzedName", ",", "docs", ")", ";", "}", "else", "{", "return", ";", "}", "const", "sourceRange", "=", "this", ".", "document", ".", "sourceRangeForNode", "(", "node", ")", ";", "if", "(", "!", "sourceRange", ")", "{", "throw", "new", "Error", "(", "`Unable to determine sourceRange for @namespace: ${", "comment", "}`", ")", ";", "}", "const", "summaryTag", "=", "jsdoc", ".", "getTag", "(", "docs", ",", "'summary'", ")", ";", "const", "summary", "=", "(", "summaryTag", "&&", "summaryTag", ".", "description", ")", "||", "''", ";", "const", "description", "=", "docs", ".", "description", ";", "const", "properties", "=", "getNamespaceProperties", "(", "node", ",", "this", ".", "document", ")", ";", "this", ".", "namespaces", ".", "set", "(", "namespaceName", ",", "new", "ScannedNamespace", "(", "namespaceName", ",", "description", ",", "summary", ",", "node", ",", "properties", ",", "docs", ",", "sourceRange", ")", ")", ";", "}", "}", "/**\n * Extracts properties from a given namespace node.\n */", "function", "getNamespaceProperties", "(", "node", ",", "document", ")", "{", "const", "properties", "=", "new", "Map", "<", "string", ",", "ScannedProperty", ">", "(", ")", ";", "let", "child", ";", "if", "(", "babel", ".", "isVariableDeclaration", "(", "node", ")", ")", "{", "if", "(", "node", ".", "declarations", ".", "length", "!==", "1", ")", "{", "return", "properties", ";", "}", "const", "declaration", "=", "node", ".", "declarations", "[", "0", "]", ".", "init", ";", "if", "(", "!", "babel", ".", "isObjectExpression", "(", "declaration", ")", ")", "{", "return", "properties", ";", "}", "child", "=", "declaration", ";", "}", "else", "if", "(", "babel", ".", "isExpressionStatement", "(", "node", ")", "&&", "babel", ".", "isAssignmentExpression", "(", "node", ".", "expression", ")", "&&", "babel", ".", "isObjectExpression", "(", "node", ".", "expression", ".", "right", ")", ")", "{", "child", "=", "node", ".", "expression", ".", "right", ";", "}", "else", "{", "return", "properties", ";", "}", "return", "esutil", ".", "extractPropertiesFromClassOrObjectBody", "(", "child", ",", "document", ")", ";", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 6782, null, 7, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6782, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 4788, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, 21743, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, 2, null, null, null, 21742, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, 31915, null, null, null, null, null, null, null, null, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 123, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 4788, null, 4788, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2351, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, 4788, null, 6782, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, 42382, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 71, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1295
[ "license", "import", "{", "InlineDocInfo", "}", "from", "'../model/model'", ";", "import", "{", "ResolvedUrl", "}", "from", "'../model/url'", ";", "import", "{", "Parser", "}", "from", "'../parser/parser'", ";", "import", "{", "UrlResolver", "}", "from", "'../url-loader/url-resolver'", ";", "import", "{", "ParsedJsonDocument", "}", "from", "'./json-document'", ";", "export", "class", "JsonParser", "implements", "Parser", "<", "ParsedJsonDocument", ">", "{", "parse", "(", "contents", ",", "url", ",", "_urlResolver", ",", "inlineDocInfo", ")", "{", "const", "isInline", "=", "!", "!", "inlineDocInfo", ";", "inlineDocInfo", "=", "inlineDocInfo", "||", "{", "}", ";", "return", "new", "ParsedJsonDocument", "(", "{", "url", ",", "baseUrl", ":", "inlineDocInfo", ".", "baseUrl", ",", "contents", ",", "ast", ":", "JSON", ".", "parse", "(", "contents", ")", ",", "locationOffset", ":", "inlineDocInfo", ".", "locationOffset", ",", "astNode", ":", "inlineDocInfo", ".", "astNode", ",", "isInline", "}", ")", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, 2, null, 1462, null, 13912, null, 0, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1296
[ "license", "import", "*", "as", "dom5", "from", "'dom5/lib/index-next'", ";", "import", "{", "HtmlVisitor", ",", "ParsedHtmlDocument", "}", "from", "'../html/html-document'", ";", "import", "{", "HtmlScanner", "}", "from", "'../html/html-scanner'", ";", "import", "{", "ScannedImport", "}", "from", "'../model/model'", ";", "import", "{", "FileRelativeUrl", "}", "from", "'../model/url'", ";", "const", "p", "=", "dom5", ".", "predicates", ";", "const", "isCssImportNode", "=", "p", ".", "AND", "(", "p", ".", "hasTagName", "(", "'link'", ")", ",", "p", ".", "hasSpaceSeparatedAttrValue", "(", "'rel'", ",", "'import'", ")", ",", "p", ".", "hasAttr", "(", "'href'", ")", ",", "p", ".", "hasAttrValue", "(", "'type'", ",", "'css'", ")", ",", "p", ".", "parentMatches", "(", "p", ".", "hasTagName", "(", "'dom-module'", ")", ")", ")", ";", "export", "class", "CssImportScanner", "implements", "HtmlScanner", "{", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "imports", "=", "[", "]", ";", "await", "visit", "(", "(", "node", ")", "=>", "{", "if", "(", "isCssImportNode", "(", "node", ")", ")", "{", "const", "href", "=", "dom5", ".", "getAttribute", "(", "node", ",", "'href'", ")", "!", "as", "FileRelativeUrl", ";", "imports", ".", "push", "(", "new", "ScannedImport", "(", "'css-import'", ",", "href", ",", "document", ".", "sourceRangeForNode", "(", "node", ")", "!", ",", "document", ".", "sourceRangeForAttributeValue", "(", "node", ",", "'href'", ")", "!", ",", "node", ",", "false", ")", ")", ";", "}", "}", ")", ";", "return", "{", "features", ":", "imports", ",", "warnings", ":", "[", "]", "}", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, 305, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 5827, null, 7, null, null, null, 5, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7135, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1297
[ "license", "import", "{", "Class", "}", "from", "'../model/class'", ";", "import", "{", "Document", ",", "Feature", ",", "Method", ",", "Property", ",", "Resolvable", ",", "ScannedFeature", ",", "ScannedMethod", ",", "ScannedProperty", ",", "Warning", "}", "from", "'../model/model'", ";", "/**\n * A scanned Polymer 1.x core \"feature\".\n */", "export", "class", "ScannedPolymerCoreFeature", "extends", "ScannedFeature", "implements", "Resolvable", "{", "warnings", ":", "Warning", "[", "]", "=", "[", "]", ";", "properties", "=", "new", "Map", "<", "string", ",", "ScannedProperty", ">", "(", ")", ";", "methods", "=", "new", "Map", "<", "string", ",", "ScannedMethod", ">", "(", ")", ";", "resolve", "(", "document", ")", "{", "if", "(", "this", ".", "warnings", ".", "length", ">", "0", ")", "{", "return", ";", "}", "const", "isRootAddFeatureCall", "=", "this", ".", "methods", ".", "has", "(", "'_finishRegisterFeatures'", ")", ";", "if", "(", "!", "isRootAddFeatureCall", ")", "{", "return", "new", "PolymerCoreFeature", "(", "this", ".", "properties", ",", "this", ".", "methods", ")", ";", "}", "const", "allProperties", "=", "new", "Map", "(", "this", ".", "properties", ")", ";", "const", "allMethods", "=", "new", "Map", "(", "this", ".", "methods", ")", ";", "const", "otherCoreFeatures", "=", "document", ".", "getFeatures", "(", "{", "kind", ":", "'polymer-core-feature'", ",", "imported", ":", "true", ",", "externalPackages", ":", "true", ",", "}", ")", ";", "for", "(", "const", "feature", "of", "otherCoreFeatures", ")", "{", "for", "(", "const", "[", "key", ",", "prop", "]", "of", "feature", ".", "properties", ")", "{", "allProperties", ".", "set", "(", "key", ",", "prop", ")", ";", "}", "for", "(", "const", "[", "key", ",", "method", "]", "of", "feature", ".", "methods", ")", "{", "allMethods", ".", "set", "(", "key", ",", "method", ")", ";", "}", "}", "return", "new", "Class", "(", "{", "name", ":", "'Polymer.Base'", ",", "className", ":", "'Polymer.Base'", ",", "properties", ":", "allProperties", ",", "methods", ":", "allMethods", ",", "staticMethods", ":", "new", "Map", "(", ")", ",", "abstract", ":", "true", ",", "privacy", ":", "'public'", ",", "jsdoc", ":", "this", ".", "jsdoc", ",", "description", ":", "this", ".", "description", "||", "''", ",", "summary", ":", "''", ",", "sourceRange", ":", "this", ".", "sourceRange", ",", "astNode", ":", "this", ".", "astNode", ",", "statementAst", ":", "undefined", ",", "}", ",", "document", ")", ";", "}", "}", "declare", "module", "'../model/queryable'", "{", "interface", "FeatureKindMap", "{", "'polymer-core-feature'", ":", "PolymerCoreFeature", ";", "}", "}", "/**\n * A resolved Polymer 1.x core \"feature\".\n */", "export", "class", "PolymerCoreFeature", "implements", "Feature", "{", "kinds", "=", "new", "Set", "(", "[", "'polymer-core-feature'", "]", ")", ";", "identifiers", "=", "new", "Set", "<", "string", ">", "(", ")", ";", "warnings", ":", "Warning", "[", "]", "=", "[", "]", ";", "readonly", "statementAst", "=", "undefined", ";", "constructor", "(", "public", "properties", ",", "public", "methods", ")", "{", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 536, null, 91, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 8, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, 19, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 19, null, null, 19, null, null, null, null ]
1298
[ "license", "import", "{", "NodePath", "}", "from", "'@babel/traverse'", ";", "import", "*", "as", "babel", "from", "'@babel/types'", ";", "import", "{", "getIdentifierName", "}", "from", "'../javascript/ast-value'", ";", "import", "{", "Visitor", "}", "from", "'../javascript/estree-visitor'", ";", "import", "*", "as", "esutil", "from", "'../javascript/esutil'", ";", "import", "{", "JavaScriptDocument", "}", "from", "'../javascript/javascript-document'", ";", "import", "{", "JavaScriptScanner", "}", "from", "'../javascript/javascript-scanner'", ";", "import", "*", "as", "jsdoc", "from", "'../javascript/jsdoc'", ";", "import", "{", "Severity", ",", "Warning", "}", "from", "'../model/model'", ";", "import", "{", "declarationPropertyHandlers", ",", "PropertyHandlers", "}", "from", "'./declaration-property-handlers'", ";", "import", "{", "ScannedPolymerElement", "}", "from", "'./polymer-element'", ";", "export", "class", "PolymerElementScanner", "implements", "JavaScriptScanner", "{", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "visitor", "=", "new", "ElementVisitor", "(", "document", ")", ";", "await", "visit", "(", "visitor", ")", ";", "return", "{", "features", ":", "visitor", ".", "features", ",", "warnings", ":", "visitor", ".", "warnings", "}", ";", "}", "}", "/**\n * Handles Polymer({}) calls.\n */", "class", "ElementVisitor", "implements", "Visitor", "{", "readonly", "features", ":", "ScannedPolymerElement", "[", "]", "=", "[", "]", ";", "readonly", "warnings", ":", "Warning", "[", "]", "=", "[", "]", ";", "readonly", "document", ":", "JavaScriptDocument", ";", "constructor", "(", "document", ")", "{", "this", ".", "document", "=", "document", ";", "}", "enterCallExpression", "(", "node", ",", "parent", ",", "path", ")", "{", "const", "callee", "=", "node", ".", "callee", ";", "if", "(", "!", "babel", ".", "isIdentifier", "(", "callee", ")", "||", "callee", ".", "name", "!==", "'Polymer'", ")", "{", "return", ";", "}", "const", "rawDescription", "=", "esutil", ".", "getAttachedComment", "(", "parent", ")", ";", "let", "className", "=", "undefined", ";", "if", "(", "babel", ".", "isAssignmentExpression", "(", "parent", ")", ")", "{", "className", "=", "getIdentifierName", "(", "parent", ".", "left", ")", ";", "}", "else", "if", "(", "babel", ".", "isVariableDeclarator", "(", "parent", ")", ")", "{", "className", "=", "getIdentifierName", "(", "parent", ".", "id", ")", ";", "}", "const", "jsDoc", "=", "jsdoc", ".", "parseJsdoc", "(", "rawDescription", "||", "''", ")", ";", "const", "element", "=", "new", "ScannedPolymerElement", "(", "{", "className", ",", "astNode", ":", "node", ",", "statementAst", ":", "esutil", ".", "getCanonicalStatement", "(", "path", ")", ",", "description", ":", "jsDoc", ".", "description", ",", "events", ":", "esutil", ".", "getEventComments", "(", "parent", ")", ",", "sourceRange", ":", "this", ".", "document", ".", "sourceRangeForNode", "(", "node", ".", "arguments", "[", "0", "]", ")", ",", "privacy", ":", "esutil", ".", "getOrInferPrivacy", "(", "''", ",", "jsDoc", ")", ",", "abstract", ":", "jsdoc", ".", "hasTag", "(", "jsDoc", ",", "'abstract'", ")", ",", "attributes", ":", "new", "Map", "(", ")", ",", "properties", ":", "[", "]", ",", "behaviors", ":", "[", "]", ",", "extends", ":", "undefined", ",", "jsdoc", ":", "jsDoc", ",", "listeners", ":", "[", "]", ",", "methods", ":", "new", "Map", "(", ")", ",", "staticMethods", ":", "new", "Map", "(", ")", ",", "mixins", ":", "[", "]", ",", "observers", ":", "[", "]", ",", "superClass", ":", "undefined", ",", "tagName", ":", "undefined", "}", ")", ";", "element", ".", "description", "=", "(", "element", ".", "description", "||", "''", ")", ".", "trim", "(", ")", ";", "const", "propertyHandlers", "=", "declarationPropertyHandlers", "(", "element", ",", "this", ".", "document", ",", "path", ")", ";", "const", "argument", "=", "node", ".", "arguments", "[", "0", "]", ";", "if", "(", "babel", ".", "isObjectExpression", "(", "argument", ")", ")", "{", "this", ".", "handleObjectExpression", "(", "argument", ",", "propertyHandlers", ",", "element", ")", ";", "}", "this", ".", "features", ".", "push", "(", "element", ")", ";", "}", "private", "handleObjectExpression", "(", "node", ",", "propertyHandlers", ",", "element", ")", "{", "for", "(", "const", "prop", "of", "esutil", ".", "getSimpleObjectProperties", "(", "node", ")", ")", "{", "const", "name", "=", "esutil", ".", "getPropertyName", "(", "prop", ")", ";", "if", "(", "!", "name", ")", "{", "element", ".", "warnings", ".", "push", "(", "new", "Warning", "(", "{", "message", ":", "`Can't determine name for property key from expression `", "+", "`with type ${", "prop", ".", "key", ".", "type", "}.`", ",", "code", ":", "'cant-determine-property-name'", ",", "severity", ":", "Severity", ".", "WARNING", ",", "sourceRange", ":", "this", ".", "document", ".", "sourceRangeForNode", "(", "prop", ".", "key", ")", "!", ",", "parsedDocument", ":", "this", ".", "document", "}", ")", ")", ";", "continue", ";", "}", "if", "(", "name", "in", "propertyHandlers", ")", "{", "propertyHandlers", "[", "name", "]", "(", "prop", ".", "value", ")", ";", "}", "else", "if", "(", "(", "babel", ".", "isMethod", "(", "prop", ")", "&&", "prop", ".", "kind", "===", "'method'", ")", "||", "babel", ".", "isFunction", "(", "prop", ".", "value", ")", ")", "{", "const", "method", "=", "esutil", ".", "toScannedMethod", "(", "prop", ",", "this", ".", "document", ".", "sourceRangeForNode", "(", "prop", ")", "!", ",", "this", ".", "document", ")", ";", "element", ".", "addMethod", "(", "method", ")", ";", "}", "}", "for", "(", "const", "prop", "of", "esutil", ".", "extractPropertiesFromClassOrObjectBody", "(", "node", ",", "this", ".", "document", ")", ".", "values", "(", ")", ")", "{", "if", "(", "prop", ".", "name", "in", "propertyHandlers", ")", "{", "continue", ";", "}", "element", ".", "addProperty", "(", "{", "...", "prop", ",", "isConfiguration", ":", "esutil", ".", "configurationProperties", ".", "has", "(", "prop", ".", "name", ")", ",", "}", ")", ";", "}", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 6782, null, 7, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6782, null, null, null, null, null, null, null, null, null, 4, null, 0, null, 4788, null, 224, null, null, null, 71, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, 19659, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 4, null, 42382, null, 0, null, 19659, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 17965, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 21743, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
1299
[ "license", "import", "*", "as", "dom5", "from", "'dom5/lib/index-next'", ";", "import", "{", "ASTNode", "}", "from", "'parse5'", ";", "import", "{", "HtmlVisitor", ",", "ParsedHtmlDocument", "}", "from", "'../html/html-document'", ";", "import", "{", "HtmlScanner", "}", "from", "'../html/html-scanner'", ";", "import", "{", "getOrInferPrivacy", "}", "from", "'../javascript/esutil'", ";", "import", "*", "as", "jsdoc", "from", "'../javascript/jsdoc'", ";", "import", "{", "annotateElementHeader", "}", "from", "'./docs'", ";", "import", "{", "ScannedPolymerElement", "}", "from", "'./polymer-element'", ";", "/**\n * A Polymer pseudo-element is an element that is declared in an unusual way,\n * such\n * that the analyzer couldn't normally analyze it, so instead it is declared in\n * comments.\n */", "export", "class", "PseudoElementScanner", "implements", "HtmlScanner", "{", "async", "scan", "(", "document", ",", "visit", ")", "{", "const", "elements", "=", "[", "]", ";", "await", "visit", "(", "(", "node", ")", "=>", "{", "if", "(", "dom5", ".", "isCommentNode", "(", "node", ")", "&&", "node", ".", "data", "&&", "node", ".", "data", ".", "includes", "(", "'@pseudoElement'", ")", ")", "{", "const", "parsedJsdoc", "=", "jsdoc", ".", "parseJsdoc", "(", "node", ".", "data", ")", ";", "const", "pseudoTag", "=", "jsdoc", ".", "getTag", "(", "parsedJsdoc", ",", "'pseudoElement'", ")", ";", "const", "tagName", "=", "pseudoTag", "&&", "pseudoTag", ".", "name", ";", "if", "(", "tagName", ")", "{", "const", "element", "=", "new", "ScannedPolymerElement", "(", "{", "astNode", ":", "node", ",", "statementAst", ":", "undefined", ",", "tagName", ":", "tagName", ",", "jsdoc", ":", "parsedJsdoc", ",", "description", ":", "parsedJsdoc", ".", "description", ",", "sourceRange", ":", "document", ".", "sourceRangeForNode", "(", "node", ")", ",", "privacy", ":", "getOrInferPrivacy", "(", "tagName", ",", "parsedJsdoc", ")", ",", "abstract", ":", "jsdoc", ".", "hasTag", "(", "parsedJsdoc", ",", "'abstract'", ")", ",", "properties", ":", "[", "]", ",", "attributes", ":", "new", "Map", "(", ")", ",", "events", ":", "new", "Map", "(", ")", ",", "listeners", ":", "[", "]", ",", "behaviors", ":", "[", "]", ",", "className", ":", "undefined", ",", "extends", ":", "undefined", ",", "staticMethods", ":", "new", "Map", "(", ")", ",", "methods", ":", "new", "Map", "(", ")", ",", "mixins", ":", "[", "]", ",", "observers", ":", "[", "]", ",", "superClass", ":", "undefined", "}", ")", ";", "element", ".", "pseudo", "=", "true", ";", "annotateElementHeader", "(", "element", ")", ";", "elements", ".", "push", "(", "element", ")", ";", "}", "}", "}", ")", ";", "return", "{", "features", ":", "elements", "}", ";", "}", "}" ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 7, null, 5827, null, 7, null, null, null, 5, null, null, null, null, null, null, null, null, 330, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 6, null, null, null, null, null, null, null, null, null, null, null, 297, null, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null, null, null, null, null, null, null, 19659, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]