Showing preview only (3,789K chars total). Download the full file or copy to clipboard to get everything.
Repository: we7coreteam/w7-rangine-project-document
Branch: master
Commit: 789f0287149a
Files: 231
Total size: 3.5 MB
Directory structure:
gitextract_l4ssw8zl/
├── .editorconfig
├── .gitignore
├── .php_cs
├── LICENSE
├── README.md
├── app/
│ ├── Command/
│ │ ├── Document/
│ │ │ └── CleanUpRecordsCommand.php
│ │ ├── Install/
│ │ │ ├── InitCommand.php
│ │ │ └── SyncDataCommand.php
│ │ ├── Todo/
│ │ │ └── CustomCommand.php
│ │ └── index.html
│ ├── Controller/
│ │ ├── Admin/
│ │ │ ├── ChapterController.php
│ │ │ ├── Document/
│ │ │ │ ├── ChapterApiController.php
│ │ │ │ └── ChapterApiDataController.php
│ │ │ ├── DocumentController.php
│ │ │ ├── DocumentHomeController.php
│ │ │ ├── FeedbackController.php
│ │ │ ├── HomepageSettingController.php
│ │ │ ├── MenuSettingController.php
│ │ │ ├── SettingController.php
│ │ │ ├── StarController.php
│ │ │ ├── ThirdPartyLoginController.php
│ │ │ ├── UploadController.php
│ │ │ ├── UserController.php
│ │ │ ├── UserOperateLogController.php
│ │ │ ├── UserShareController.php
│ │ │ └── index.html
│ │ ├── BaseController.php
│ │ ├── Common/
│ │ │ ├── AuthController.php
│ │ │ ├── MenuController.php
│ │ │ ├── UserController.php
│ │ │ └── VerifyCodeController.php
│ │ ├── Document/
│ │ │ ├── ChapterController.php
│ │ │ ├── DocumentController.php
│ │ │ ├── DocumentHomeController.php
│ │ │ ├── FeedbackController.php
│ │ │ └── MockApiReponseController.php
│ │ └── Install/
│ │ └── IndexController.php
│ ├── Exception/
│ │ ├── ErrorHttpException.php
│ │ └── InternalException.php
│ ├── Handler/
│ │ ├── Cache/
│ │ │ └── DbHandler.php
│ │ ├── Exception/
│ │ │ └── ExceptionHandler.php
│ │ └── Session/
│ │ ├── CacheHandler.php
│ │ └── DbHandler.php
│ ├── Helper/
│ │ └── Functions.php
│ ├── Listener/
│ │ └── index.html
│ ├── Message/
│ │ └── index.html
│ ├── Middleware/
│ │ ├── AppAuthMiddleware.php
│ │ ├── BackendDocumentPermissionMiddleware.php
│ │ ├── CheckAuthMiddleware.php
│ │ ├── CheckFounderMiddleware.php
│ │ ├── CorsApiMiddleware.php
│ │ └── FrontendDocumentPermissionMiddleware.php
│ ├── Model/
│ │ ├── Entity/
│ │ │ ├── App.php
│ │ │ ├── BaseModel.php
│ │ │ ├── Cache.php
│ │ │ ├── Document/
│ │ │ │ ├── Chapter.php
│ │ │ │ ├── ChapterApi.php
│ │ │ │ ├── ChapterApiData.php
│ │ │ │ ├── ChapterApiExtend.php
│ │ │ │ ├── ChapterApiParam.php
│ │ │ │ ├── ChapterApiReponse.php
│ │ │ │ └── ChapterContent.php
│ │ │ ├── Document.php
│ │ │ ├── DocumentFeedback.php
│ │ │ ├── DocumentHome.php
│ │ │ ├── DocumentPermission.php
│ │ │ ├── DocumentSearch.php
│ │ │ ├── Session.php
│ │ │ ├── Setting.php
│ │ │ ├── Star.php
│ │ │ ├── User.php
│ │ │ ├── UserOperateLog.php
│ │ │ └── UserThirdParty.php
│ │ ├── Logic/
│ │ │ ├── AppLogic.php
│ │ │ ├── BaseLogic.php
│ │ │ ├── ChapterLogic.php
│ │ │ ├── Document/
│ │ │ │ ├── ChapterApi/
│ │ │ │ │ ├── ChapterCommonLogic.php
│ │ │ │ │ ├── ChapterDemoLogic.php
│ │ │ │ │ ├── ChapterImportLogic.php
│ │ │ │ │ ├── ChapterRecordLogic.php
│ │ │ │ │ └── ChapterRuleLogic.php
│ │ │ │ ├── ChapterApiDataLogic.php
│ │ │ │ ├── ChapterApiLogic.php
│ │ │ │ ├── ChapterApiParamLogic.php
│ │ │ │ ├── ChapterContentLogic.php
│ │ │ │ └── MockApi/
│ │ │ │ └── MockApiReponseLogic.php
│ │ │ ├── DocumentFeedbackLogic.php
│ │ │ ├── DocumentHomeLogic.php
│ │ │ ├── DocumentLogic.php
│ │ │ ├── DocumentPermissionLogic.php
│ │ │ ├── DocumentSearchLogic.php
│ │ │ ├── HomepageSettingLogic.php
│ │ │ ├── Install/
│ │ │ │ └── InstallLogic.php
│ │ │ ├── MenuSettingLogic.php
│ │ │ ├── OauthLogic.php
│ │ │ ├── SettingLogic.php
│ │ │ ├── StarLogic.php
│ │ │ ├── ThirdPartyLoginLogic.php
│ │ │ ├── UserLogic.php
│ │ │ ├── UserOperateLogic.php
│ │ │ └── UserShareLogic.php
│ │ ├── Service/
│ │ │ ├── AES.php
│ │ │ ├── CdnLogic.php
│ │ │ ├── DbCacheLogic.php
│ │ │ └── SessionLogic.php
│ │ └── Validate/
│ │ └── index.html
│ ├── Process/
│ │ └── index.html
│ ├── Provider/
│ │ └── Socialite/
│ │ ├── ServiceProvider.php
│ │ └── ThirdPartyLogin/
│ │ ├── OauthTrait.php
│ │ ├── QQOauth.php
│ │ ├── We7Oauth.php
│ │ └── WechatOauth.php
│ ├── Task/
│ │ └── index.html
│ └── View/
│ └── index.html
├── bin/
│ ├── gerent
│ └── server
├── composer.json
├── config/
│ ├── app.php
│ ├── crontab.php
│ ├── define.php
│ ├── log.php
│ └── server.php
├── database/
│ ├── index.html
│ ├── migrations/
│ │ ├── 2020_01_02_194246_create_user_third_party.php
│ │ ├── 2020_02_17_121335_alter_setting.php
│ │ ├── 2020_03_02_153429_create_app.php
│ │ ├── 2020_03_03_152902_alter_star.php
│ │ ├── 2020_03_03_154818_alter_document.php
│ │ ├── 2020_03_23_114510_table_operate_log.php
│ │ ├── 2020_04_07_145338_create_document_chapter_api.php
│ │ ├── 2020_04_07_145420_create_document_chapter_api_param.php
│ │ ├── 2020_04_07_151451_create_document_chapter_api_extend.php
│ │ ├── 2020_05_27_092518_create_document_chapter_api_reponse_table.php
│ │ ├── 2020_06_11_145556_add_rule_to_document_chapter_api_param_table.php
│ │ ├── 2021_03_03_170511_create_document_feedback_table.php
│ │ ├── 2021_03_05_142937_create_document_chapter_api_data_table.php
│ │ ├── 2021_03_08_164459_alter_respond_to_document_chapter_api_data_table.php
│ │ ├── 2021_03_16_104941_create_document_home_table.php
│ │ ├── 2021_03_29_110505_create_document_search_hot_table.php
│ │ ├── 2021_04_09_100433_alter_user_table.php
│ │ └── index.html
│ └── seeds/
│ ├── DatabaseSeeder.php
│ └── index.html
├── docs/
│ ├── .gitignore
│ ├── build-dev.sh
│ ├── build.sh
│ ├── frontend/
│ │ └── apidoc.json
│ └── package.json
├── install/
│ └── document.sql
├── mockApi/
│ ├── .gitignore
│ ├── app.js
│ └── package.json
├── public/
│ ├── css/
│ │ ├── app.45a4fd9d.css
│ │ ├── chunk-06ade0a7.d9d343de.css
│ │ ├── chunk-079f5797.5ffb7ccc.css
│ │ ├── chunk-07e6273c.8f6be2eb.css
│ │ ├── chunk-10615ad3.8f32f691.css
│ │ ├── chunk-1e630799.23444e38.css
│ │ ├── chunk-20afbe1d.9cfc489e.css
│ │ ├── chunk-211c6b12.9850dd89.css
│ │ ├── chunk-22e40c8e.2d7343f0.css
│ │ ├── chunk-25f82f1a.3e053f1b.css
│ │ ├── chunk-3337dd8f.3c05d3bd.css
│ │ ├── chunk-3bcf66f7.0b7a87d8.css
│ │ ├── chunk-416ef35e.8e4636b1.css
│ │ ├── chunk-457e440b.d1b08c94.css
│ │ ├── chunk-564fade6.0e433876.css
│ │ ├── chunk-56652b45.339826ab.css
│ │ ├── chunk-57425795.c9955d2b.css
│ │ ├── chunk-5b1f82de.316d8ff0.css
│ │ ├── chunk-654f0b98.193fcd50.css
│ │ ├── chunk-65eafec3.169b0d4d.css
│ │ ├── chunk-6a2c3c1a.356edd1a.css
│ │ ├── chunk-7060d2be.ba342d3f.css
│ │ ├── chunk-71aaa888.b923ac67.css
│ │ ├── chunk-73af5400.9b10b85b.css
│ │ ├── chunk-775b8fab.d326fcb8.css
│ │ ├── chunk-a3879d6c.ffbb8d99.css
│ │ ├── chunk-ab7deece.39a1833e.css
│ │ ├── chunk-b09d1c24.5230f4f0.css
│ │ ├── chunk-b9b22232.3c05d3bd.css
│ │ ├── chunk-bd264252.3d26cc4c.css
│ │ ├── chunk-d779deb8.207190f3.css
│ │ ├── chunk-f66a53c0.e0f01506.css
│ │ └── chunk-vendors.1603aa5b.css
│ ├── index.html
│ └── js/
│ ├── app.9dc9e499.js
│ ├── chunk-06ade0a7.a7e4c7a7.js
│ ├── chunk-079f5797.19ae5348.js
│ ├── chunk-07e6273c.1984b9b7.js
│ ├── chunk-10615ad3.5901db24.js
│ ├── chunk-168777de.cb8bf66b.js
│ ├── chunk-1e630799.897fa4c7.js
│ ├── chunk-20afbe1d.bcdaad46.js
│ ├── chunk-211c6b12.01b14833.js
│ ├── chunk-22e40c8e.f3e7130f.js
│ ├── chunk-25f82f1a.e3262c66.js
│ ├── chunk-2d0ba2e6.ba43e34b.js
│ ├── chunk-2d22276a.90e5dc78.js
│ ├── chunk-3337dd8f.e12552ed.js
│ ├── chunk-3bcf66f7.da2788c2.js
│ ├── chunk-416ef35e.e3de812c.js
│ ├── chunk-457e440b.71326ed5.js
│ ├── chunk-564fade6.23bb5ce8.js
│ ├── chunk-56652b45.b9202ad0.js
│ ├── chunk-57425795.4709a7c2.js
│ ├── chunk-5b1f82de.b6b71a96.js
│ ├── chunk-654f0b98.4b5aff3b.js
│ ├── chunk-65eafec3.92b978b7.js
│ ├── chunk-6a2c3c1a.5e3ea521.js
│ ├── chunk-7060d2be.17de5f7a.js
│ ├── chunk-71aaa888.7c8286dc.js
│ ├── chunk-73af5400.5503ef14.js
│ ├── chunk-775b8fab.3c36ea5b.js
│ ├── chunk-a3879d6c.c1f2b764.js
│ ├── chunk-ab7deece.198a94a8.js
│ ├── chunk-b09d1c24.40e2b6cd.js
│ ├── chunk-b9b22232.9694579b.js
│ ├── chunk-bd264252.deae42c5.js
│ ├── chunk-d779deb8.cbfbc744.js
│ ├── chunk-f66a53c0.e61a0c3e.js
│ └── chunk-vendors.26b96680.js
├── releases.md
├── restart.sh
├── route/
│ ├── admin.php
│ ├── common.php
│ ├── document.php
│ └── install.php
├── tests/
│ └── PoolTest.php
└── tools/
├── build.sh
└── pre-commit
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
================================================
FILE: .gitignore
================================================
.buildpath
.settings/
.project
.idea/
.git/
vendor/
.phpintel/
.DS_Store
/vendor
.env
/runtime
================================================
FILE: .php_cs
================================================
<?php
/**
* 使用说明
*
* 基于 php-cs-fixer 插件,请先使用composer安装此插件
*
* 1、Preferences -> Tools -> External Tools 添加工具
* 2、添加 php-cs-fixer 工具,参如如下:
* Name: php-fixer
* Description: php-fixer
* Program: /{项目根目录}/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
* Arguments: --config=$ProjectFileDir$/.php_cs --verbose fix "$FileDir$/$FileName$"
* Working directory: 同Program
* 3、Keymap -> External Tools -> php-fixer 设置快捷键 Alt+f
* 4、打开要格式化的文件,按 Alt+f 保存即可
*/
define('SOFT_NAME', 'WeEngine Document System');
$finder = PhpCsFixer\Finder::create()
->files()
->name('*.php')
->exclude('vendor')
->in(__DIR__)
->ignoreDotFiles(true)
->ignoreVCS(true);
$fixers = array(
'@PSR2' => true,
'single_quote' => true, //简单字符串应该使用单引号代替双引号;
'no_unused_imports' => true, //删除没用到的use
'no_singleline_whitespace_before_semicolons' => true, //禁止只有单行空格和分号的写法;
'no_empty_statement' => true, //多余的分号
'no_extra_consecutive_blank_lines' => true, //多余空白行
'no_blank_lines_after_class_opening' => true, //类开始标签后不应该有空白行;
'include' => true, //include 和文件路径之间需要有一个空格,文件路径不需要用括号括起来;
'no_trailing_comma_in_list_call' => true, //删除 list 语句中多余的逗号;
'no_leading_namespace_whitespace' => true, //命名空间前面不应该有空格;
'standardize_not_equals' => true, //使用 <> 代替 !=;
'blank_line_after_opening_tag' => true, //PHP开始标记后换行
'indentation_type' => true,
'no_multiline_whitespace_around_double_arrow' => true, //去掉数组=>多余的空格
'object_operator_without_whitespace' => true, //去掉->间的空格
'ternary_operator_spaces' => true, //标准化三元运算符
'binary_operator_spaces' => true, //操作符间的空格
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => SOFT_NAME . " \r\n\r\n(c) We7Team 2019 <https://www.w7.cc> \r\n\r\nThis is not a free software \r\nUsing it under the license terms\r\nvisited https://www.w7.cc for more details",
],
//'braces' => ['position_after_anonymous_constructs' => 'same'], //设置大括号换行,暂时根本Psr
//'binary_operator_spaces' => ['default' => 'align_single_space'], //等号对齐、数字箭头符号对齐
);
return PhpCsFixer\Config::create()
->setRules($fixers)
->setFinder($finder)
->setIndent("\t")
->setUsingCache(false);
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
Copyright 2018 微擎团队
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
### 简介
一款基于软擎框架([https://www.rangine.com/](https://www.rangine.com/))的开源Markdown文档系统。
常驻内存,不依赖传统的 Nginx/Apache 和 PHP-FPM,全异步非阻塞、协程实现。
### 环境要求
* PHP > 7.2.0
* PHP Swoole 扩展 >= 4.3.0
* PHP Mbstring 扩展
* PHP Pdo MySql 扩展
* PHP Redis 扩展
### 安装
#### 下载安装包
https://github.com/we7coreteam/w7-rangine-project-document/releases/ 下载最新版的文档系统源码
#### 解压文件
下载源码后,解压到服务器目录(如:/home/wwwroot)
进入文档系统源码目录,```cd /home/wwwroot/w7-rangine-project-document```
#### 安装扩展包
```
composer install
```
#### 运行系统
> 如果您的99端口被其他应用占用,您需要手动修改config/server文件中的 SERVER_HTTP_PORT 默认端口号
项目根目录下执行命令
```
bin/server start
```
#### 安装系统
访问根目录/install,按照页面提示进行安装
安装完成后重启服务
重启服务:项目根目录下执行命令
```
sh restart.sh
```
执行数据迁移命令:项目根目录下执行命令
```
bin/gerent migrate:migrate --force
```
如需重新安装
请手动删除 runtime/install.lock 与.env文件 并且重启服务
================================================
FILE: app/Command/Document/CleanUpRecordsCommand.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Command\Document;
use W7\App\Model\Entity\Document\ChapterContent;
use W7\Console\Command\CommandAbstract;
class CleanUpRecordsCommand extends CommandAbstract
{
protected $description = '清理API文档缓存';
protected function configure()
{
$this->setName('todo:clean_up_records');
}
protected function handle($options)
{
go(function () {
$this->clean();
});
}
/*
* 本操作用于,更改API文档markdown结构,手动清理缓存生效
* */
public function clean()
{
try {
ChapterContent::query()->where('layout', 1)->update(['content' => '']);
$this->output->success('API文档缓存已清理');
} catch (\Exception $e) {
$this->output->error($e->getMessage());
}
}
}
================================================
FILE: app/Command/Install/InitCommand.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Command\Install;
use W7\App\Model\Logic\UserLogic;
use W7\Console\Command\CommandAbstract;
use W7\Core\Exception\CommandException;
class InitCommand extends CommandAbstract
{
protected function handle($options)
{
try {
// 是否已安装
$lockFile = RUNTIME_PATH . '/install.lock';
if (file_exists($lockFile)) {
throw new CommandException('文档系统已经安装,如果需要重新安装请手动删除 runtime/install.lock 文件');
}
// 版本检查
$this->checkExtension();
// 生成配置文件
$config = $this->installConfig();
$this->generateConfig($config);
// 初始化数据库
$this->initDatabase($config);
// 生成lock文件
file_put_contents($lockFile, 'success');
$this->output->success('安装已完成!提示:请按照文档配置,启动相关服务');
} catch (\Exception $e) {
$this->output->error($e->getMessage());
}
}
private function generateConfig($config)
{
$env = file_get_contents(BASE_PATH . '/install/.env.template');
// server
$env = str_replace('{{SERVER_HTTP_PORT}}', $config['server_port'], $env);
// db
$env = str_replace('{{DATABASE_DEFAULT_DATABASE}}', $config['db_database'], $env);
$env = str_replace('{{DATABASE_DEFAULT_HOST}}', $config['db_host'], $env);
$env = str_replace('{{DATABASE_DEFAULT_PORT}}', $config['db_port'], $env);
$env = str_replace('{{DATABASE_DEFAULT_USERNAME}}', $config['db_username'], $env);
$env = str_replace('{{DATABASE_DEFAULT_PASSWORD}}', $config['db_password'], $env);
$env = str_replace('{{DATABASE_DEFAULT_PREFIX}}', $config['db_prefix'], $env);
// cache
$env = str_replace('{{CACHE_DEFAULT_DRIVER}}', $config['cache_driver'], $env);
if ($config['cache_driver'] == 'redis') {
$env = str_replace('{{CACHE_DEFAULT_HOST}}', $config['cache_host'], $env);
$env = str_replace('{{CACHE_DEFAULT_PORT}}', $config['cache_port'], $env);
$env = str_replace('{{CACHE_DEFAULT_PASSWORD}}', '', $env);
} else {
$env = str_replace('{{CACHE_DEFAULT_HOST}}', '127.0.0.1', $env);
$env = str_replace('{{CACHE_DEFAULT_PORT}}', '6379', $env);
$env = str_replace('{{CACHE_DEFAULT_PASSWORD}}', '', $env);
}
if (file_put_contents(BASE_PATH . '/.env', $env) === false) {
throw new CommandException('配置文件写入失败!');
}
$this->output->success('配置文件已生成!');
$this->segmentation();
}
/**
* @param $config
* @throws CommandException
*/
private function initDatabase($config)
{
// 创建数据库
try {
$connect = new \PDO("mysql:host={$config['db_host']};port={$config['db_port']};charset=utf8", $config['db_username'], $config['db_password']);
$connect->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
$sql = "CREATE DATABASE IF NOT EXISTS {$config['db_database']} DEFAULT CHARSET utf8 COLLATE utf8_general_ci;";
$connect->exec($sql);
$statement = $connect->query("SHOW DATABASES LIKE '{$config['db_database']}';");
if (empty($statement->fetch())) {
throw new CommandException('创建数据库失败!');
}
$connect->exec("USE {$config['db_database']};");
$statement = $connect->query("SHOW TABLES LIKE '{$config['db_prefix']}%';");
if (!empty($statement->fetch())) {
throw new CommandException('您的数据库不为空,请重新建立数据库或清空该数据库或更改表前缀!');
}
// 导入数据
$importSql = file_get_contents(BASE_PATH . '/install/document.sql');
$importSql = str_replace('ims_', $config['db_prefix'], $importSql);
$connect->exec($importSql);
$connect = null;
// 创建系统管理员账号
$this->createAdmin($config);
$this->output->success('数据库初始化成功!');
$this->segmentation();
} catch (\PDOException $e) {
throw new CommandException($e->getMessage());
}
}
/**
* @param $config
* @throws CommandException
*/
private function createAdmin($config)
{
try {
$connect = new \PDO("mysql:host={$config['db_host']};port={$config['db_port']};dbname={$config['db_database']};charset=utf8mb4", $config['db_username'], $config['db_password']);
$username = $config['admin_username'];
$password = UserLogic::instance()->userPwdEncryption($username, $config['admin_password']);
$userTable = $config['db_prefix'] . 'user';
$adminInsert = [
'username' => $username,
'userpass' => $password,
'is_ban' => 0,
'remark' => '超管',
'group_id' => 1,
'created_at' => time(),
'updated_at' => time(),
];
$sql = "INSERT INTO `{$userTable}` (`" . implode('`,`', array_keys($adminInsert)) . "`) VALUE ('" . implode("','", $adminInsert) . "')";
$connect->exec($sql);
$statement = $connect->query("SELECT * FROM {$userTable} WHERE username = '{$username}'");
if (empty($statement->fetch())) {
throw new CommandException('创建系统管理员失败!');
}
$connect = null;
} catch (\PDOException $e) {
throw new CommandException($e->getMessage());
}
}
private function checkExtension()
{
$this->output->info('检查PHP扩展: ');
$this->output->writeln('');
if (version_compare(PHP_VERSION, '7.2.0', '<')) {
throw new CommandException('PHP 版本必须>= 7.2.0');
}
$extension = ['pdo_mysql', 'mbstring', 'swoole'];
foreach ($extension as $ext) {
if (!extension_loaded($ext)) {
throw new CommandException($ext . ' 扩展未安装');
}
}
if (version_compare(swoole_version(), '4.3.0', '<')) {
throw new CommandException('swoole 版本必须>= 4.3.0');
}
if (is_writable(BASE_PATH) === false) {
throw new CommandException('请保证' . BASE_PATH . '目录有写权限!');
}
if (is_writable(RUNTIME_PATH) === false) {
throw new CommandException('请保证' . RUNTIME_PATH . '目录有写权限!');
}
if (!file_exists(BASE_PATH . '/composer.json')) {
throw new CommandException('请先执行 composer install --no-dev 安装扩展包');
}
$this->output->success('PHP扩展已检查完毕!');
$this->segmentation();
}
private function installConfig()
{
// 验证规则
$validate = [
'host' => '/[\w\.]{5,64}/',
'port' => '/[1-9]\d{0,4}/'
];
$install = [
'server' => [
'option' => '服务',
'value' => [
'port' => [
'name' => '端口',
'default' => 80,
'validate' => $validate['port']
]
]
],
'db' => [
'option' => '数据库',
'value' => [
'host' => [
'name' => '地址',
'default' => '127.0.0.1',
'validate' => $validate['host']
],
'port' => [
'name' => '端口',
'default' => '3306',
'validate' => $validate['port']
],
'database' => [
'name' => '名称',
'default' => 'we7_document',
'validate' => '/[a-z_]{5,24}/'
],
'prefix' => [
'name' => '表前缀',
'default' => 'ims_',
'validate' => '/[a-z][a-z_]{1,20}/'
],
'username' => [
'name' => '用户名',
'default' => 'root',
'validate' => '/\w{4,24}/'
],
'password' => [
//'type' => 'hidden',
'name' => '密码',
'default' => '',
'validate' => "/[0-9A-Za-z`~!@#$%^&*()\-_+<>?:\"{},.\/;'[\]|]{4,32}/"
]
]
],
'cache' => [
'option' => '缓存',
'value' => [
'driver' => [
'name' => '驱动, 只支持[db,redis],系统已集成db缓存',
'default' => 'db', // db, redis
'validate' => '/(db|redis)/'
],
'host' => [
'name' => '地址',
'default' => '127.0.0.1',
'validate' => $validate['host']
],
'port' => [
'name' => '端口',
'default' => 6379,
'validate' => $validate['port']
],
]
],
'admin' => [
'option' => '管理员',
'value' => [
'username' => [
'name' => '用户名',
'default' => 'admin',
'validate' => '/\w{4,24}/'
],
'password' => [
//'type' => 'hidden',
'name' => '密码',
'default' => '',
'validate' => '/\w{6,32}/'
],
'passwordConfirm' => [
//'type' => 'hidden',
'name' => '确认密码',
'default' => '',
'validate' => 'reconfirm',
'confirm' => 'password'
],
]
]
];
$config = [];
foreach ($install as $option => $value) {
$this->output->info("请设置{$value['option']}相关信息: ");
foreach ($value['value'] as $key => $item) {
if (empty($item['name'])) {
throw new CommandException("{$value['option']}{$item['name']}不能为空");
}
$configKey = $option . '_' . $key;
if (isset($item['type']) && $item['type'] == 'hidden') {
$config[$configKey] = $this->output->askHidden("请输入{$value['option']}{$item['name']}");
} else {
$config[$configKey] = $this->output->ask("请输入{$value['option']}{$item['name']}", $item['default']);
}
// 如果缓存不使用redis,直接跳过
if ($option == 'cache' && $config[$configKey] == 'db') {
break;
}
// 数据验证
$reg = '/\w+/';
if (isset($item['validate']) && $item['validate']) {
$reg = $item['validate'];
}
if ($reg == 'reconfirm') {
if ($config[$configKey] != $config[$option . '_' . $item['confirm']]) {
throw new CommandException('两次输入的密码不一样!');
}
} else {
if (!preg_match($reg, $config[$configKey])) {
throw new CommandException("{$value['option']}{$item['name']}格式不正确!");
}
}
}
$this->segmentation();
}
return $config;
}
private function segmentation()
{
$this->output->writeln('');
}
}
================================================
FILE: app/Command/Install/SyncDataCommand.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Command\Install;
use W7\Console\Command\CommandAbstract;
use W7\Core\Exception\CommandException;
class SyncDataCommand extends CommandAbstract
{
private $userIds;
protected function handle($options)
{
try {
$get = [
'host' => ienv('DATABASE_ORIGINAL_HOST'),
'username' => ienv('DATABASE_ORIGINAL_USERNAME'),
'password' => ienv('DATABASE_ORIGINAL_PASSWORD'),
'database' => ienv('DATABASE_ORIGINAL_DATABASE'),
];
// 获取用户 (商城数据库配置)
$userDataBase = [
'host' => ienv('DATABASE_MEMBER_HOST'),
'username' => ienv('DATABASE_MEMBER_USERNAME'),
'password' => ienv('DATABASE_MEMBER_PASSWORD'),
'database' => ienv('DATABASE_MEMBER_DATABASE'),
];
// 要获取数据的所有表名称
$tables = [
'ims_wiki',
'ims_wiki_list',
'ims_wiki_view',
'ims_members',
];
// 定义生成的sql文件
$file = RUNTIME_PATH . '/document.sql';
if (file_exists($file)) {
unlink($file);
}
// 拓展检查
$this->checkExtension();
// 生成sql文件
$this->insertData($get, $userDataBase, $tables, $file);
} catch (\Exception $e) {
$this->output->error($e->getMessage());
}
}
private function checkExtension()
{
$this->output->info('检查PHP扩展: ');
$this->segmentation();
$ext = 'mysqli';
if (!extension_loaded($ext)) {
throw new CommandException($ext . ' 扩展未安装');
}
if (is_writable(BASE_PATH) === false) {
throw new CommandException('请检查' . BASE_PATH . '目录权限!');
}
if (is_writable(RUNTIME_PATH) === false) {
throw new CommandException('请检查' . RUNTIME_PATH . '目录权限!');
}
$this->output->writeln('PHP扩展已检查完毕!');
$this->segmentation();
}
private function insertData($get, $userDataBase, $tables, $file)
{
if (!$get || !$userDataBase || !$tables || !$file) {
throw new CommandException('请检查数据配置!');
}
if ($get) {
$this->checkDatabase($get);
}
if ($userDataBase) {
$this->checkDatabase($userDataBase);
}
$sql = '';
$dirChapters = [];
$maxChapterId = 0;
$handle = fopen($file, 'a');
foreach ($tables as $key => $table) {
$data = $this->getdata($table, $get, $userDataBase);
if ($data) {
if ($table == 'ims_wiki') {
$i = 0;
foreach ($data as $k => $v) {
$this->userIds[$k] = $v['creator_id'];
$sql .= 'INSERT INTO ims_document (id, name, description,creator_id,created_at,updated_at,is_public) VALUES( ';
$sql .= " '".$v['id']."', '".$v['name']."', '".$v['description']."', '".$v['creator_id']."', '".$v['created_at']."','".$v['updated_at']."', '".$v['is_show']."' );".PHP_EOL;
$sql .= 'INSERT INTO ims_document_permission (id, user_id, document_id, permission, created_at,updated_at) VALUES( ';
$sql .= " '".$v['id']."', '".$v['creator_id']."', '".$v['id']."', 1,'".$v['created_at']."', '".$v['updated_at']."' );".PHP_EOL;
$res = $this->setContent($i, count($data), $sql, $handle);
if ($res) {
$sql = '';
}
$i++;
}
} elseif ($table == 'ims_wiki_list') {
$i = 0;
$parentIds = array_column($data, 'parent_id');
foreach ($data as $k => $v) {
$isDir = 0;
$maxChapterId = $v['id'] > $maxChapterId ? $v['id'] : $maxChapterId;
if (in_array($v['id'], $parentIds)) {
$isDir = 1;
$dirChapters[$v['id']] = $v;
}
$sql .= 'INSERT INTO ims_document_chapter (id, parent_id, name,document_id,sort,levels,is_dir, created_at,updated_at) VALUES( ';
$sql .= " '".$v['id']."', '".$v['parent_id']."', '".$v['name']."', '".$v['document_id']."', '".$v['sort']."', '".$v['levels']."', '". $isDir ."', '".$v['created_at']."', '".$v['updated_at']."' ); ".PHP_EOL;
$res = $this->setContent($i, count($data), $sql, $handle);
if ($res) {
$sql = '';
}
$i++;
}
} elseif ($table == 'ims_wiki_view') {
$i = 0;
$chapterNum = count($data);
foreach ($data as $k => $v) {
//表示该章节是目录并且有内容,创建新的章节
if (!empty($dirChapters[$v['chapter_id']])) {
++$maxChapterId;
++$chapterNum;
$sql .= 'INSERT INTO ims_document_chapter (id, parent_id, name,document_id,sort,levels,is_dir, created_at,updated_at) VALUES( ';
$sql .= " '".$maxChapterId."', '".$v['chapter_id']."', '".$dirChapters[$v['chapter_id']]['name']."', '".$dirChapters[$v['chapter_id']]['document_id']."', '".$dirChapters[$v['chapter_id']]['sort']."', '".$dirChapters[$v['chapter_id']]['levels']."', '". 0 ."', '".$dirChapters[$v['chapter_id']]['created_at']."', '".$dirChapters[$v['chapter_id']]['updated_at']."' ); ".PHP_EOL;
$v['chapter_id'] = $maxChapterId;
$i++;
$res = $this->setContent($i, $chapterNum, $sql, $handle);
if ($res) {
$sql = '';
}
}
$sql .= 'INSERT INTO ims_document_chapter_content (id, chapter_id, content,layout) VALUES( ';
$content = htmlspecialchars_decode(html_entity_decode($v['content']));
$content = str_replace(''', "'", $content);
$content = addslashes($content);
$sql .= " '".$v['id']."', '".$v['chapter_id']."', '".$content."', '".$v['layout']."' ); ".PHP_EOL;
$res = $this->setContent($i, $chapterNum, $sql, $handle);
if ($res) {
$sql = '';
}
$i++;
}
} elseif ($table == 'ims_members') {
$i = 0;
foreach ($data as $k => $v) {
if ($v['username'] != 'admin') {
$sql .= 'INSERT INTO ims_user (id, username, is_ban, created_at, updated_at) VALUES( ';
$sql .= " '".$v['id']."', '".$v['username']."','".$v['is_ban']."',".$v['created_at'].",".$v['updated_at']."); ".PHP_EOL;
$res = $this->setContent($i, count($data), $sql, $handle);
if ($res) {
$sql = '';
}
}
$i++;
}
}
}
}
fclose($handle);
$this->output->success('success! 生成的SQL文件在runtime目录下的document.sql');
}
private function getdata($table, $get, $userDataBase)
{
if ($table == 'ims_members') {
$conn = new \mysqli($userDataBase['host'], $userDataBase['username'], $userDataBase['password']);
if ($conn->connect_error) {
throw new CommandException('连接失败' . $conn->connect_error);
}
$this->output->writeln($userDataBase['host'].'连接成功');
mysqli_query($conn, 'set names utf8');
mysqli_select_db($conn, $userDataBase['database']);
} else {
$conn = new \mysqli($get['host'], $get['username'], $get['password']);
if ($conn->connect_error) {
throw new CommandException('连接失败' . $conn->connect_error);
}
$this->output->writeln($get['host'].'连接成功');
mysqli_query($conn, 'set names utf8');
mysqli_select_db($conn, $get['database']);
}
// 获取数据
$data = [];
if ($table == 'ims_wiki') {
$sql = "select * from $table ";
} elseif ($table == 'ims_wiki_list') {
$sql = "select * from $table ";
} elseif ($table == 'ims_wiki_view') {
$sql = "select id,listid,content from $table ";
} elseif ($table == 'ims_members') {
if ($this->userIds) {
$this->userIds = rtrim(implode(',',array_unique($this->userIds)),',');
$sql = "select uid,username,password,status,joindate from $table where uid in ($this->userIds) ";
}else{
throw new CommandException('获取不到用户ID');
}
}
$retval = mysqli_query($conn, $sql);
if (!$retval) {
throw new CommandException('连接失败' . mysqli_error($conn));
}
while ($row = mysqli_fetch_array($retval, MYSQLI_ASSOC)) {
$data[] = $row;
}
$retval->close();
if ($data) {
mysqli_close($conn);
return $this->handleData($data, $table);
}
return false;
}
private function handleData($data, $table)
{
if (!$data) {
return '数据为空';
}
$tmp_data = [];
if ($table == 'ims_wiki') {
foreach ($data as $k => $v) {
$tmp_data[$k]['id'] = $v['id'];
$tmp_data[$k]['name'] = $v['title'];
$tmp_data[$k]['description'] = $v['description'];
$tmp_data[$k]['creator_id'] = $v['uid'];
$tmp_data[$k]['created_at'] = $v['createtime'] == 0 ? strtotime(time()) : $v['createtime'];
$tmp_data[$k]['updated_at'] = $v['createtime'] == 0 ? strtotime(time()) : $v['createtime'];
$tmp_data[$k]['is_show'] = $v['isread'] == 0 ? 2 : 1;
}
} elseif ($table == 'ims_wiki_list') {
foreach ($data as $k => $v) {
$tmp_data[$k]['id'] = $v['id'];
$tmp_data[$k]['parent_id'] = $v['parentid'];
$tmp_data[$k]['name'] = $v['name'];
$tmp_data[$k]['document_id'] = $v['wikiid'];
$tmp_data[$k]['sort'] = $v['displayorder'];
$tmp_data[$k]['levels'] = 0;
if (intval($v['lasttime']) <= 0 || !$v['lasttime'] || $v['lasttime'] == false) {
$tmp_data[$k]['created_at'] = strtotime('now');
$tmp_data[$k]['updated_at'] = strtotime('now');
} else {
$tmp_data[$k]['created_at'] = $v['lasttime'];
$tmp_data[$k]['updated_at'] = $v['lasttime'];
}
}
} elseif ($table == 'ims_wiki_view') {
foreach ($data as $k => $v) {
$tmp_data[$k]['id'] = $v['id'];
$tmp_data[$k]['chapter_id'] = $v['listid'];
$tmp_data[$k]['content'] = $v['content'];
$tmp_data[$k]['layout'] = 1;
}
} elseif ($table == 'ims_members') {
foreach ($data as $k => $v) {
$tmp_data[$k]['id'] = $v['uid'];
$tmp_data[$k]['username'] = $v['username'];
$tmp_data[$k]['is_ban'] = $v['status'];
$tmp_data[$k]['created_at'] = $v['joindate'];
$tmp_data[$k]['updated_at'] = $v['joindate'];
}
}
return $tmp_data;
}
private function setContent($i, $count, $sql, $handle)
{
if ($i%100 == 0) {
fwrite($handle, $sql);
return true;
} elseif ($i == $count -1) {
fwrite($handle, $sql);
return true;
}
}
private function checkDatabase($database)
{
// if (isset($database['host']) && $database['host']) {
// $pat = "/^(((1?\d{1,2})|(2[0-4]\d)|(25[0-5]))\.){3}((1?\d{1,2})|(2[0-4]\d)|(25[0-5])):[0-9]{2,6}$/";
// $pat2 = "/[\w][\w-]*\.(?:com\.cn|com|cn|co|net|org|gov|cc|biz|info)(\/|$)/isU";
// if (!preg_match($pat, $database['host']) && !preg_match($pat2, $database['host'])) {
// throw new CommandException('host填写错误');
// }
// }
if (!isset($database['username']) || !$database['username']) {
throw new CommandException('username不能为空');
}
if (!isset($database['password']) || !$database['password']) {
throw new CommandException('password不能为空');
}
if (!isset($database['database']) || !$database['database']) {
throw new CommandException('database不能为空');
}
}
private function segmentation()
{
$this->output->writeln('');
}
}
================================================
FILE: app/Command/Todo/CustomCommand.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Command\Todo;
use W7\Console\Command\CommandAbstract;
class CustomCommand extends CommandAbstract
{
protected $description = '上线需要执行的脚本';
protected function configure()
{
$this->setName('todo:custom');
}
protected function handle($options)
{
}
}
================================================
FILE: app/Command/index.html
================================================
================================================
FILE: app/Controller/Admin/ChapterController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Document\Chapter;
use W7\App\Model\Entity\Document\ChapterContent;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Entity\User;
use W7\App\Model\Entity\UserOperateLog;
use W7\App\Model\Logic\ChapterLogic;
use W7\App\Model\Logic\Document\ChapterApi\ChapterImportLogic;
use W7\App\Model\Logic\Document\ChapterContentLogic;
use W7\App\Model\Logic\DocumentLogic;
use W7\App\Model\Logic\DocumentPermissionLogic;
use W7\App\Model\Logic\UserOperateLogic;
use W7\App\Model\Logic\Document\ChapterApi\ChapterRecordLogic;
use W7\Http\Message\Server\Request;
/**
* Class ChapterController
* @package W7\App\Controller\Admin
*/
class ChapterController extends BaseController
{
public function detail(Request $request)
{
$this->validate($request, [
'document_id' => 'required|integer',
], [
'document_id.required' => '文档ID必传',
]);
/**
* @var User $user
*/
$user = $request->getAttribute('user');
$documentId = intval($request->input('document_id'));
$document = DocumentLogic::instance()->getById($documentId);
$chapter = ChapterLogic::instance()->getCatalog($documentId);
$result = [
'document' => [
'id' => $document->id,
'name' => $document->name,
],
'catalog' => $chapter,
'acl' => [
'has_manage' => $user->isManager
]
];
return $this->data($result);
}
/**
* @api {post} /admin/chapter/create 文档(目录)-新增
* @apiName create
* @apiGroup Chapter
*
* @apiParam {Number} name 章节ID
* @apiParam {Number} document_id 目录ID
* @apiParam {Number} parent_id 附ID
* @apiParam {Number} is_dir 是否为目录
* @apiParam {Number} layout 0:markdown格式 1:http格式(新增文件时)
*/
public function create(Request $request)
{
$this->validate($request, [
'name' => 'string|required|max:60',
'document_id' => 'required|integer|min:1',
'parent_id' => 'required|integer|min:0',
'is_dir' => 'required|boolean',
'layout' => 'integer'
], [
'name.required' => '章节名称必填',
'name.max' => '章节名最大60个字符',
'document_id.required' => '文档id必填',
'document_id.min' => '文档id最小为0',
'parent_id.required' => '父id必填',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
//频繁操作时间限制
if (icache()->get('creat_lock_time')){
throw new ErrorHttpException('操作过于频繁');
}
$parentId = intval($request->post('parent_id'));
if (!empty($parentId)) {
$parentChapter = ChapterLogic::instance()->getById($parentId);
if (empty($parentChapter)) {
throw new ErrorHttpException('父章节不存在');
}
if (!$parentChapter->is_dir) {
throw new ErrorHttpException('父章节不是目录,不可以新增子章节或者文档');
}
}
$isDir = $request->post('is_dir');
$documentId = intval($request->post('document_id'));
$maxSort = Chapter::query()->where('document_id', '=', $documentId)->where('parent_id', '=', $parentId)->max('sort');
$sort = intval($request->post('sort', ++$maxSort));
$chapter = Chapter::query()->create([
'name' => $request->post('name'),
'sort' => $sort,
'is_dir' => $isDir ? 1 : 0,
'document_id' => $documentId,
'parent_id' => $parentId,
]);
if (!$chapter) {
throw new ErrorHttpException('章节添加失败');
}
//记录操作锁
icache()->set('creat_lock_time',1,3);
$layout = $request->post('layout', 0);
if ($layout) {
//如果是非默认类型,新建时锁定类型
if (!empty($chapter->content)) {
$chapter->content->content = '';
$chapter->content->layout = $layout;
$chapter->content->save();
} else {
ChapterContent::query()->create([
'chapter_id' => $chapter->id,
'content' => '',
'layout' => $layout
]);
}
}
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $documentId,
'chapter_id' => $chapter->id,
'operate' => UserOperateLog::CREATE,
'remark' => $user->username . '创建章节' . $chapter->name
]);
return $this->data($chapter->toArray());
}
public function update(Request $request)
{
$this->validate($request, [
'name' => 'string|required|max:60',
'chapter_id' => 'required|integer|min:1',
'document_id' => 'required|integer',
], [
'name.required' => '章节名称必填',
'name.max' => '章节名最大60个字符',
'chapter_id.required' => '文档id必填',
'chapter_id.min' => '文档id最小为0',
'document_id.required' => '文档id必填',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
$chapter = ChapterLogic::instance()->getById($request->post('chapter_id'));
if (empty($chapter)) {
throw new ErrorHttpException('章节不存在');
}
$parentId = $request->post('parent_id', null);
if (isset($parentId)) {
if ($parentId != 0) {
$parentChapter = ChapterLogic::instance()->getById($parentId);
if (!$parentChapter || $parentChapter->is_dir != Chapter::IS_DIR) {
throw new ErrorHttpException('上级章节不存在');
}
}
$chapter->parent_id = $parentId;
}
$chapter->name = $request->post('name');
$chapter->save();
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $chapter->document_id,
'chapter_id' => $chapter->id,
'operate' => UserOperateLog::EDIT,
'remark' => $user->username . '编辑章节' . $chapter->name . '基本信息'
]);
return $this->data('success');
}
public function sort(Request $request)
{
$this->validate($request, [
'target.chapter_id' => 'sometimes|integer',
'target.position' => 'required|in:inner,before,after,move',
'chapter_id' => 'required|integer',
'document_id' => 'required|integer',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
$chapter = ChapterLogic::instance()->getById($request->post('chapter_id'));
if (empty($chapter)) {
throw new ErrorHttpException('要移动的章节不存在');
}
$position = $request->post('target')['position'];
$targetChapter = ChapterLogic::instance()->getById($request->post('target')['chapter_id']);
if ($targetChapter && ($targetChapter->is_dir != Chapter::IS_DIR)) {
//移动对象不是目录
throw new ErrorHttpException('只能移动到目录下面');
}
idb()->beginTransaction();
try {
if ($position == 'move') {
//移动当前文章/目录
$targetDocumentId = $request->post('target')['document_id'];
$documentPermission = DocumentPermissionLogic::instance()->getByDocIdAndUid($targetDocumentId, $user->id);
if (!$user->isFounder && !$documentPermission->isManager && !$documentPermission->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
// $chapter->document_id = $targetDocumentId;
// $chapter->save();
} else {
if ($targetChapter->document_id != $request->post('document_id')) {
throw new ErrorHttpException('只能移动到当前文档中的其它目录');
}
}
//放入到目录节点中,但不存在排序
if ($position == 'inner' || $position == 'move') {
try {
if (empty($targetChapter)) {
//目标节点不存在-移动到根目录下
//找到该文档的根节点中的其中一个章节
// $targetChapter = Chapter::query()->where('document_id', $chapter->document_id)->where('parent_id', '=', 0)->first();
//如果目标节点不存在-移动到根目录
$chapter->document_id = $targetDocumentId;
$chapter->parent_id = 0;
$chapter->save();
if ($chapter->document_id) {
$chapterLogic = new ChapterLogic();
$chapterLogic->moveSunChapter($chapter, $chapter->document_id);
}
}
//目标节点存在-移动到目标节点下
$targetChapter && ChapterLogic::instance()->moveByChapter($chapter, $targetChapter);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
} else {
//同项目上下级排序
if (empty($targetChapter)) {
throw new ErrorHttpException('要移到的章节不存在');
}
$chapter->parent_id = $targetChapter->parent_id;
$chapter->save();
try {
ChapterLogic::instance()->sortByChapter($chapter, $targetChapter, $position);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
if ($position != 'move') {
$targetChapter && $targetChapter = ChapterLogic::instance()->getById($targetChapter->parent_id);
}
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $chapter->document_id,
'chapter_id' => $chapter->id,
'operate' => UserOperateLog::CHAPTER_MOVE,
'remark' => $user->username . '移动章节' . $chapter->name . '到' . !empty($targetChapter) ? $targetChapter->name : '根节点'
]);
idb()->commit();
} catch (\Throwable $e) {
idb()->rollBack();
throw new ErrorHttpException($e->getMessage());
}
return $this->data('success');
}
public function delete(Request $request)
{
$this->validate($request, [
'chapter_id' => 'required',
'document_id' => 'required|integer',
], [
'chapter_id.required' => '章节不存在',
'document_id.required' => '文档id必填',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
if (!is_array($request->post('chapter_id'))) {
$chapterId = intval($request->post('chapter_id'));
$chapterId = [$chapterId];
} else {
$chapterId = $request->post('chapter_id');
}
try {
$documentId = intval($request->post('document_id'));
foreach ($chapterId as $id) {
$id = intval($id);
if (empty($id)) {
continue;
}
$chapter = ChapterLogic::instance()->getById($id);
if ($chapter) {
ChapterLogic::instance()->deleteById($id);
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $documentId,
'chapter_id' => $id,
'operate' => UserOperateLog::DELETE,
'remark' => $user->username . '删除章节' . $chapter->name
]);
}
}
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
return $this->data('success');
}
/**
* @api {post} /admin/chapter/save 文档内容-保存
* @apiName save
* @apiGroup Chapter
*
* @apiParam {Number} chapter_id 章节ID
* @apiParam {Number} document_id 文档ID
* @apiParam {Number} layout 文档类型 0:MARKDOWM文本,提交content 1:HTTP请求,提交record
* @apiParam {String} content 文档内容(layout为1时用record生成content,此字段提交无效)
* @apiParam {Array} record 请求记录
* @apiParam {Array} record.api 请求记录地址信息
* @apiParam {String} record.api.method 请求方式
* @apiParam {String} record.api.url 地址
* @apiParam {String} record.api.description 描述
* @apiParam {String} record.api.tab_location tab页上次指定记录head,query,body
* @apiParam {String} record.api.body_param_location body_param默认类型
* @apiParam {Array} record.body 请求
* @apiParam {Array} record.body.location 请求类型1-11参考getLocationLabel,bodyparam请求参数默认3返回参数默认10
* @apiParam {String} record.body.location.id 参数id
* @apiParam {String} record.body.location.name 参数名称
* @apiParam {String} record.body.location.type 参数类型(location=1,7header的时候固定为string可不传) int,string...
* @apiParam {Number} record.body.location.enabled 是否必传
* @apiParam {String} record.body.location.description 参数描述
* @apiParam {String} record.body.location.default_value 参数示例值
* @apiParam {Array} record.body.location.children 参数子类数组同父级
* @apiParam {String} extend 扩展内容
*
* @apiSuccessExample {json} Success-Response:
* {status: true, code: 200, data: "success", message: "ok"}
*/
public function save(Request $request)
{
$layoutLabel = array_keys(ChapterContentLogic::instance()->getLayoutLabel());
$this->validate($request, [
'chapter_id' => 'required|integer|min:1',
'document_id' => 'required|integer',
'layout' => 'in:' . implode(',', $layoutLabel),
], [
'chapter_id.required' => '文档id必填',
'document_id.required' => '文档id必填',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
$chapter = ChapterLogic::instance()->getById(intval($request->post('chapter_id')));
if (empty($chapter)) {
throw new ErrorHttpException('章节不存在');
}
$layout = $request->post('layout', 0);
$content = $request->post('content', '');
if ($layout == 1) {
//如果是http类型
$record = $request->post('record', []);
$chapterRecord = new ChapterRecordLogic($chapter->id);
$content = $chapterRecord->recordToMarkdown($record);
}
$words = hasForbidWords($content);
if ($words){
throw new ErrorHttpException('您输入的内容存在敏感词“'.implode('、',$words).'”,请修改之后提交。');
}
if (!empty($chapter->content)) {
if ($chapter->content->layout != $layout) {
throw new ErrorHttpException('文档类型不可更改');
}
$chapter->content->content = $content;
$chapter->content->save();
} else {
if ($layout) {
//默认0
throw new ErrorHttpException('文档类型不可更改');
}
ChapterContent::query()->create([
'chapter_id' => $chapter->id,
'content' => $content,
'layout' => $layout
]);
}
$chapter->updated_at = time();
$chapter->save();
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $chapter->document_id,
'chapter_id' => $chapter->id,
'operate' => UserOperateLog::EDIT,
'remark' => $user->username . '编辑章节' . $chapter->name . '内容'
]);
return $this->data('success');
}
/**
* @api {post} /admin/chapter/content 文档内容-查看
* @apiName content
* @apiGroup Chapter
*
* @apiParam {Number} chapter_id 章节ID
* @apiParam {Number} document_id 文档ID
*
* @apiSuccess {Number} chapter_id 章节ID
* @apiSuccess {Number} document_id 文档ID
* @apiSuccess {Number} layout 文档类型 0:MARKDOWM文本,提交content 1:HTTP请求,提交record
* @apiSuccess {String} content 文档内容(layout为1时用record生成content,此字段提交无效)
* @apiSuccess {Array} record 请求记录
* @apiSuccess {Array} record.api 请求记录地址信息
* @apiSuccess {String} record.api.method 请求方式
* @apiSuccess {String} record.api.url 地址
* @apiSuccess {String} record.api.description 描述
* @apiSuccess {String} record.api.tab_location tab页上次指定记录head,query,body
* @apiSuccess {String} record.api.body_param_location body_param默认类型
* @apiSuccess {Array} record.body 请求
* @apiSuccess {Array} record.body.location 请求类型1-11参考getLocationLabel,bodyparam请求参数默认3返回参数默认10
* @apiSuccess {String} record.body.location.id 参数id
* @apiSuccess {String} record.body.location.name 参数名称
* @apiSuccess {String} record.body.location.type 参数类型(location=1,7header的时候固定为string可不传) int,string...
* @apiSuccess {Number} record.body.location.enabled 是否必传
* @apiSuccess {String} record.body.location.description 参数描述
* @apiSuccess {String} record.body.location.default_value 参数示例值
* @apiSuccess {Array} record.body.location.children 参数子类数组同父级
* @apiSuccess {String} extend 扩展内容
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":{"chapter_id":49,"name":"clj1","content":"- **接口说明:** 这是文档说明\n- **接口地址:** http:\/\/baidu.com\n- **请求方式:** ==GET==\n- **状态码:** ==200==\n\n### Request.Query.Path\n\n参数名称 |类型 |必填 |描述 |示例值 |生成规则 \n|:- |:-: |:-: |:- |:- |:- \npath参数 |String |False|这是地址栏参数 | | \n### Request.Header\n\n参数名称 |类型 |必填 |描述 |示例值 |生成规则 \n|:- |:-: |:-: |:- |:- |:- \nAccess-Token |String |False|这是头部说明1 | |12321 \n ec |String |False|这是四级参数ec | | \n ed |String |False|这是四级参数ed | | \nToken |Number |False|this is address | | \n### Request.Query.String\n\n参数名称 |类型 |必填 |描述 |示例值 |生成规则 \n|:- |:-: |:-: |:- |:- |:- \nid |String |False|这是参数详情1 | |12321 \nboday |Array |False|这是参数详情3 | | \n a |Number |False|这是二级参数a | | \n c |String |False|这是三级参数ac | | \n d |String |False|这是三级参数ad | | \n b |Array |False|这是二级参数b | | \n c |String |False|这是三级参数bc | | \n e |Array |False|这是三级参数bd | | \n ec|String |False|这是四级参数ec | | \n ed|String |False|这是四级参数ed | | \n### Request.Body.form-data\n\n参数名称 |类型 |必填 |描述 |示例值 |生成规则 \n|:- |:-: |:-: |:- |:- |:- \nAccess-Token |String |False|这是头部说明3 | |12321 \n### Reponse.Header\n\n参数名称 |类型 |必填 |描述 |示例值 |生成规则 \n|:- |:-: |:-: |:- |:- |:- \nAccess-Token |String |False|这是response头部说明7| |12321 \n### Reponse.Body.raw\n\n参数名称 |类型 |必填 |描述 |示例值 |生成规则 \n|:- |:-: |:-: |:- |:- |:- \n4444 |Null |False| | | \na |Number |False| |1 | \nb |Array |False| |[\"1\",\"1\"] | \n |Number |False| |1 | \n |Number |False| |1 | \nc |Object |False| | | \n a |Array |False| |[\"a\"] | \n b |Object |False| | | \n 0 |String |False| |b | \n d |Array |False| |[\"4\",\"5\"] | \n |Number |False| |4 | \n |Number |False| |5 | \ne |Array |False| | |2 \n a |Array |False| |[\"1\"] | \n b |Array |False| |[\"2\",null] |+1 \n c |Array |False| |[\"3\"] | \n f |Array |False| |[\"1\",\"2\"] | \n |Number |False| |1 | \n |Number |False| |2 | \n d |Object |False| | | \n a |Number |False| |1 | \n b |Number |False| |2 | \n\n### 示例说明\n\n>请求示例:\n\n```\n{\n \"Header\":{\n \"Token\":\"\",\n \"Version\":\"3.2.0\",\n \"SystemId\":100,\n \"Timestamp\":1502870664\n },\n \"Body\":{\n \"Mobile\":\"18520322032\",\n \"Password\":\"acb000000\"\n }\n}\n\n```","layout":1,"author":{"uid":1,"username":"admin"},"updated_at":"2020-04-08 16:42:00","record":{"api":{"id":1,"chapter_id":49,"url":"http:\/\/baidu.com","method":1,"status_code":0,"description":"这是文档说明","body_param_location":3},"body":{"1":[{"id":2,"chapter_id":49,"parent_id":0,"location":1,"type":1,"name":"Access-Token","description":"这是头部说明1","enabled":1,"default_value":"","children":[{"id":3,"chapter_id":49,"parent_id":2,"location":1,"type":1,"name":"ec","description":"这是四级参数ec","enabled":1,"default_value":"","children":[]},{"id":4,"chapter_id":49,"parent_id":2,"location":1,"type":1,"name":"ed","description":"这是四级参数ed","enabled":1,"default_value":"","rule":"","children":[]}]},{"id":5,"chapter_id":49,"parent_id":0,"location":1,"type":2,"name":"Token","description":"this is address","enabled":1,"default_value":"","rule":"","children":[]}],"2":[{"id":6,"chapter_id":49,"parent_id":0,"location":2,"type":1,"name":"id","description":"这是参数详情1","enabled":1,"default_value":"","rule":"12321","children":[]},{"id":7,"chapter_id":49,"parent_id":0,"location":2,"type":5,"name":"boday","description":"这是参数详情3","enabled":1,"default_value":"","rule":"","children":[{"id":8,"chapter_id":49,"parent_id":7,"location":2,"type":2,"name":"a","description":"这是二级参数a","enabled":1,"default_value":"","rule":"","children":[{"id":9,"chapter_id":49,"parent_id":8,"location":2,"type":1,"name":"c","description":"这是三级参数ac","enabled":1,"default_value":"","rule":"","children":[]},{"id":10,"chapter_id":49,"parent_id":8,"location":2,"type":1,"name":"d","description":"这是三级参数ad","enabled":1,"default_value":"","rule":"","children":[]}]},{"id":11,"chapter_id":49,"parent_id":7,"location":2,"type":5,"name":"b","description":"这是二级参数b","enabled":1,"default_value":"","rule":"","children":[{"id":12,"chapter_id":49,"parent_id":11,"location":2,"type":1,"name":"c","description":"这是三级参数bc","enabled":1,"default_value":"","rule":"","children":[]},{"id":13,"chapter_id":49,"parent_id":11,"location":2,"type":5,"name":"e","description":"这是三级参数bd","enabled":1,"default_value":"","rule":"","children":[{"id":14,"chapter_id":49,"parent_id":13,"location":2,"type":1,"name":"ec","description":"这是四级参数ec","enabled":1,"default_value":"","rule":"","children":[]},{"id":15,"chapter_id":49,"parent_id":13,"location":2,"type":1,"name":"ed","description":"这是四级参数ed","enabled":1,"default_value":"","rule":"","children":[]}]}]}]}],"3":[{"id":16,"chapter_id":49,"parent_id":0,"location":3,"type":1,"name":"Access-Token","description":"这是头部说明3","enabled":1,"default_value":"","rule":"12321","children":[]}],"7":[{"id":17,"chapter_id":49,"parent_id":0,"location":7,"type":1,"name":"Access-Token","description":"这是response头部说明7","enabled":1,"default_value":"","rule":"12321","children":[]}],"10":[{"id":18,"chapter_id":49,"parent_id":0,"location":10,"type":8,"name":"4444","description":"","enabled":1,"default_value":"","rule":"","children":[]},{"id":19,"chapter_id":49,"parent_id":0,"location":10,"type":2,"name":"a","description":"","enabled":1,"default_value":"1","rule":"","children":[]},{"id":20,"chapter_id":49,"parent_id":0,"location":10,"type":5,"name":"b","description":"","enabled":1,"default_value":"[\"1\",\"1\"]","rule":"","children":[{"id":21,"chapter_id":49,"parent_id":20,"location":10,"type":2,"name":"","description":"","enabled":1,"default_value":"1","rule":"","children":[]},{"id":22,"chapter_id":49,"parent_id":20,"location":10,"type":2,"name":"","description":"","enabled":1,"default_value":"1","rule":"","children":[]}]},{"id":23,"chapter_id":49,"parent_id":0,"location":10,"type":4,"name":"c","description":"","enabled":1,"default_value":"","rule":"","children":[{"id":24,"chapter_id":49,"parent_id":23,"location":10,"type":5,"name":"a","description":"","enabled":1,"default_value":"[\"a\"]","rule":"","children":[]},{"id":25,"chapter_id":49,"parent_id":23,"location":10,"type":4,"name":"b","description":"","enabled":1,"default_value":"","rule":"","children":[{"id":26,"chapter_id":49,"parent_id":25,"location":10,"type":1,"name":"0","description":"","enabled":1,"default_value":"b","rule":"","children":[]},{"id":27,"chapter_id":49,"parent_id":25,"location":10,"type":5,"name":"d","description":"","enabled":1,"default_value":"[\"4\",\"5\"]","rule":"","children":[{"id":28,"chapter_id":49,"parent_id":27,"location":10,"type":2,"name":"","description":"","enabled":1,"default_value":"4","rule":"","children":[]},{"id":29,"chapter_id":49,"parent_id":27,"location":10,"type":2,"name":"","description":"","enabled":1,"default_value":"5","rule":"","children":[]}]}]}]},{"id":30,"chapter_id":49,"parent_id":0,"location":10,"type":5,"name":"e","description":"","enabled":1,"default_value":"","rule":"2","children":[{"id":31,"chapter_id":49,"parent_id":30,"location":10,"type":5,"name":"a","description":"","enabled":1,"default_value":"[\"1\"]","rule":"","children":[]},{"id":32,"chapter_id":49,"parent_id":30,"location":10,"type":5,"name":"b","description":"","enabled":1,"default_value":"[\"2\",null]","rule":"+1","children":[]},{"id":33,"chapter_id":49,"parent_id":30,"location":10,"type":5,"name":"c","description":"","enabled":1,"default_value":"[\"3\"]","rule":"","children":[]},{"id":34,"chapter_id":49,"parent_id":30,"location":10,"type":5,"name":"f","description":"","enabled":1,"default_value":"[\"1\",\"2\"]","rule":"","children":[{"id":35,"chapter_id":49,"parent_id":34,"location":10,"type":2,"name":"","description":"","enabled":1,"default_value":"1","rule":"","children":[]},{"id":36,"chapter_id":49,"parent_id":34,"location":10,"type":2,"name":"","description":"","enabled":1,"default_value":"2","rule":"","children":[]}]},{"id":37,"chapter_id":49,"parent_id":30,"location":10,"type":4,"name":"d","description":"","enabled":1,"default_value":"","rule":"","children":[{"id":38,"chapter_id":49,"parent_id":37,"location":10,"type":2,"name":"a","description":"","enabled":1,"default_value":"1","rule":"","children":[]},{"id":39,"chapter_id":49,"parent_id":37,"location":10,"type":2,"name":"b","description":"","enabled":1,"default_value":"2","rule":"","children":[]}]}]}],"12":[{"id":1,"chapter_id":49,"parent_id":0,"location":12,"type":1,"name":"path参数","description":"这是地址栏参数","enabled":1,"default_value":"","rule":"","children":[]}]},"extend":"### 示例说明\n\n>请求示例:\n\n```\n{\n \"Header\":{\n \"Token\":\"\",\n \"Version\":\"3.2.0\",\n \"SystemId\":100,\n \"Timestamp\":1502870664\n },\n \"Body\":{\n \"Mobile\":\"18520322032\",\n \"Password\":\"acb000000\"\n }\n}\n\n```"}},"message":"ok"}
*/
public function content(Request $request)
{
$this->validate($request, [
'chapter_id' => 'required|integer|min:1',
'document_id' => 'required|integer',
], [
'chapter_id.required' => '文档id必填',
'chapter_id.min' => '文档id最小为0',
'document_id.required' => '文档id必填',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
$chapter = ChapterLogic::instance()->getById(intval($request->post('chapter_id')));
if (empty($chapter)) {
throw new ErrorHttpException('章节不存在');
}
$creator = UserOperateLogic::instance()->getByChapterAndOperate($chapter->id, UserOperateLog::CREATE);
if ($creator) {
$author = $creator->user;
} else {
$author = $chapter->document->user;
}
$content = '';
if (!$chapter->content->layout) {
$content = $chapter->content->content;
}
$result = [
'chapter_id' => $chapter->id,
'name' => $chapter->name,
'content' => $content,
'layout' => $chapter->content->layout,
'author' => [
'uid' => $author->id,
'username' => $author->username,
],
'updated_at' => $chapter->updated_at->toDateTimeString()
];
if ($chapter->content->layout == 1) {
$obj = new ChapterRecordLogic($chapter->id);
$result['content'] = 'record';
$result['record'] = $obj->showRecord();
}
return $this->data($result);
}
/**
* 设置章节目录默认显示文章内容
* @param Request $request
* @return array
*/
public function defaultShow(Request $request)
{
$this->validate($request, [
'chapter_id' => 'required',
'show_chapter_id' => 'required',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
$chapterId = intval($request->post('chapter_id'));
$chapter = ChapterLogic::instance()->getById($chapterId);
$showChapterId = intval($request->post('show_chapter_id'));
$showChapter = ChapterLogic::instance()->getById($showChapterId);
if (($chapterId && empty($chapter)) || empty($showChapter)) {
throw new ErrorHttpException('您要操作的章节或是目录不存在');
}
if ($chapter && empty($chapter->is_dir)) {
throw new ErrorHttpException('此操作只能设置目录的默认显示');
}
if (!empty($showChapter->is_dir)) {
throw new ErrorHttpException('设置显示的章节不能为目录');
}
if ($chapterId == 0) {
//找到已存在的顶级默认文章
$defaultShowChapter = Chapter::query()->where('document_id', '=', $showChapter->document_id)->where('parent_id', '=', 0)->where('default_show_chapter_id', '!=', 0)->first();
if ($defaultShowChapter) {
$defaultShowChapter->default_show_chapter_id = 0;
$defaultShowChapter->save();
}
$chapter = $showChapter;
}
$chapter->default_show_chapter_id = $showChapterId;
$chapter->save();
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $chapter->document_id,
'chapter_id' => $showChapterId,
'operate' => UserOperateLog::EDIT,
'remark' => $user->username . '设置章节' . $chapter->name . '默认显示'
]);
return $this->data('success');
}
public function search(Request $request)
{
$this->validate($request, [
'keywords' => 'required',
'document_id' => 'required|integer|min:1',
], [
'document_id.required' => '文档id必填',
'document_id.min' => '文档id最小为0',
'keywords.required' => '关键字必填',
]);
$id = $request->input('document_id');
$keywords = $request->input('keywords');
try {
$result = ChapterLogic::instance()->searchChapter($id, $keywords);
return $this->data($result);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
public function copy(Request $request)
{
$params = $this->validate($request, [
'parent_id' => 'required',
'name' => 'required',
'document_id' => 'required|integer|min:1',
'chapter_id' => 'required|integer|min:1',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
$parentChapter = null;
if ($params['parent_id']) {
$parentChapter = ChapterLogic::instance()->getById($params['parent_id']);
if (!$parentChapter) {
throw new ErrorHttpException('目标章节不存在');
}
}
$chapter = ChapterLogic::instance()->getById($params['chapter_id']);
if (!$chapter) {
throw new ErrorHttpException('章节不存在');
}
$maxSort = Chapter::query()->where('document_id', '=', $params['document_id'])->where('parent_id', '=', $params['parent_id'])->max('sort');
$sort = intval($request->post('sort', ++$maxSort));
idb()->beginTransaction();
try {
$newChapter = new Chapter();
$newChapter->parent_id = $params['parent_id'];
$newChapter->name = $params['name'];
$newChapter->document_id = $params['document_id'];
$newChapter->sort = $sort;
$newChapter->is_dir = $chapter->is_dir;
$newChapter->save();
$chapterContent = ChapterContent::query()->where('chapter_id', '=', $params['chapter_id'])->first();
if ($chapterContent) {
$newChapterContent = new ChapterContent();
$newChapterContent->chapter_id = $newChapter->id;
$newChapterContent->content = $chapterContent->content;
$newChapterContent->layout = $chapterContent->layout;
$newChapterContent->save();
if ($chapterContent->layout == 1) {
//如果是HTTP类型
$obj = new ChapterRecordLogic($chapter->id);
$obj->copyRecord($newChapter->id);
}
}
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $chapter->document_id,
'chapter_id' => $chapter->id,
'operate' => UserOperateLog::CHAPTER_COPY,
'remark' => $user->username . '复制章节' . $chapter->name . '到' . !empty($parentChapter) ? $parentChapter->name : '根节点'
]);
idb()->commit();
return $this->data($newChapter->toArray());
} catch (\Throwable $e) {
idb()->rollBack();
throw new ErrorHttpException($e->getMessage(), $e->getCode());
}
}
/**
* @api {post} /admin/chapter/import 参数导入
* @apiName import
* @apiGroup Chapter
*
* @apiParam {Number} data 导入参数
* @apiParam {Number} reponse_id 响应ID
* @apiParam {Number} type 参数类型:json、key_word、array
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":[{"type":3,"name":"status","description":"","enabled":2,"default_value":true,"rule":"","children":[]},{"type":2,"name":"code","description":"","enabled":2,"default_value":200,"rule":"","children":[]},{"type":1,"name":"msg","description":"","enabled":2,"default_value":"success","rule":"","children":[]},{"type":5,"name":"array","description":"","enabled":2,"default_value":"[1,2,3]","rule":"","children":[]},{"type":5,"name":"marray","description":"","enabled":2,"default_value":"","rule":"+2","children":[{"type":5,"name":0,"description":"","enabled":2,"default_value":"[1,2]","rule":"","children":[]},{"type":5,"name":1,"description":"","enabled":2,"default_value":"[3,4]","rule":"","children":[]}]},{"type":4,"name":"object","description":"","enabled":2,"default_value":"","rule":"","children":[{"type":2,"name":"id","description":"","enabled":2,"default_value":1,"rule":"","children":[]},{"type":1,"name":"name","description":"","enabled":2,"default_value":"name","rule":"","children":[]}]}],"message":"ok"}
*/
public function import(Request $request)
{
$data = $this->validate($request, [
'data' => 'required',
'location' => 'required|integer',
'type' => 'required'
]);
$Capter = new ChapterImportLogic();
$res = $Capter->getApiparam($data['data'], $data['location'], $data['type']);
return $this->data($res);
}
}
================================================
FILE: app/Controller/Admin/Document/ChapterApiController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin\Document;
use W7\App\Controller\BaseController;
use W7\App\Model\Logic\Document\ChapterApiLogic;
use W7\Http\Message\Server\Request;
class ChapterApiController extends BaseController
{
/**
* @api {get} /document/chapterapi/getApiLabel 获取参数类型列表
*
* @apiName getApiLabel
* @apiGroup ChapterApi
*
* @apiParam {Array} data
* @apiParam {Array} data.statusCode 状态码列表
* @apiParam {Array} data.methodLabel 请求方式列表
* @apiParam {Array} data.enabledLabel 必填类型列表
* @apiParam {Array} data.typeLabel 字段类型
* @apiParam {Array} data.locationLabel 参数类型
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":{"statusCode":[200,301,403,404,500,502,503,504],"methodLabel":{"label":"请求方式","option":[{"label":"GET","value":1},{"label":"POST","value":2},{"label":"PUT","value":3},{"label":"PATCH","value":4},{"label":"DELETE","value":5},{"label":"COPY","value":6},{"label":"HEAD","value":7},{"label":"PTIONS","value":8},{"label":"LINK","value":9},{"label":"UNLINK","value":10},{"label":"PURGE","value":11},{"label":"LOCK","value":12},{"label":"UNLOCK","value":13},{"label":"PROPFIND","value":14},{"label":"VIEW","value":15}]},"enabledLabel":{"label":"必填类型","option":[{"label":"False","value":1},{"label":"Ture","value":2}]},"typeLabel":{"label":"字段类型","option":[{"label":"String","value":1},{"label":"Number","value":2},{"label":"Boolean","value":3},{"label":"Object","value":4},{"label":"Array","value":5},{"label":"Function","value":6},{"label":"RegExp","value":7},{"label":"Null","value":8}]},"locationLabel":{"label":"参数类型","option":[{"label":"Request.Query.Path","value":12},{"label":"Request.Header","value":1},{"label":"Request.Query.String","value":2},{"label":"Request.Body.form-data","value":3},{"label":"Request.Body.urlencoded","value":4},{"label":"Request.Body.raw","value":5},{"label":"Request.Body.binary","value":6},{"label":"Reponse.Header","value":7},{"label":"Reponse.Body.form-data","value":8},{"label":"Reponse.Body.urlencoded","value":9},{"label":"Reponse.Body.raw","value":10},{"label":"Reponse.Body.binary","value":11}]}},"message":"ok"}
*/
public function getApiLabel(Request $request)
{
return $this->data(ChapterApiLogic::instance()->getApiLabel());
}
}
================================================
FILE: app/Controller/Admin/Document/ChapterApiDataController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin\Document;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Document\ChapterApiData;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Logic\Document\ChapterApiDataLogic;
use W7\Http\Message\Server\Request;
class ChapterApiDataController extends BaseController
{
/**
* @api {post} /admin/document/chapterapi/setApiData API请求数据保存
* @apiName setApiData
* @apiGroup Chapterapi
*
* @apiParam {Number} chapter_id 章节ID
* @apiParam {Number} document_id 文档ID
* @apiParam {Number} respond_id 数据ID 非必填 编辑的时候传参
* @apiParam {String} respond 数据文本
*
* @apiSuccessExample {json} Success-Response:
* {status: true, code: 200, data: "success", message: "ok"}
*/
public function setData(Request $request){
//验证
$params = $this->validate($request,[
'chapter_id' => 'required|integer',
'document_id' => 'required|integer',
],[
'chapter_id.required' => '章节id必填',
'document_id.required' => '文档id必填',
]);
$user = $request->getAttribute('user');
if (!$user->isOperator) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
//先删除原先的数据
$chapter = ChapterApiDataLogic::instance()->deleteChapterApiData($params['chapter_id']);
if (!$chapter) {
throw new ErrorHttpException('数据更新错误');
}
ChapterApiData::query()->create([
'chapter_id'=>$params['chapter_id'],
'respond'=> trim($request->post('respond'))
]);
return $this->data('success');
}
/**
* @api {get} /admin/document/chapterapi/getData API请求数据保存
* @apiName getData
* @apiGroup Chapterapi
*
* @apiParam {Number} chapter_id 章节ID
*/
public function getData(Request $request){
//验证
$params = $this->validate($request,[
'chapter_id' => 'required|integer|min:1',
],[
'chapter_id.required' => '文档id必填',
'chapter_id.min' => '文档id最小为0',
]);
$chapter = ChapterApiDataLogic::instance()->getByChapterApiData($params['chapter_id']);
if (!$chapter){
throw new ErrorHttpException('获取数据失败');
}
return $this->data($chapter);
}
}
================================================
FILE: app/Controller/Admin/DocumentController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Document;
use W7\App\Model\Entity\Document\Chapter;
use W7\App\Model\Entity\DocumentPermission;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Entity\Star;
use W7\App\Model\Entity\User;
use W7\App\Model\Entity\UserOperateLog;
use W7\App\Model\Logic\DocumentFeedbackLogic;
use W7\App\Model\Logic\DocumentLogic;
use W7\App\Model\Logic\DocumentPermissionLogic;
use W7\App\Model\Logic\UserLogic;
use W7\Http\Message\Server\Request;
class DocumentController extends BaseController
{
public function all(Request $request)
{
$keyword = trim($request->input('keyword'));
$page = intval($request->post('page'));
$pageSize = intval($request->post('page_size'));
$isPublic = $request->post('is_public');
$role = $request->post('role');
//获取只能阅读的文档列表
$onlyRead = $request->post('only_reader');
$user = $request->getAttribute('user');
//管路员不搜索制度类型和创建类型查看全部
if ($user->isFounder && !$onlyRead && !$role) {
$query = Document::query()->with('user')->orderByDesc('id');
if (!empty($keyword)) {
$query->where('name', 'LIKE', "%{$keyword}%");
}
if (!empty($isPublic)) {
$query->where('is_public', '=', $isPublic);
}
/**
* @var LengthAwarePaginator $result
*/
$list = $query->paginate($pageSize, '*', 'page', $page);
$document = $list->items();
if (!empty($document)) {
foreach ($document as $i => $row) {
$star = Star::query()->where('user_id', '=', $user->id)->where('document_id', '=', $row->id)->where('chapter_id', '=', 0)->first();
$lastOperate = UserOperateLog::query()->where('document_id', '=', $row->id)->whereIn('operate', [UserOperateLog::CREATE, UserOperateLog::EDIT])->latest()->first();
$result['data'][] = [
'id' => $row->id,
'name' => $row->name,
'cover' => $row->cover,
'author' => [
'name' => $row->user->username
],
'operator' => [
'name' => !empty($lastOperate) ? $lastOperate->operateDesc : '',
'time' => !empty($lastOperate) ? $lastOperate->created_at->toDateTimeString() : ''
],
'star_id' => !empty($star) ? $star->id : '',
'description' => $row->descriptionShort,
'is_public' => $row->isPublicDoc,
'acl' => DocumentPermissionLogic::instance()->getFounderACL(),
];
}
}
} else {
$permissions = [DocumentPermission::MANAGER_PERMISSION, DocumentPermission::OPERATOR_PERMISSION];
//$role代表为创建者
if ($role == 1) {
$permissions = [DocumentPermission::MANAGER_PERMISSION];
}
//$role为2我操作的
if ($role == 2) {
$permissions = [DocumentPermission::OPERATOR_PERMISSION];
}
if ($onlyRead) {
$permissions = [DocumentPermission::READER_PERMISSION];
}
//$role为3代表为我参与的(已创建、我操作、可阅读)
if ($role == 'all') {
$permissions = [DocumentPermission::MANAGER_PERMISSION, DocumentPermission::OPERATOR_PERMISSION, DocumentPermission::READER_PERMISSION];
}
$query = DocumentPermission::query()->where('user_id', '=', $user->id)
->whereIn('permission', $permissions)
->orderByDesc('id')->with('document')->whereHas('document');
if (!empty($keyword)) {
$query->whereHas('document', function ($query) use ($keyword) {
return $query->where('name', 'LIKE', "%{$keyword}%");
});
}
if (!empty($isPublic)) {
$query->whereHas('document', function ($query) use ($isPublic) {
return $query->where('is_public', '=', $isPublic);
});
}
$list = $query->paginate($pageSize, '*', 'page', $page);
$document = $list->items();
if (!empty($document)) {
foreach ($document as $i => $row) {
$star = Star::query()->where('user_id', '=', $user->id)->where('document_id', '=', $row->document_id)->where('chapter_id', '=', 0)->first();
$lastOperate = UserOperateLog::query()->where('document_id', '=', $row->id)->whereIn('operate', [UserOperateLog::CREATE, UserOperateLog::EDIT])->latest()->first();
$acl = $row->acl;
//如果是管理员,显示全部按钮
if ($user->group_id == 1) {
$acl['has_manage'] = true;
}
$result['data'][] = [
'id' => $row->document->id,
'name' => $row->document->name,
'cover' => $row->document->cover,
'author' => [
'name' => $row->document->user->username
],
'operator' => [
'name' => !empty($lastOperate) ? $lastOperate->operateDesc : '',
'time' => !empty($lastOperate) ? $lastOperate->created_at->toDateTimeString() : ''
],
'star_id' => !empty($star) ? $star->id : '',
'description' => $row->document->descriptionShort,
'is_public' => $row->document->isPublicDoc,
'acl' => $acl,
];
}
}
}
$result['page_count'] = $list->lastPage();
$result['total'] = $list->total();
$result['page_current'] = $list->currentPage();
return $this->data($result);
}
public function getAllByUid(Request $request)
{
/**
* @var User $user
*/
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('无操作用户权限');
}
$params = $this->validate($request, [
'user_id' => 'required|integer',
], [
'user_id.required' => '请指定用户',
]);
$name = trim($request->post('name'));
$isPublic = trim($request->post('is_public'));
if ($isPublic && !in_array($isPublic, [Document::PUBLIC_DOCUMENT, Document::PRIVATE_DOCUMENT])) {
throw new ErrorHttpException('参数错误');
}
$page = intval($request->post('page', 1));
$query = Document::query();
if ($isPublic) {
$query = $query->where('is_public', '=', $isPublic);
}
if ($name) {
$query = $query->where('name', 'like', '%' . $name . '%');
}
//获取私有文档和公有文档的用户身份列表
$roleList = DocumentPermissionLogic::instance()->getRoleList();
$publicRoleList[] = [
'id' => DocumentPermission::OPERATOR_PERMISSION,
'name' => $roleList[DocumentPermission::OPERATOR_PERMISSION]
];
$privateRoleList = $publicRoleList;
$privateRoleList[] = [
'id' => DocumentPermission::READER_PERMISSION,
'name' => $roleList[DocumentPermission::READER_PERMISSION]
];
$list = $query->paginate(null, '*', 'page', $page);
foreach ($list->items() as $row) {
/**
* @var DocumentPermission $documentPermission
*/
$documentPermission = DocumentPermissionLogic::instance()->getByDocIdAndUid($row->id, $params['user_id']);
$manager = DocumentPermissionLogic::instance()->getByDocIdAndPermission($row->id, DocumentPermission::MANAGER_PERMISSION);
$roleList = $row->isPublicDoc ? $publicRoleList : $privateRoleList;
if (!$manager) {
$roleList[] = [
'id' => DocumentPermission::MANAGER_PERMISSION,
'name' => $roleList[DocumentPermission::MANAGER_PERMISSION]
];
} elseif ($manager->user_id == $params['user_id']) {
continue;
}
$result['data'][] = [
'id' => $row->id,
'name' => $row->name,
'description' => $row->descriptionShort,
'is_public' => $row->isPublicDoc,
'cur_role' => $documentPermission ? $documentPermission->permission : 0,
'role_list' => $roleList
];
}
$result['page_count'] = $list->lastPage();
$result['total'] = $list->total();
$result['page_current'] = $list->currentPage();
return $this->data($result);
}
public function detail(Request $request)
{
$document = $this->checkPermissionAndGetDocument($request);
/**
* @var User $user
*/
$user = $request->getAttribute('user');
$result = [
'id' => $document->id,
'name' => $document->name,
'cover' => $document->cover,
'description' => $document->description,
'is_public' => $document->is_public,
'acl' => [
'has_manage' => $user->isManager,
'has_edit' => $user->isOperator,
'has_delete' => $user->isManager,
'has_read' => $user->isReader
]
];
$hasManager = false;
$operator = $document->operator()->with('user')->orderBy('permission')->get();
if (!empty($operator)) {
$operator->each(function ($row, $i) use (&$result, &$hasManager) {
$result['operator'][] = [
'id' => $row->user->id,
'username' => $row->user->username,
'acl' => $row->acl,
];
if ($row->acl['has_manage']) {
$hasManager = true;
}
});
}
$roleList = DocumentPermissionLogic::instance()->getRoleList();
if ($document->isPublicDoc) {
unset($roleList[DocumentPermission::READER_PERMISSION]);
}
if ($hasManager) {
unset($roleList[DocumentPermission::MANAGER_PERMISSION]);
}
foreach ($roleList as $id => $name) {
$result['role_list'][] = [
'id' => $id,
'name' => $name
];
}
return $this->data($result);
}
/**
* @api {post} /admin/document/new-feedback 检测是否有最新反馈
* @apiName new-feedback
* @apiGroup document.Feedback
*
*
* @apiParam {Number} document_id 文档ID
*/
public function checkNewFeed(Request $request){
$params = $this->validate($request, [
'document_id' => 'required|integer',
], [
'document_id.required' => '请指定文档',
]);
//查看是否有新的 反馈建议
$result['new_feed'] = false;
$isNewFeed = DocumentFeedbackLogic::instance()->getByFeedbackNew($params['document_id']);
if ($isNewFeed){
$result['new_feed'] = true;
}
return $this->data($result);
}
public function operator(Request $request)
{
$this->validate($request, [
'document_id' => 'required|integer',
], [
'document_id.required' => '请指定文档',
]);
$uid = intval($request->post('user_id'));
$userName = $request->post('user_name');
if (!$uid && !$userName) {
throw new ErrorHttpException('参数错误');
}
$user = $request->getAttribute('user');
if (!$user->isManager && !$user->isFounder) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
if (!$uid && $userName) {
$findUser = UserLogic::instance()->getByUserName($userName);
if (!$findUser) {
throw new ErrorHttpException('用户不存在');
}
$uid = $findUser->id;
}
$operator = UserLogic::instance()->getByUid($uid);
if (empty($operator)) {
throw new ErrorHttpException('您操作的用户不存在');
}
$permission = intval($request->post('permission'));
$documentId = intval($request->post('document_id'));
/**
* permission 值不存在时,意味着删除权限
* 只要权限合适,减少判断直接删除
*/
if (empty($permission)) {
$hasPermission = DocumentPermissionLogic::instance()->getByDocIdAndUid($documentId, $uid);
if (!empty($hasPermission)) {
$hasPermission->delete();
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $documentId,
'chapter_id' => 0,
'operate' => UserOperateLog::EDIT,
'target_user_id' => $uid,
'remark' => $user->username . '删除用户' . $operator->username . '的' . $hasPermission->aclName . '权限'
]);
}
return $this->data('success');
}
if (!in_array($permission, [
DocumentPermission::MANAGER_PERMISSION,
DocumentPermission::OPERATOR_PERMISSION,
DocumentPermission::READER_PERMISSION
])) {
throw new ErrorHttpException('您操作了不存在的权限');
}
if ($permission == DocumentPermission::MANAGER_PERMISSION && !$user->isFounder) {
throw new ErrorHttpException('您没有权限添加管理员');
}
$document = DocumentLogic::instance()->getById($documentId);
if (empty($document)) {
throw new ErrorHttpException('管理的文档的不存在或是已经被删除');
}
$hasPermission = DocumentPermissionLogic::instance()->getByDocIdAndUid($documentId, $uid);
if (empty($hasPermission)) {
$hasPermission = new DocumentPermission();
$hasPermission->user_id = $uid;
$hasPermission->document_id = $documentId;
}
$hasPermission->permission = $permission;
$hasPermission->save();
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $documentId,
'chapter_id' => 0,
'operate' => UserOperateLog::EDIT,
'target_user_id' => $uid,
'remark' => $user->username . '设置用户' . $operator->username . '为' . $hasPermission->aclName
]);
return $this->data('success');
}
public function create(Request $request)
{
$this->validate($request, [
'name' => 'required',
], [
'name.required' => '文档名称不能为空',
]);
$user = $request->getAttribute('user');
$document = Document::query()->create([
'name' => trim($request->input('name')),
'description' => trim($request->input('description')),
'creator_id' => $user->id,
'is_public' => intval($request->post('is_public')) ?? 1,
]);
DocumentLogic::instance()->createCreatorPermission($document);
// //创建默认目录
// Chapter::query()->create([
// 'name' => '默认目录',
// 'sort' => 1,
// 'is_dir' => 1,
// 'document_id' => $document->id,
// 'parent_id' => 0
// ]);
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $document->id,
'chapter_id' => 0,
'operate' => UserOperateLog::CREATE,
'remark' => $user->username . '创建文档'
]);
return $this->data($document->id);
}
public function update(Request $request)
{
$document = $this->checkPermissionAndGetDocument($request);
if (!empty($request->input('name'))) {
$document->name = $request->input('name');
}
if (!empty($request->input('description'))) {
$document->description = $request->input('description');
}
if (!empty($request->input('is_public'))) {
$document->is_public = intval($request->input('is_public'));
}
// if (!empty($request->input('login_preview'))) {
// $document->is_public = $request->input('login_preview') == 2 ? Document::LOGIN_PREVIEW_DOCUMENT : Document::PRIVATE_DOCUMENT;
// }
$cover = $request->input('cover');
if (isset($cover)) {
$document->cover = $cover;
}
$document->save();
if ($document->is_public == Document::PUBLIC_DOCUMENT) {
DocumentPermission::query()->where('document_id', '=', $document->id)->where('permission', '=', DocumentPermission::READER_PERMISSION)->delete();
}
$user = $request->getAttribute('user');
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $document->id,
'chapter_id' => 0,
'operate' => UserOperateLog::EDIT,
'remark' => $user->username . '编辑文档基本信息'
]);
return $this->data('success');
}
public function delete(Request $request)
{
$data = $this->validate($request, [
'name' => 'required',
], [
'name.required' => '文档名称',
]);
$document = $this->checkPermissionAndGetDocument($request);
if ($document->name != $data['name']) {
throw new ErrorHttpException('文档名称错误');
}
try {
$user = $request->getAttribute('user');
DocumentLogic::instance()->deleteByDocument($document);
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $document->id,
'chapter_id' => 0,
'operate' => UserOperateLog::DELETE,
'remark' => $user->username . '删除文档'
]);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
return $this->data('success');
}
private function checkPermissionAndGetDocument(Request $request)
{
$this->validate($request, [
'document_id' => 'required|integer',
], [
'document_id.required' => '请指定文档',
]);
$documentId = intval($request->input('document_id'));
$user = $request->getAttribute('user');
if (!$user->isManager && !$user->isFounder) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
$document = DocumentLogic::instance()->getById($documentId);
if (empty($document)) {
throw new ErrorHttpException('您操作的文档不存在');
}
return $document;
}
public function changeDocumentFounder(Request $request)
{
$params = $this->validate($request, [
'document_id' => 'required|integer',
'username' => 'required',
]);
$user = $request->getAttribute('user');
if (!$user->isManager) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
if (!$targetUser = UserLogic::instance()->getByUserName($params['username'])) {
throw new ErrorHttpException('该用户不存在');
}
Document::query()->where('id', $params['document_id'])->update(['creator_id' => $targetUser->id]);
//设置原管理员的权限为操作员
$managerPermission = DocumentPermissionLogic::instance()->getByDocIdAndPermission($params['document_id'], DocumentPermission::MANAGER_PERMISSION);
if ($managerPermission) {
$managerPermission->permission = DocumentPermission::OPERATOR_PERMISSION;
$managerPermission->save();
}
//删除该用户在源文档上的权限
$originPermission = DocumentPermissionLogic::instance()->getByDocIdAndUid($params['document_id'], $targetUser->id);
if ($originPermission) {
$originPermission->delete();
}
//设置目标用户为管理员
DocumentPermissionLogic::instance()->add($params['document_id'], $targetUser->id, DocumentPermission::MANAGER_PERMISSION);
UserOperateLog::query()->create([
'user_id' => !empty($managerPermission->user_id) ? $managerPermission->user_id : 0,
'document_id' => $params['document_id'],
'chapter_id' => 0,
'target_user_id' => $targetUser->id,
'operate' => UserOperateLog::DOCUMENT_TRANSFER,
'remark' => $user->username . '转让文档到' . $targetUser->username
]);
return $this->data('success');
}
}
================================================
FILE: app/Controller/Admin/DocumentHomeController.php
================================================
<?php
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\DocumentHomeLogic;
use W7\Http\Message\Server\Request;
//首页文档设置
class DocumentHomeController extends BaseController
{
protected $_user;
private function check(Request $request)
{
$this->_user= $request->getAttribute('user');
if (!$this->_user->isFounder) {
throw new ErrorHttpException('无权访问');
}
return true;
}
/**
* @api {get} /admin/home/list 首页文档设置列表
*
* @apiName list
* @apiGroup DocumentHome
*
* @apiParam {Number} type 类型 (0:全部 1:公告 2:首页类型一 3:首页类型二)
*
*/
public function getList(Request $request){
$this->check($request);
$params = $this->validate($request, [
'type' => 'required|integer',
], [
'type.required' => '请选择类型',
]);
$page = intval($request->input('page',1));
$pageSize = intval($request->input('page_size',10));
$data = DocumentHomeLogic::instance()->getListData($params['type'],$page,$pageSize);
return $this->data($data);
}
/**
* @api {post} /admin/home/add 首页文档设置-添加
*
* @apiName add
* @apiGroup DocumentHome
*
* @apiParam {Number} type 类型 ( 1:公告 2:首页类型一 3:首页类型二)
* @apiParam {Number} document_id 文档id
* @apiParam {String} logo 文档图标(类型 2 必填,其他非必填)
* @apiParam {String} desc 文档简介(非必填)
* @apiParam {Number} sort 排序值(非必填)
*
*/
public function addHomeData(Request $request){
$this->check($request);
$params = $this->validate($request, [
'type' => 'required|integer|min:1',
'document_id' => 'required|integer',
], [
'type.required' => '请选择类型',
'type.min' => '类型最小为 1',
'document_id.required' => '请选择文档',
]);
//不同类型参数判断
if (intval($params['type']) == 2){ //首页类型一
$logo = $request->post('logo');
if (!$logo){
throw new ErrorHttpException('请上传图标');
}
$params['logo'] = $logo;
$params['description'] = htmlspecialchars(trim($request->post('desc')),ENT_QUOTES);
}
$params['user_id'] = $this->_user->id;
//排序
$params['sort'] = intval($request->post('sort',0));
DocumentHomeLogic::instance()->addHomeData($params);
return $this->data('success');
}
/**
* @api {all} /admin/home/edit 首页文档设置-编辑
*
* @apiName edit
* @apiGroup DocumentHome
*
* @apiParam {Number} id 主键 ID ( GET请求只传 id GET 获取数据 POST 提交数据)
* @apiParam {Number} type 类型 ( 1:公告 2:首页类型一 3:首页类型二)
* @apiParam {Number} document_id 文档id
* @apiParam {String} logo 文档图标(类型 2 必填,其他非必填)
* @apiParam {String} desc 文档简介(非必填)
* @apiParam {Number} sort 排序值(非必填)
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":{"id":24,"user_id":1,"user":"admin","type":2,"type_name":"首页类型一","document_id":2,"document_name":"开源文档","url":"","description":"fgfdhfgh","sort":11,"created_at":"2021-03-16 17:04:52"},"message":"ok"}
*/
public function editHomeData(Request $request){
$this->check($request);
//get 请求
if ($request->getMethod() == 'GET'){
$params = $this->validate($request, [
'id' => 'required|integer|min:1',
], [
'id.required' => 'id 不能为空',
'id.min' => 'id 最小为 1',
]);
$data = DocumentHomeLogic::instance()->getByHomeData($params['id']);
return $this->data($data);
//POST 请求
}elseif ($request->getMethod() == 'POST'){
$params = $this->validate($request, [
'id' => 'required|integer|min:1',
'type' => 'required|integer|min:1',
'document_id' => 'required|integer',
], [
'id.required' => 'id 不能为空',
'id.min' => 'id 最小为 1',
'type.required' => '请选择类型',
'type.min' => '类型最小为 1',
'document_id.required' => '请选择文档',
]);
//不同类型参数判断
if (intval($params['type']) == 2){ //首页类型一
$logo = $request->post('logo');
if (!$logo){
throw new ErrorHttpException('请上传图标');
}
$params['logo'] = $logo;
$params['description'] = htmlspecialchars(trim($request->post('desc')),ENT_QUOTES);
}
$params['user_id'] = $this->_user->id;
//排序
$params['sort'] = intval($request->post('sort',0));
DocumentHomeLogic::instance()->editHomeData($params);
return $this->data('success');
}
return $this->data('非法请求');
}
/**
* @api {post} /admin/home/delete 首页文档设置-删除操作
*
* @apiName delete
* @apiGroup DocumentHome
*
* @apiParam {Number} id 主键 ID
*
*/
public function delHomeData(Request $request){
$this->check($request);
$params = $this->validate($request, [
'id' => 'required|integer|min:1',
], [
'id.required' => 'id 不能为空',
'id.min' => 'id 最小为 1',
]);
DocumentHomeLogic::instance()->delHomeData(intval($params['id']));
return $this->data('success');
}
/**
* @api {get} /admin/home/get-type 首页文档设置-获取类型
*
* @apiName get-type
* @apiGroup DocumentHome
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":{"1":"公告","2":"首页类型一","3":"首页类型二"},"message":"ok"}
*/
public function getType(Request $request){
$this->check($request);
return $this->data(DocumentHomeLogic::instance()->getTypeData());
}
/**
* @api {post} /admin/home/search-doc 首页文档设置-模糊查询文档
*
* @apiName search-doc
* @apiGroup DocumentHome
*
* @apiParam {String} keyword 关键词(非必填)
*
*/
public function queryDocument(Request $request){
$this->check($request);
$keyword = trim($request->post('keyword'));
$data = DocumentHomeLogic::instance()->queryDocument($keyword,1);
return $this->data($data);
}
}
================================================
FILE: app/Controller/Admin/FeedbackController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2021 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\DocumentFeedback;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Logic\DocumentFeedbackLogic;
use W7\Http\Message\Server\Request;
class FeedbackController extends BaseController
{
/**
* @api {post} /admin/document/feedback-list 反馈建议列表
* @apiName feedback-list
* @apiGroup document.Feedback
*
*
* @apiParam {Number} document_id 文档ID
* @apiParam {Number} page 页码
* @apiParam {Number} page_size 页数
*/
public function getList(Request $request){
//验证
$params = $this->validate($request, [
'document_id' => 'required|integer|min:1',
], [
'document_id.required' => '文档id必填',
'document_id.integer' => '文档id非法',
]);
$page = intval($request->post('page'));
$pageSize = intval($request->post('page_size'));
//获取用户信息
$user = $request->getAttribute('user');
if (!$user->isManager) {
throw new ErrorHttpException('您没有权限管理该文档',[],Setting::ERROR_NO_POWER);
}
//查询数据
$query = DocumentFeedback::query()->where('document_id', '=', $params['document_id'])->orderByDesc('created_at');
$list = $query->paginate($pageSize, ['id','user_id','document_id','type','status','created_at'], 'page', $page);
foreach ($list->items() as $i => $row) {
$result['data'][] = [
'id' => $row->id,
'user_id' => $row->user_id,
'document_id' => $row->document_id,
'status' => $row->status,
'status_text' => $row->status_text,
'type' => $row->type,
'type_name' => $row->type_name,
'created_at' => $row->created_at->toDateTimeString()
];
}
$result['page_count'] = $list->lastPage();
$result['total'] = $list->total();
$result['page_current'] = $list->currentPage();
return $this->data($result);
}
/**
* @api {post} /admin/document/feedback-detail 反馈建议详情
* @apiName feedback-detail
* @apiGroup document.Feedback
*
*
* @apiParam {Number} feed_id 反馈数据ID
* @apiParam {Number} document_id 文档ID
*/
public function detail(Request $request){
//验证
$params = $this->validate($request, [
'feed_id' => 'required|integer|min:1',
'document_id' => 'required|integer|min:1',
], [
'feed_id.required' => '反馈数据id必填',
'feed_id.integer' => '反馈数据id非法',
'document_id.required' => '文档id必填',
'document_id.integer' => '文档id非法',
]);
//获取用户信息
$user = $request->getAttribute('user');
if (!$user->isManager) {
throw new ErrorHttpException('您没有权限管理该文档',[],Setting::ERROR_NO_POWER);
}
$detail = DocumentFeedbackLogic::instance()->getByFeedbackDetail($params['feed_id'],$params['document_id']);
if (!$detail){
throw new ErrorHttpException('反馈数据不存在');
}
//更新状态
DocumentFeedbackLogic::instance()->setByFeedbackStatus($params['feed_id'],$params['document_id']);
$result = [
'id'=> $detail->id,
'status' => $detail->status,
'status_text' => $detail->status_text,
'type'=> $detail->type,
'type_name'=> $detail->type_name,
'document_id'=> $detail->document_id,
'content'=> $detail->content,
'images'=> $detail->images,
'created_at' => $detail->created_at->toDateTimeString()
];
return $this->data($result);
}
}
================================================
FILE: app/Controller/Admin/HomepageSettingController.php
================================================
<?php
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\HomepageSettingLogic;
use W7\Http\Message\Server\Request;
//首页设置
class HomepageSettingController extends BaseController
{
private function check(Request $request)
{
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('无权访问');
}
return true;
}
/**
* @api {get} /admin/home/get-set 获取首页设置数据
* @apiName get-set
* @apiGroup HomepageSetting
*
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":{"open_home":{"is_open":"0","url":"http:\/\/192.168.168.99"},"banner":["http:\/\/111.234.xxxx","http:\/\/xxx.xxx.xx"],"title":"11111"},"message":"ok"}
*/
public function getHomePageSet(Request $request){
$this->check($request);
return $this->data(HomepageSettingLogic::instance()->getHomeSet());
}
/**
* @api {post} /admin/home/set-open 设置是否打开首页
* @apiName set-open
* @apiGroup HomepageSetting
*
*
* @apiParam {Number} is_open 是否开启(0:关闭 1:开启)
*/
public function setOpenHome(Request $request){
$this->check($request);
$params = $this->validate($request, [
'is_open' => 'required|integer',
], [
'is_open.required' => '请选择是否开启',
]);
$params['url'] = base_url();
HomepageSettingLogic::instance()->setOpenHome($params);
return $this->data('success');
}
/**
* @api {post} /admin/home/set-banner 设置首页banner
* @apiName set-banner
* @apiGroup HomepageSetting
*
*
* @apiParam {Array} images 图片
*/
public function setHomeBanner(Request $request){
$this->check($request);
$images = $request->post('images');
$images = array_filter($images);
if (empty($images)){
throw new ErrorHttpException('图片不能为空!');
}
HomepageSettingLogic::instance()->setHomeBanner($images);
return $this->data('success');
}
/**
* @api {post} /admin/home/set-title 设置首页名称
* @apiName set-title
* @apiGroup HomepageSetting
*
*
* @apiParam {String} title 名称
*/
public function setHomeTtile(Request $request){
$this->check($request);
$params = $this->validate($request, [
'title' => 'string|required',
], [
'title.required' => '名称不能为空',
]);
HomepageSettingLogic::instance()->setHomeTitle($params['title']);
return $this->data('success');
}
}
================================================
FILE: app/Controller/Admin/MenuSettingController.php
================================================
<?php
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\MenuSettingLogic;
use W7\Http\Message\Server\Request;
class MenuSettingController extends BaseController
{
private function check(Request $request)
{
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('无权访问');
}
return true;
}
public function all(Request $request)
{
$this->check($request);
return $this->data(MenuSettingLogic::instance()->all());
}
public function add(Request $request)
{
$this->check($request);
$config = $this->validate($request, [
'name' => 'required',
'sort' => 'required',
'url' => 'required'
]);
MenuSettingLogic::instance()->add($config);
return $this->data('success');
}
public function getById(Request $request)
{
$this->check($request);
$params = $this->validate($request, [
'id' => 'required'
]);
try {
return $this->data(MenuSettingLogic::instance()->getById($params['id']));
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
public function updateById(Request $request)
{
$this->check($request);
$config = $this->validate($request, [
'id' => 'required',
'name' => 'required',
'sort' => 'required',
'url' => 'required'
]);
try {
MenuSettingLogic::instance()->updateById($config['id'], $config);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
return $this->data('success');
}
public function deleteById(Request $request)
{
$this->check($request);
$params = $this->validate($request, [
'id' => 'required'
]);
MenuSettingLogic::instance()->deleteById($params['id']);
return $this->data('success');
}
public function setTheme(Request $request)
{
$this->check($request);
$params = $this->validate($request, [
'theme' => 'required'
]);
MenuSettingLogic::instance()->setTheme($params['theme']);
return $this->data('success');
}
public function getTheme(Request $request)
{
$this->check($request);
return $this->data(MenuSettingLogic::instance()->getTheme());
}
}
================================================
FILE: app/Controller/Admin/SettingController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\SettingLogic;
use W7\App\Model\Service\CdnLogic;
use W7\Http\Message\Server\Request;
class SettingController extends BaseController
{
private $handler = [
SettingLogic::KEY_COS => 'saveCos',
SettingLogic::KEY_FORBID_WORDS => '',
];
public function config(Request $request){
$param = $this->validate($request, [
'key' => 'required',
], [
'key.required' => 'key必填',
]);
$this->check($request);
$setting = SettingLogic::instance()->getByKey($param['key'],1);
return $this->data([$param['key'] => $setting->setting]);
}
public function cos(Request $request)
{
$this->check($request);
$setting = SettingLogic::instance()->getByKey(SettingLogic::KEY_COS);
$settingData = $setting->setting;
if ((!$settingData['url']) && $settingData['region'] && $settingData['bucket']) {
$settingData['url'] = 'https://' . $settingData['bucket'] . '.cos.' . $settingData['region'] . '.myqcloud.com';
}
return $this->data([
'key' => SettingLogic::KEY_COS,
'setting' => $settingData,
]);
}
public function save(Request $request)
{
$this->validate($request, [
'key' => 'required',
], [
'key.required' => 'key必填',
]);
$key = $request->post('key');
if (!isset($this->handler[$key])) {
throw new ErrorHttpException('错误的配置key');
}
if (!empty($this->handler[$key])) {
$value = call_user_func_array([$this, $this->handler[$key]], [$request]);
} else {
$value = $request->post('setting','');
}
try {
idb()->beginTransaction();
if ($key == SettingLogic::KEY_COS && (empty($value['url']) || !$value['url'])) {
$value['url'] = 'https://' . $value['bucket'] . '.cos.' . $value['region'] . '.myqcloud.com';
}
SettingLogic::instance()->save($key, $value);
//验证票据
if ($key == SettingLogic::KEY_COS) CdnLogic::instance()->channel(SettingLogic::KEY_COS, true);
idb()->commit();
} catch (\Throwable $e) {
idb()->rollBack();
if ($key == SettingLogic::KEY_COS) {
ilogger()->channel('error')->error('云存储链接失败,请检查配置是否正确' . $e->getMessage());
throw new ErrorHttpException('云存储链接失败,请检查配置是否正确');
}
throw new ErrorHttpException($e->getMessage());
}
return $this->data('success');
}
private function saveCos(Request $request)
{
$this->validate($request, [
'setting.app_id' => 'required',
'setting.secret_id' => 'required',
'setting.secret_key' => 'required',
'setting.bucket' => 'required',
'setting.region' => 'required',
'setting.url' => '',
'setting.path' => 'sometimes|regex:/^\/[a-zA-Z\-_0-9]+$/i'
], [
'setting.app_id.required' => 'app_id必填',
'setting.secret_id.required' => 'secret_id必填',
'setting.secret_key.required' => 'secret_key必填',
'setting.bucket.required' => 'bucket必填',
'setting.region.required' => '所属地址必填',
'setting.url' => '附件访问域名',
'setting.path.regex' => '保存目录填写错误,格式例如:/savepath '
]);
$setting = $request->post('setting');
$data = [
'app_id' => $setting['app_id'],
'secret_id' => $setting['secret_id'],
'secret_key' => $setting['secret_key'],
'bucket' => $setting['bucket'],
'region' => $setting['region'],
'url' => rtrim($setting['url'], '/'),
'path' => rtrim($setting['path'], '/'),
];
if (empty($data['path'])) {
$data['path'] = '';
}
return $data;
}
private function check(Request $request)
{
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('无权访问');
}
return true;
}
}
================================================
FILE: app/Controller/Admin/StarController.php
================================================
<?php
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Star;
use W7\App\Model\Entity\User;
use W7\App\Model\Entity\UserOperateLog;
use W7\App\Model\Logic\DocumentLogic;
use W7\Http\Message\Server\Request;
class StarController extends BaseController
{
public function all(Request $request)
{
$name = $request->post('name');
$page = intval($request->post('page'));
/**
* @var User $user
*/
$user = $request->getAttribute('user');
$query = Star::query()->where('user_id', '=', $user->id);
if ($name) {
$query->whereHas('document', function ($query) use ($name) {
return $query->where('name', 'LIKE', "%{$name}%");
});
}
$list = $query->paginate(null, '*', 'page', $page);
$data = [];
foreach ($list->items() as $row) {
if ($row->chapter_id) {
$name = $row->chapter->name;
} else {
$name = $row->document->name;
}
$data[] = [
'id' => $row->id,
'name' => $name,
'author' => [
'name' => $row->document->user->username
],
'is_public' => $row->document->isPublicDoc,
'document_id' => $row->document->id,
'chapter_id' => $row->chapter->id
];
}
$result['data'] = $data;
$result['page_count'] = $list->lastPage();
$result['total'] = $list->total();
$result['page_current'] = $list->currentPage();
return $this->data($result);
}
public function add(Request $request)
{
$params = $this->validate($request, [
'document_id' => 'required|integer',
], [
'document_id.required' => '文档ID必传',
]);
/**
* @var User $user
*/
$user = $request->getAttribute('user');
/*if (!$user->isReader) {
throw new ErrorHttpException('无权限操作该文档');
}*/
$document = DocumentLogic::instance()->getById($params['document_id']);
if (empty($document)) {
throw new ErrorHttpException('您操作的文档不存在');
}
$star = new Star();
$star->user_id = $user->id;
$star->document_id = $params['document_id'];
$star->chapter_id = (int)$request->post('chapter_id', 0);
$star->save();
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $params['document_id'],
'chapter_id' => $star->chapter_id,
'operate' => UserOperateLog::COLLECT,
'remark' => '添加星标'
]);
return $this->data(['star_id' => $star->id]);
}
public function delete(Request $request)
{
$params = $this->validate($request, [
'id' => 'required|integer',
'document_id' => 'required|integer',
], [
'id.required' => 'ID必传',
'document_id.required' => '文档ID必传',
]);
/**
* @var User $user
*/
$user = $request->getAttribute('user');
/*if (!$user->isReader) {
throw new ErrorHttpException('无权限操作该文档');
}*/
$document = DocumentLogic::instance()->getById($params['document_id']);
if (empty($document)) {
throw new ErrorHttpException('您操作的文档不存在');
}
$star = Star::query()->where('user_id', '=', $user->id)->where('id', '=', $params['id'])->first();
UserOperateLog::query()
->where('user_id',$star->user_id)
->where('document_id', $star->document_id)
->where('chapter_id',$star->chapter_id)
->delete();
$star->delete();
return $this->data('success');
}
}
================================================
FILE: app/Controller/Admin/ThirdPartyLoginController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\ThirdPartyLoginLogic;
use W7\Http\Message\Server\Request;
class ThirdPartyLoginController extends BaseController
{
private function check(Request $request)
{
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('无权访问');
}
return true;
}
public function all(Request $request)
{
$this->check($request);
$setting = ThirdPartyLoginLogic::instance()->getThirdPartyLoginSetting(1);
$data = [];
foreach ($setting['channel'] as $key => $item) {
$data[] = [
'id' => $key,
'name' => $item['setting']['name'],
'enable' => $item['setting']['enable'] ?? false
];
}
return $this->data($data);
}
public function getById(Request $request)
{
$this->check($request);
$params = $this->validate($request, [
'id' => 'required'
]);
try {
return $this->data(ThirdPartyLoginLogic::instance()->getThirdPartyLoginChannelById($params['id'], 1));
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
public function add(Request $request)
{
$this->check($request);
$params = $this->validate($request, [
'setting.name' => 'required',
'setting.logo' => 'required|url',
'setting.app_id' => 'required',
'setting.secret_key' => 'required',
'setting.access_token_url' => 'required|url',
'setting.user_info_url' => 'required|url'
], [
'setting.name.required' => 'name必填',
'setting.logo.required' => 'logo必传',
'setting.app_id.required' => 'app_id必填',
'setting.secret_key.required' => 'secret_key必填',
'setting.access_token_url.required' => 'access_token_url必填',
'setting.user_info_url.required' => 'user_info_url必填',
]);
$params['setting']['user_info_url'] = rtrim($params['setting']['user_info_url'], '/');
$params['setting']['access_token_url'] = rtrim($params['setting']['access_token_url'], '/');
$params['setting']['enable'] = !empty($request->post('setting')['enable']) ? 1 : 0;
$params['convert'] = $request->post('convert');
try {
ThirdPartyLoginLogic::instance()->addThirdPartyLoginChannel($params);
return $this->data('success');
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
public function updateById(Request $request)
{
$this->check($request);
$params = $this->validate($request, [
'id' => 'required',
'setting.name' => 'required',
'setting.logo' => 'required|url',
'setting.app_id' => 'required',
'setting.secret_key' => 'required',
'setting.access_token_url' => 'required|url',
'setting.user_info_url' => 'required|url',
], [
'setting.name.required' => 'name必填',
'setting.logo.required' => 'logo必传',
'setting.app_id.required' => 'app_id必填',
'setting.secret_key.required' => 'secret_key必填'
]);
$params['setting']['user_info_url'] = rtrim($params['setting']['user_info_url'], '/');
$params['setting']['access_token_url'] = rtrim($params['setting']['access_token_url'], '/');
$params['setting']['enable'] = !empty($request->post('setting')['enable']) ? 1 : 0;
$params['convert'] = $request->post('convert');
try {
ThirdPartyLoginLogic::instance()->updateThirdPartyLoginChannelById($params['id'], $params);
return $this->data('success');
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
public function deleteById(Request $request)
{
$this->check($request);
$params = $this->validate($request, [
'id' => 'required',
]);
try {
ThirdPartyLoginLogic::instance()->deleteThirdPartyLoginChannelById($params['id']);
return $this->data('success');
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
public function setDefaultLoginChannel(Request $request)
{
$this->check($request);
$defaultLoginChannel = $request->post('default_login_channel', '');
$isNeedBind = $request->post('is_need_bind', '');
$isNeedBind = $isNeedBind == 1 ? true : false;
ThirdPartyLoginLogic::instance()->setDefaultLoginSetting([
'default_login_channel' => $defaultLoginChannel,
'is_need_bind' => $isNeedBind
]);
return $this->data('success');
}
public function getDefaultLoginChannel(Request $request)
{
$this->check($request);
return $this->data(ThirdPartyLoginLogic::instance()->getDefaultLoginSetting());
}
}
================================================
FILE: app/Controller/Admin/UploadController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\BadRequestException;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\SettingLogic;
use W7\App\Model\Service\CdnLogic;
use W7\Http\Message\Server\Request;
class UploadController extends BaseController
{
public function image(Request $request)
{
$this->validate($request, [
'file' => 'required|file'
]);
$file = $request->file('file');
$size = $file->getSize();
$mimeType = $file->getMimeType();
$mimeTypeData = explode('/', $mimeType);
//返回图片路径
if ($mimeTypeData[0] != 'image') {
throw new ErrorHttpException('上传的文件不是图片');
}
if ($size > 5242880) {
throw new ErrorHttpException('请上传不大于5M的文件');
}
$fileName = sprintf('/%s.%s', irandom(32), pathinfo($file->getClientFilename(), PATHINFO_EXTENSION));
try {
$url = CdnLogic::instance()->channel(SettingLogic::KEY_COS)->uploadFile($fileName, $file->getRealPath());
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
return $this->data(['url' => $url]);
}
}
================================================
FILE: app/Controller/Admin/UserController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\DocumentPermission;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Entity\User;
use W7\App\Model\Entity\UserOperateLog;
use W7\App\Model\Logic\DocumentPermissionLogic;
use W7\Http\Message\Server\Request;
use W7\App\Model\Logic\UserLogic;
class UserController extends BaseController
{
/**
* @api {post} /admin/user/all 所有用户
*
* @apiName all
* @apiGroup user
*
* @apiParam {String} username 用户名
*
*/
public function all(Request $request)
{
$username = trim($request->input('username'));
$name = trim($request->input('name'));
$noId = $request->input('no_id', '');
$obj = User::query()->select(['id', 'username', 'group_id', 'created_at']);
if ($username) {
$obj->where('username', 'LIKE', "%$username%");
}
if ($name) {
$obj->where('username', $name);
}
if ($noId) {
$obj->whereNotIn('id', explode(',', $noId));
}
$user = $obj->get();
$result = $user->toArray();
return $this->data($result);
}
public function search(Request $request)
{
$username = trim($request->post('username'));
$page = intval($request->post('page'));
$user = User::query()->where('username', 'LIKE', "%$username%")->paginate(null, '*', 'page', $page);
$result = [];
$list = $user->items();
if (!empty($list)) {
foreach ($list as $i => $row) {
$result['data'][] = [
'id' => $row->id,
'username' => $row->username,
'role' => $row->isFounder ? '创始人' : '普通用户',
'created_at' => $row->created_at->toDateTimeString(),
'manage_doc_count' => DocumentPermission::query()->where('user_id', '=', $row->id)->where('permission', '=', DocumentPermission::MANAGER_PERMISSION)->count(),
'operate_doc_count' => DocumentPermission::query()->where('user_id', '=', $row->id)->where('permission', '=', DocumentPermission::OPERATOR_PERMISSION)->count(),
'read_doc_count' => DocumentPermission::query()->where('user_id', '=', $row->id)->where('permission', '=', DocumentPermission::READER_PERMISSION)->count()
];
}
}
$result['page_count'] = $user->lastPage();
$result['total'] = $user->total();
$result['page_current'] = $user->currentPage();
return $this->data($result);
}
public function add(Request $request)
{
/**
* @var User $user
*/
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('没有操作用户的权限');
}
$data = $this->validate($request, [
'username' => 'required',
'userpass' => 'required',
], [
'username.required' => '请输入用户姓名',
'userpass.required' => '请输入用户密码',
]);
$data = [
'username' => trim($data['username']),
'userpass' => trim($data['userpass']),
];
$data['remark'] = $request->input('remark', '');
try {
$res = UserLogic::instance()->createUser($data);
return $this->data($res);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
public function getById(Request $request)
{
/**
* @var User $user
*/
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('没有操作用户的权限');
}
$params = $this->validate($request, [
'id' => 'required'
], [
'id.required' => '用户ID不能为空',
]);
try {
$res = UserLogic::instance()->getByUid($params['id']);
if (!$res) {
throw new \RuntimeException('用户不存在');
}
unset($res->userpass);
return $this->data($res->toArray());
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
/**
* 用户编辑用户信息,如果编辑用户名,需要提供用户密码;如果编辑用户密码,需要提供原密码和新密码
* @param Request $request
* @return array
*/
public function updateSelf(Request $request)
{
/**
* @var User $user
*/
$user = $request->getAttribute('user');
$userName = trim($request->post('username'));
$userPass = trim($request->post('userpass'));
$userOldPass = trim($request->post('old_userpass'));
if (empty($userName) && empty($userPass)) {
throw new ErrorHttpException('参数错误');
}
if ($userOldPass && $user->userpass != UserLogic::instance()->userPwdEncryption($user->username, $userOldPass)) {
throw new ErrorHttpException('旧密码错误');
}
$updateUser['id'] = $user->id;
$updateUser['username'] = empty($userName) ? $user->username : $userName;
!empty($updateUser['username']) && $updateUser['userpass'] = $userOldPass;
$userPass && $updateUser['userpass'] = $userPass;
try {
$res = UserLogic::instance()->updateUser($updateUser);
return $this->data($res);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
/**
* 管理员编辑用户信息
* @param Request $request
* @return array
*/
public function updateById(Request $request)
{
/**
* @var User $user
*/
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('没有操作用户的权限');
}
$user = $this->validate($request, [
'id' => 'required',
'username' => 'required',
'userpass' => 'required|confirmed',
'remark' => '',
], [
'id.required' => '用户ID不能为空',
'username.required' => '用户名不能为空',
'userpass.required' => '密码不能为空'
]);
unset($user['userpass_confirmation']);
$user['username'] = trim($user['username']);
$user['userpass'] = trim($user['userpass']);
if ($request->input('is_ban') !== null) {
$user['is_ban'] = $request->input('is_ban');
}
if ($request->input('remark') !== null) {
$user['remark'] = $request->input('remark');
}
try {
$res = UserLogic::instance()->updateUser($user);
return $this->data($res);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
public function deleteByIds(Request $request)
{
/**
* @var User $user
*/
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('没有操作用户的权限');
}
$params = $this->validate($request, [
'ids' => 'required'
], [
'ids.required' => 'ID不能为空',
]);
$ids = array_filter(explode(',', trim($params['ids'])));
if ($ids) {
$delNum = UserLogic::instance()->deleteByIds($ids);
return $this->data('成功删除' . $delNum . '用户,如果用户有文档不能直接删除');
}
throw new ErrorHttpException('参数有误');
}
public function batchUpdateDocPermissionByUid(Request $request)
{
/**
* @var User $user
*/
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('您没有权限管理该文档', [], Setting::ERROR_NO_POWER);
}
$params = $this->validate($request, [
'document_permission' => 'required',
'user_id' => 'required'
]);
try {
idb()->beginTransaction();
try {
foreach ($params['document_permission'] as $documentPermission) {
$permission = DocumentPermissionLogic::instance()->updateByDocIdAndUid($documentPermission['document_id'], $params['user_id'], $documentPermission['permission']);
if ($permission) {
if (!empty($documentPermission['permission'])) {
$remark = '设置用户' . $permission->user->username . '为' . $permission->aclName;
} else {
$remark = '删除用户' . $permission->user->username . '的' . $permission->aclName . '权限';
}
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $documentPermission['document_id'],
'chapter_id' => 0,
'operate' => UserOperateLog::EDIT,
'target_user_id' => $params['user_id'],
'remark' => $user->username . $remark
]);
}
}
idb()->commit();
} catch (\Throwable $e) {
idb()->rollBack();
throw $e;
}
return $this->data('success');
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
}
================================================
FILE: app/Controller/Admin/UserOperateLogController.php
================================================
<?php
namespace W7\App\Controller\Admin;
use Illuminate\Support\Facades\DB;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Entity\Star;
use W7\App\Model\Entity\User;
use W7\App\Model\Entity\UserOperateLog;
use W7\Http\Message\Server\Request;
class UserOperateLogController extends BaseController
{
/**
* 目前获取的是用户阅读过的文档数据
* @param Request $request
* @return array
*/
public function getUserReaderLog(Request $request)
{
$name = $request->post('name');
$page = intval($request->post('page', 1));
$pageSize = intval($request->post('page_size', 15));
//时间按天为单位
$time = intval($request->post('time'));
/**
* @var User $user
*/
$user = $request->getAttribute('user');
$query = UserOperateLog::query();
if ($name) {
$query->whereHas('document', function ($query) use ($name) {
return $query->where('name', 'LIKE', "%{$name}%");
});
}
if ($time) {
$query = $query->where('created_at', '<', time() - 86400 * $time);
}
$groupOperate = UserOperateLog::query()->where('user_id', '=', $user->id)
->where('operate', '=', UserOperateLog::PREVIEW)
->groupBy(['document_id'])->orderByDesc('max_id')->select([
'document_id',
DB::raw('max(id) max_id')
])->take($pageSize)->skip(($page - 1) * $pageSize)->getQuery();
$dataQuery = clone $query;
$dataQuery = $dataQuery->joinSub($groupOperate, 'sub', 'id', '=', 'max_id')->orderByDesc('id');
foreach ($dataQuery->get() as $i => $row) {
$star = Star::query()->where('user_id', '=', $user->id)->where('document_id', '=', $row->document_id)->where('chapter_id', '=', 0)->first();
$result['data'][] = [
'id' => $row->id,
'document_id' => $row->document->id,
'name' => $row->document->name,
'star_id' => !empty($star) ? $star->id : '',
'author' => [
'name' => $row->document->user->username
],
'description' => $row->document->descriptionShort,
'is_public' => $row->document->isPublicDoc,
'time' => $row->created_at->toDateTimeString()
];
}
$query = $query->where('user_id', '=', $user->id)->where('operate', '=', UserOperateLog::PREVIEW)->groupBy(['document_id']);
$list = $query->paginate($pageSize, ['*'], 'page', $page);
$result['page_count'] = $list->lastPage();
$result['total'] = $list->total();
$result['page_current'] = $list->currentPage();
return $this->data($result);
}
/**
* 获取文档的所有操作记录
* @param Request $request
* @return array
*/
public function getByDocument(Request $request)
{
$params = $this->validate($request, [
'document_id' => 'required|integer'
]);
$page = intval($request->post('page'));
$pageSize = intval($request->post('page_size'));
//时间按天为单位
$time = intval($request->post('time'));
/**
* @var User $user
*/
$user = $request->getAttribute('user');
if (!$user->isManager) {
throw new ErrorHttpException('您没有权限管理该文档',[],Setting::ERROR_NO_POWER);
}
$query = UserOperateLog::query()->where('document_id', '=', $params['document_id'])
->where('operate', '!=', UserOperateLog::PREVIEW)->where('remark', '!=' , '')->orderByDesc('created_at');
if ($time) {
$query = $query->where('created_at', '<', time() - 86400 * $time);
}
$list = $query->paginate($pageSize, ['id', 'user_id', 'document_id', 'operate', 'remark', 'created_at'], 'page', $page);
foreach ($list->items() as $i => $row) {
$result['data'][] = [
'id' => $row->id,
'remark' => $row->remark,
'time' => $row->created_at->toDateTimeString()
];
}
$result['page_count'] = $list->lastPage();
$result['total'] = $list->total();
$result['page_current'] = $list->currentPage();
return $this->data($result);
}
public function deleteById(Request $request)
{
$params = $this->validate($request, [
'document_id' => 'required|integer',
], [
'document_id.required' => '文档ID必传'
]);
$operateLogId = $request->post('operate_log_id');
$operateLogType = $request->post('operate_log_type', UserOperateLog::PREVIEW);
/**
* @var User $user
*/
$user = $request->getAttribute('user');
$query = UserOperateLog::query()->where('document_id', '=', $params['document_id']);
if ($operateLogId) {
$query = $query->where('id', '=', $operateLogId);
} else {
$query = $query->where('operate', '=', $operateLogType);
}
if (!$user->isManager) {
$query = $query->where('user_id', '=', $user->id);
}
$query->delete();
return $this->data('success');
}
}
================================================
FILE: app/Controller/Admin/UserShareController.php
================================================
<?php
namespace W7\App\Controller\Admin;
use W7\App\Controller\BaseController;
use W7\App\Model\Logic\UserShareLogic;
use W7\Http\Message\Server\Request;
class UserShareController extends BaseController
{
public function shareUrl(Request $request)
{
$params = $this->validate($request, [
'chapter_id' => 'required|integer',
'document_id' => 'required|integer'
]);
$user = $request->getAttribute('user');
return $this->data(UserShareLogic::instance()->getShareUrl($user->id, $params['document_id'], $params['chapter_id']));
}
}
================================================
FILE: app/Controller/Admin/index.html
================================================
================================================
FILE: app/Controller/BaseController.php
================================================
<?php
/**
* @author donknap
* @date 19-10-10 下午2:07
*/
namespace W7\App\Controller;
use W7\Core\Controller\ControllerAbstract;
class BaseController extends ControllerAbstract
{
public function data($data = [], $message = 'ok', $code = 200)
{
return [
'status' => true,
'code' => $code,
'data' => $data,
'message' => $message,
];
}
}
================================================
FILE: app/Controller/Common/AuthController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Common;
use Overtrue\Socialite\Config;
use Overtrue\Socialite\SocialiteManager;
use Throwable;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Entity\User;
use W7\App\Model\Entity\UserThirdParty;
use W7\App\Model\Logic\ThirdPartyLoginLogic;
use W7\App\Model\Logic\UserLogic;
use W7\Core\Session\Session;
use W7\Http\Message\Server\Request;
class AuthController extends BaseController
{
public function user(Request $request)
{
$userSession = $request->session->get('user');
/**
* @var User $user
*/
$user = UserLogic::instance()->getByUid($userSession['uid']);
if (!$user) {
$request->session->destroy();
throw new ErrorHttpException('请先登录', [], Setting::ERROR_NO_LOGIN);
}
$source = [
'source_name' => '',
'username' => ''
];
$userSourceAppId = $request->session->get('user-source-app');
if ($userSourceAppId) {
$userSource = UserThirdParty::query()->where('source', '=', $userSourceAppId)->where('uid', '=', $user->id)->first();
$loginChannel = ThirdPartyLoginLogic::instance()->getThirdPartyLoginChannelById($userSourceAppId);
$source = [
'source_name' => $loginChannel['setting']['name'],
'username' => $userSource->username
];
}
$result = [
'id' => $user->id,
'username' => $user->username,
'group_id' => $user->group_id,
'created_at' => $user->created_at->toDateTimeString(),
'updated_at' => $user->updated_at->toDateTimeString(),
//判断当前用户是否有密码
'no_password' => empty($user->userpass),
'user_source' => $source,
'acl' => [
'has_manage' => $user->isFounder
]
];
return $this->data($result);
}
public function login(Request $request)
{
$data = $this->validate($request, [
'username' => 'required',
'userpass' => 'required',
'code' => 'required',
], [
'username.required' => '用户名不能为空',
'userpass.required' => '密码不能为空',
'code.required' => '验证码不能为空',
]);
$code = $request->session->get('img_code');
if (strtolower($data['code']) != strtolower($code)) {
throw new ErrorHttpException('请输入正确的验证码');
}
$user = UserLogic::instance()->getByUserName($data['username']);
if (empty($user)) {
throw new ErrorHttpException('用户名或密码错误,请检查');
}
if ($user->userpass != UserLogic::instance()->userPwdEncryption($user->username, $data['userpass'])) {
throw new ErrorHttpException('用户名或密码错误,请检查');
}
if (!empty($user->is_ban)) {
throw new ErrorHttpException('您使用的用户已经被禁用,请联系管理员');
}
$request->session->destroy();
$this->saveUserInfo($request->session, $user);
return $this->data('success');
}
public function method(Request $request)
{
$redirectUrl = $request->post('redirect_url');
$setting = ThirdPartyLoginLogic::instance()->getThirdPartyLoginSetting();
$data = [];
/**
* @var SocialiteManager $socialite
*/
$socialite = iloader()->get(SocialiteManager::class);
//获取可用的第三方登录列表
foreach ($setting['channel'] as $key => $item) {
if (!empty($item['setting']['enable'])) {
try {
$socialite = clone $socialite;
$url = ienv('API_HOST') . 'admin-login?app_id=' . $key . '&redirect_url=' . urlencode($redirectUrl);
$redirect = $socialite->config(new Config([
'client_id' => $item['setting']['app_id'],
'client_secret' => $item['setting']['secret_key']
]))->driver($key)->stateless()->redirect($url)->getTargetUrl();
} catch (Throwable $e) {
$redirect = null;
}
$data[] = [
'id' => $key,
'name' => $item['setting']['name'],
'logo' => $item['setting']['logo'],
'redirect_url' => $redirect
];
}
}
return $this->data($data);
}
public function defaultLoginUrl(Request $request)
{
$redirectUrl = $request->post('redirect_url');
$defaultSetting = ThirdPartyLoginLogic::instance()->getDefaultLoginSetting();
if (!empty($defaultSetting['default_login_channel']) && $setting = ThirdPartyLoginLogic::instance()->getThirdPartyLoginChannelById($defaultSetting['default_login_channel'])) {
/**
* @var SocialiteManager $socialite
*/
$socialite = iloader()->get(SocialiteManager::class);
$socialite = clone $socialite;
$url = ienv('API_HOST') . 'login?app_id=' . $defaultSetting['default_login_channel'] . '&redirect_url=' . $redirectUrl;
try {
return $this->data($socialite->config(new Config([
'client_id' => $setting['setting']['app_id'],
'client_secret' => $setting['setting']['secret_key']
]))->driver($defaultSetting['default_login_channel'])->stateless()->redirect($url)->getTargetUrl());
} catch (Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
return $this->data('');
}
/**
* @api {post} /common/auth/third-party-login 三方登陆
*
* @apiName third-party-login
* @apiGroup auth
*
* @apiParam {string} code
* @apiParam {string} app_id
*
* @apiSuccess {string} success
* @apiSuccess {string} is_need_bind 需要绑定用户 true
* @apiSuccess {string} has_login 已登录,需要确认是否切换 true
* @apiSuccess {string} change_token 已登录,切换token
*/
public function thirdPartyLogin(Request $request)
{
$code = $request->input('code');
if (empty($code)) {
throw new ErrorHttpException('Code码错误');
}
$appId = $request->input('app_id');
if (empty($appId)) {
throw new ErrorHttpException('app_id错误');
}
$setting = ThirdPartyLoginLogic::instance()->getThirdPartyLoginChannelById($appId);
if (!$setting) {
throw new ErrorHttpException('不支持该授权方式');
}
/**
* @var SocialiteManager $socialite
*/
$socialite = iloader()->get(SocialiteManager::class);
$driver = $socialite->config(new Config([
'client_id' => $setting['setting']['app_id'],
'client_secret' => $setting['setting']['secret_key']
]))->driver($appId)->stateless();
$user = $driver->user($driver->getAccessToken($code));
//获取第三方数据
$userInfo = [
'uid' => $user->uid,
'username' => $user->username,
'avatar' => $user->avatar ?? ''
];
if (empty($userInfo['username']) || empty($userInfo['uid'])) {
throw new ErrorHttpException('登录用户数据错误,请重试');
}
//创建用户和绑定关系
$loginSetting = ThirdPartyLoginLogic::instance()->getDefaultLoginSetting();
$thirdPartyUser = UserThirdParty::query()->where([
'openid' => $userInfo['uid'],
'username' => $userInfo['username'],
'source' => $appId
])->first();
if (empty($thirdPartyUser)) {
$thirdPartyUser = UserThirdParty::query()->create([
'openid' => $userInfo['uid'],
'username' => $userInfo['username'],
'uid' => 0,
'source' => $appId,
]);
}
$username = $thirdPartyUser->username;
//如果当前第三方用户绑定的用户为空,执行绑定操作
if (empty($thirdPartyUser->uid)) {
if (empty($loginSetting['is_need_bind'])) {
//不需要绑定已有账户的话,直接创建新用户
$username = 'tpl_' . $userInfo['username'] . $userInfo['uid'];
$thirdPartyUser->uid = UserLogic::instance()->createBucket($username,$userInfo['avatar']);
$thirdPartyUser->save();
} else {
$username = $userInfo['username'];
$thirdPartyUser->uid = 0;
}
}else{
UserLogic::instance()->updateUser([
'id' => $thirdPartyUser->uid,
'username' => $userInfo['username'],
'avatar' => $userInfo['avatar']
]);
}
//已登陆的用户校验是否需要切换用户S
$sessionUser = $request->session->get('user');
if ($sessionUser) {
$LoginUserthirdParty = UserThirdParty::query()
->where('uid', $sessionUser['uid'])
->where('source', $appId)->first();
if ($LoginUserthirdParty) {
//如果当前登陆账户,已经绑定了第三方-账户一致,返回成功,账户不一致,提示切换
if ($thirdPartyUser->uid) {//商城绑了文档
if ($thirdPartyUser->uid != $sessionUser['uid']) {
//4如果登陆用户和当前访问用户不一致
$changeToken = 'temp_user_info_4' . date('YmdHis') . round(1000, 9999);
icache()->set($changeToken, ['third_party_user_id' => $thirdPartyUser->id], 60 * 15);
return $this->data(['has_login' => 1, 'change_token' => $changeToken, 'message' => '当前登录账号非微擎账户绑定账号,是否继续登录?']);
}
} elseif (!$thirdPartyUser->uid) {
//3文档绑了商城,商城没有绑文档-去登陆
$sourceToken = 'temp_user_info_3_source' . date('YmdHis') . round(1000, 9999);
icache()->set($sourceToken, ['third_party_user_id' => $thirdPartyUser->id, 'source' => $appId], 60 * 15);
return $this->data(['has_login' => 3, 'source_token' => $sourceToken, 'message' => '当前登录账号非微擎账户绑定账号,是否继续登录?']);
}
} else {
//1当前登陆账户,没有绑定第三方-登陆账户也没有绑定第三方。商城没有绑文档,文档没有绑商城
if (!$thirdPartyUser->uid) {
//1文档没有绑商城,商城没有绑文档,如果切入用户,没有绑定账户,当前用户也没有绑定
$bindToken = 'temp_user_info_1_unbind_two' . date('YmdHis') . round(1000, 9999);
icache()->set($bindToken, ['third_party_user_id' => $thirdPartyUser->id], 60 * 15);
return $this->data(['has_login' => 2, 'bind_token' => $bindToken, 'message' => '是否绑定当前微擎账户于该登录账户?']);
} else {
//2文档没有绑商城,商城绑了文档-去切换
$changeToken = 'temp_user_info_2' . date('YmdHis') . round(1000, 9999);
icache()->set($changeToken, ['third_party_user_id' => $thirdPartyUser->id], 60 * 15);
return $this->data(['has_login' => 1, 'change_token' => $changeToken, 'message' => '当前登录账号非微擎账户绑定账号,是否继续登录?']);
}
}
}
/*0如果文档没有登陆,没有绑账户去绑定
---如果登陆了
*1文档没有绑商城,商城没有绑文档-去绑定
*2文档没有绑商城,商城绑了文档-去切换
*3文档绑了商城,商城没有绑文档-去切换-去登陆
*4文档绑了商城,商城绑了文档,用户不一致-去切换-致登陆
**/
//2已登陆的用户校验是否需要切换用户E
$ret = $this->data($this->setThirdPartySession($request, $thirdPartyUser));
return $ret;
}
/**
* @api {post} /common/auth/ThirdPartyUserCacheIn 文档绑了商城,商城没有绑文档切用户
*
* @apiName ThirdPartyUserCacheIn
* @apiGroup auth
*
* @apiParam {string} bind_token 用于绑定的bind_token
*/
public function ThirdPartyUserCacheIn(Request $request)
{
$user = $request->session->get('user');
if (!$user) {
throw new ErrorHttpException('当前账户未登陆');
}
$changeToken = $request->input('source_token');
if (empty($changeToken)) {
throw new ErrorHttpException('source_token错误');
}
$data = icache()->get($changeToken);
if (isset($data['third_party_user_id'])) {
$thirdPartyUser = UserThirdParty::query()->find($data['third_party_user_id']);
if ($thirdPartyUser) {
$username = $thirdPartyUser->username;
$localUser = [
'app_id' => $thirdPartyUser->source,
'uid' => $thirdPartyUser->uid,
'third-party-uid' => $thirdPartyUser->id,
'username' => $username,
];
$request->session->destroy();
//记录第三方登录app_id
$request->session->set('user-source-app', $thirdPartyUser->source);
$loginSetting = ThirdPartyLoginLogic::instance()->getDefaultLoginSetting();
//需要绑定已有账户
if (!empty($loginSetting['is_need_bind']) && empty($thirdPartyUser->uid)) {
//保存第三方用户信息,触发用户绑定
$request->session->set('third-party-user', $localUser);
return $this->data([
'is_need_bind' => true
]);
} else {
throw new ErrorHttpException('当前可以直接登陆');
}
}
}
throw new ErrorHttpException('source_token已过期');
}
/**
* @api {post} /common/auth/changeThirdPartyUser 切换用户
*
* @apiName changeThirdPartyUser
* @apiGroup auth
*
* @apiParam {string} change_token 用于切换的change_token
*/
public function changeThirdPartyUser(Request $request)
{
$user = $request->session->get('user');
if (!$user) {
throw new ErrorHttpException('当前账户未登陆');
}
$changeToken = $request->input('change_token');
if (empty($changeToken)) {
throw new ErrorHttpException('change_token错误');
}
$data = icache()->get($changeToken);
if (isset($data['third_party_user_id'])) {
$thirdPartyUser = UserThirdParty::query()->find($data['third_party_user_id']);
if ($thirdPartyUser) {
return $this->data($this->setThirdPartySession($request, $thirdPartyUser));
}
}
throw new ErrorHttpException('change_token已过期');
}
/**
* @api {post} /common/auth/bindThirdPartyUser 切换用户
*
* @apiName bindThirdPartyUser
* @apiGroup auth
*
* @apiParam {string} bind_token 用于绑定的bind_token
*/
public function bindThirdPartyUser(Request $request)
{
$user = $request->session->get('user');
if (!$user) {
throw new ErrorHttpException('当前账户未登陆');
}
$changeToken = $request->input('bind_token');
if (empty($changeToken)) {
throw new ErrorHttpException('bind_token错误');
}
$data = icache()->get($changeToken);
if (isset($data['third_party_user_id'])) {
$thirdPartyUser = UserThirdParty::query()->find($data['third_party_user_id']);
if ($thirdPartyUser) {
if (!$thirdPartyUser->uid) {
$thirdPartyUser->uid = $user['uid'];
$thirdPartyUser->save();
return $this->data($this->setThirdPartySession($request, $thirdPartyUser));
}
}
}
throw new ErrorHttpException('bind_token已过期');
}
public function setThirdPartySession(Request $request, $thirdPartyUser)
{
$username = $thirdPartyUser->username;
$localUser = [
'app_id' => $thirdPartyUser->source,
'uid' => $thirdPartyUser->uid,
'third-party-uid' => $thirdPartyUser->id,
'username' => $username,
];
$request->session->destroy();
//记录第三方登录app_id
$request->session->set('user-source-app', $thirdPartyUser->source);
$loginSetting = ThirdPartyLoginLogic::instance()->getDefaultLoginSetting();
//需要绑定已有账户
if (!empty($loginSetting['is_need_bind']) && empty($thirdPartyUser->uid)) {
//保存第三方用户信息,触发用户绑定
$request->session->set('third-party-user', $localUser);
return [
'is_need_bind' => true
];
} else {
$request->session->set('user-source-app', $thirdPartyUser->source);
$this->saveUserInfo($request->session, $thirdPartyUser->bindUser);
return 'success';
}
}
/**
* @api {post} /common/auth/third-party-login-bind 绑定用户
*
* @apiName third-party-login-bind
* @apiGroup auth
*
* @apiParam {string} handle 操作类型bind:绑定 reg:注册
* @apiParam {string} username 用户名
* @apiParam {string} userpass 密码
*/
public function thirdPartyLoginBind(Request $request)
{
$data = $this->validate($request, [
'handle' => 'required',
'username' => 'required',
'userpass' => 'required'
], [
'handle.required' => '操作不能为空',
'username.required' => '用户名不能为空',
'userpass.required' => '密码不能为空'
]);
$thirdPartyUser = $request->session->get('third-party-user');
if (!$thirdPartyUser) {
throw new ErrorHttpException('用户信息已过期请重新登陆', [], Setting::ERROR_NO_LOGIN);
}
$handle = $request->input('handle', 'bind');
$UserThirdParty = UserThirdParty::query()->find($thirdPartyUser['third-party-uid']);
if (!$UserThirdParty) {
throw new ErrorHttpException('请先授权');
}
if ($UserThirdParty->uid) {
throw new ErrorHttpException('用户信息已过期请重新登陆', [], Setting::ERROR_NO_LOGIN);
}
$msg = '注册成功';
if ($handle == 'bind') {
$msg = '绑定成功';
//绑定已有用户
$user = UserLogic::instance()->getByUserName($data['username']);
if (empty($user)) {
throw new ErrorHttpException('用户名或密码错误,请检查');
}
if ($user->userpass != UserLogic::instance()->userPwdEncryption($user->username, $data['userpass'])) {
throw new ErrorHttpException('用户名或密码错误,请检查');
}
$userThirdPartyHas = UserThirdParty::query()->where('uid', $user->id)->first();
if ($userThirdPartyHas) {
//如果当前用户
ilogger()->channel('test')->debug('userThirdPartyHas-' . $userThirdPartyHas->id . '-new-userId-' . $user->id);
// throw new ErrorHttpException('当前账号已绑定其它账号,您可以选择重新注册或绑定其它账号。' . $userThirdPartyHas->id . '-' . $user->id);
throw new ErrorHttpException('当前账号已绑定其它账号,您可以选择重新注册或绑定其它账号');
}
if (!empty($user->is_ban)) {
throw new ErrorHttpException('您使用的用户已经被禁用,请联系管理员');
}
} else {//'reg'
//新增
$data = [
'username' => trim($data['username']),
'userpass' => trim($data['userpass']),
];
$data['remark'] = $request->input('remark', '');
try {
$userId = UserLogic::instance()->createUser($data);
$user = User::query()->find($userId);
} catch (\Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
}
$UserThirdParty->update([
'uid' => $user->id,
]);
$request->session->destroy();
//记录第三方登录app_id
$request->session->set('user-source-app', $thirdPartyUser['app_id']);
$this->saveUserInfo($request->session, $user);
return $this->data($msg);
}
/**
* 解绑
*/
public function unbind(Request $request)
{
$userSession = $request->session->get('user');
$userSourceAppId = $request->session->get('user-source-app');
$res = UserThirdParty::query()
->where('source', '=', $userSourceAppId)
->where('uid', '=', $userSession['uid'])
->update(['uid' => 0]);
if ($res) {
//$this->logout($request);
return $this->data($res);
}
throw new ErrorHttpException('解绑失败');
}
public function logout(Request $request)
{
$sourceApp = $request->session->get('user-source-app');
$request->session->destroy();
if ($sourceApp) {
$setting = ThirdPartyLoginLogic::instance()->getThirdPartyLoginChannelById($sourceApp);
if (!$setting) {
throw new ErrorHttpException('不支持该授权方式');
}
/**
* @var SocialiteManager $socialite
*/
$socialite = iloader()->get(SocialiteManager::class);
return $socialite->config(new Config([
'client_id' => $setting['setting']['app_id'],
'client_secret' => $setting['setting']['secret_key']
]))->driver($sourceApp)->logout($this->response());
} else {
$utl = ienv('API_HOST') . 'admin-login';
return $this->response()->redirect($utl);
}
}
public function getlogouturl(Request $request)
{
$utl = ienv('API_HOST') . 'common/auth/logout';
return $this->data($utl);
}
private function saveUserInfo(Session $session, $user)
{
$session->set('user', [
'uid' => $user->id,
'username' => $user->username,
]);
//用户在修改密码后,删除该值,触发退出操作
icache()->set(sprintf(UserLogic::USER_LOGOUT_AFTER_CHANGE_PWD, $user->id), 1, 7 * 86400);
}
}
================================================
FILE: app/Controller/Common/MenuController.php
================================================
<?php
namespace W7\App\Controller\Common;
use W7\App\Controller\BaseController;
use W7\App\Model\Logic\MenuSettingLogic;
use W7\Http\Message\Server\Request;
class MenuController extends BaseController
{
public function setting(Request $request)
{
$setting = MenuSettingLogic::instance()->getMenuSetting();
$list = $setting['list'] ?? [];
$sorts = array_column($list, 'sort');
array_multisort($sorts, SORT_ASC, $list);
foreach ($list as $index => &$item) {
$item['id'] = $index;
}
$setting['list'] = array_values($list);
return $this->data($setting);
}
}
================================================
FILE: app/Controller/Common/UserController.php
================================================
<?php
namespace W7\App\Controller\Common;
use W7\App\Controller\BaseController;
use W7\App\Model\Entity\UserOperateLog;
use W7\App\Model\Logic\MenuSettingLogic;
use W7\App\Model\Logic\UserLogic;
use W7\App\Model\Logic\UserOperateLogic;
use W7\Http\Message\Server\Request;
class UserController extends BaseController
{
/**
* 用户详情
* @param Request $request
* @return array
*/
public function info(Request $request){
$param = $this->validate($request,[
'username' => 'required|string'
],[
'username' => '用户名'
]);
$Logic = new UserLogic();
$user = $Logic->getByUserName($param['username'])->setHidden(['userpass']);
return $this->data($user);
}
public function update(Request $request){
$param = $this->validate($request,[
'id' => 'required|integer',
'avatar' => 'sometimes|required',
'company' => 'sometimes|required',
'resume' => 'sometimes|required',
'skill' => 'sometimes|required',
'address' => 'sometimes|required',
],[
'id' => '用户id',
'avatar' => '头像',
'company' => '公司和职称',
'resume' => '简介',
'skill' => '技能',
'address' => '地址'
]);
$Logic = new UserLogic();
$user = $Logic->updateUser($param);
return $this->data($user);
}
/**
* 我的动态
*/
public function operate(Request $request){
$param = $this->validate($request,[
'user_id' => 'required|integer'
],[
'user_id' => '用户id'
]);
$page = $request->input('page',1);
$size = $request->input('page_size',20);
$Logic = new UserOperateLogic();
$param['operate'] = [UserOperateLog::CREATE,UserOperateLog::COLLECT];
return $this->data($Logic->lists($param,$page,$size));
}
}
================================================
FILE: app/Controller/Common/VerifyCodeController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Common;
use Gregwar\Captcha\CaptchaBuilder;
use Gregwar\Captcha\PhraseBuilder;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\Http\Message\Server\Request;
class VerifyCodeController extends BaseController
{
const CODE_LENGTH = 4;
public function image(Request $request)
{
try {
$phrase = new PhraseBuilder();
$code = $phrase->build(self::CODE_LENGTH);
$builder = new CaptchaBuilder($code, $phrase);
$builder->setBackgroundColor(255, 255, 255);
$builder->setMaxAngle(25);
$builder->setMaxBehindLines(0);
$builder->setMaxFrontLines(0);
$builder->build();
$phrase = $builder->getPhrase();
} catch (\Exception $e) {
throw new ErrorHttpException($e->getMessage());
}
$request->session->set('img_code', $phrase);
ob_start();
$builder->output();
$image = ob_get_contents();
ob_end_clean();
$data = [
'img' => 'data:image/jpg;base64,'.base64_encode($image)
];
ilogger()->debug('verify-code: '. $phrase);
return $this->data($data);
}
}
================================================
FILE: app/Controller/Document/ChapterController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Document;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Document\Chapter;
use W7\App\Model\Entity\Document\ChapterApi;
use W7\App\Model\Entity\Document\ChapterContent;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Entity\Star;
use W7\App\Model\Entity\UserOperateLog;
use W7\App\Model\Logic\ChapterLogic;
use W7\App\Model\Logic\Document\ChapterApi\ChapterRecordLogic;
use W7\App\Model\Logic\Document\ChapterApi\ChapterRuleLogic;
use W7\App\Model\Logic\DocumentLogic;
use W7\App\Model\Logic\UserLogic;
use W7\App\Model\Logic\UserOperateLogic;
use W7\App\Model\Logic\UserShareLogic;
use W7\Http\Message\Server\Request;
class ChapterController extends BaseController
{
/**
* @api {post} /document/chapter/ruleDemo 文档-mock规则数据
* @apiName rule
* @apiGroup Chapter
*
* @apiParam {Number} chapter_id 章节ID
* @apiParam {Number} location_type 请求类型1请求2响应
* @apiParam {Number} reponse_id 响应ID
*/
public function ruleDemo(Request $request)
{
$params = $this->validate($request, [
'chapter_id' => 'required|integer|min:1',
'location_type' => 'required|in:1,2',
'reponse_id' => 'integer'
], [
'chapter_id.required' => '文档id必填',
'location_type.integer' => '请求类型',
'reponse_id' => '响应ID',
]);
$reponseId = $params['reponse_id'] ? $params['reponse_id'] : 0;
//获取rule参数样例
$chapterDemoLogic = new ChapterRuleLogic($params['chapter_id']);
$query = $chapterDemoLogic->getChapterRule($params['location_type'], $reponseId);
return $query;
}
/**
* 某一个文档的目录
* @param Request $request
* @return array
*/
public function catalog(Request $request)
{
$params = $this->validate($request, [
'document_id' => 'required|integer|min:1',
], [
'document_id.required' => '文档id必填',
'document_id.integer' => '文档id非法'
]);
try {
$result = ChapterLogic::instance()->getCatalog($params['document_id']);
$user = $request->getAttribute('user');
if (empty($user->isReader)) {
throw new ErrorHttpException('当前账户无权限阅读该文档', [], Setting::ERROR_NO_POWER);
}
if ($user && !empty($user->id)) {
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $params['document_id'],
'chapter_id' => 0,
'operate' => UserOperateLog::PREVIEW,
'remark' => $user->username . '阅读文档'
]);
}
return $this->data($result);
} catch (\Exception $e) {
throw new ErrorHttpException($e->getMessage());
}
}
/**
* @api {post} /document/chapter/record 文档API-查看
* @apiName record
* @apiGroup document.Chapter
*
* @apiParam {Number} chapter_id 章节ID
* @apiParam {Number} document_id 文档ID
*/
public function record(Request $request)
{
$params = $this->validate($request, [
'document_id' => 'required|integer|min:1',
'chapter_id' => 'required|integer|min:1'
], [
'document_id.required' => '文档id必填',
'document_id.integer' => '文档id非法',
'chapter_id.required' => '章节id必填',
'chapter_id.integer' => '章节id非法'
]);
$result = [
'record' => null,
];
$chapter = ChapterLogic::instance()->getById($params['chapter_id'], $params['document_id']);
if ($chapter) {
$showRecord = $request->post('show_record', 0);
if ($showRecord && $chapter->content->layout == 1) {
$obj = new ChapterRecordLogic($chapter->id);
$result['record'] = $obj->showRecord();
}
}
return $this->data($result);
}
/**
* @api {post} /document/chapter/detail 文档内容-前端查看
* @apiName detail
* @apiGroup document.Chapter
*
* @apiParam {Number} chapter_id 章节ID
* @apiParam {Number} document_id 文档ID
*/
public function detail(Request $request)
{
$params = $this->validate($request, [
'document_id' => 'required|integer|min:1',
'chapter_id' => 'required|integer|min:1'
], [
'document_id.required' => '文档id必填',
'document_id.integer' => '文档id非法',
'chapter_id.required' => '章节id必填',
'chapter_id.integer' => '章节id非法'
]);
$shareKey = $request->post('share_key');
try {
$shareInfo = [];
if ($shareKey) {
$shareInfo = UserShareLogic::instance()->getUidAndChapterByShareKey($shareKey);
}
$chapter = ChapterLogic::instance()->getById($params['chapter_id'], $params['document_id']);
$user = $request->getAttribute('user');
if (empty($user->isReader)) {
throw new ErrorHttpException('当前账户无权限阅读该文档', [], Setting::ERROR_NO_POWER);
}
if (!empty($user->id)) {
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $params['document_id'],
'chapter_id' => $params['chapter_id'],
'operate' => UserOperateLog::PREVIEW,
'remark' => $user->username . '浏览章节' . $chapter->name
]);
//如果当前用户不是分享者并且是当前章节时,添加分享记录
if ($shareInfo && $shareInfo[0] != $user->id && $shareInfo[1] == $params['chapter_id']) {
if (!UserOperateLog::query()->where('user_id', '=', $shareInfo[0])->where('target_user_id', '=', $user->id)->where('chapter_id', '=', $params['chapter_id'])->exists()) {
$sharerUser = UserLogic::instance()->getByUid($shareInfo[0]);
UserOperateLog::query()->create([
'user_id' => $shareInfo[0],
'document_id' => $params['document_id'],
'chapter_id' => $params['chapter_id'],
'target_user_id' => $user->id,
'operate' => UserOperateLog::SHARE,
'remark' => $sharerUser->username . '分享链接' . UserShareLogic::instance()->getShareUrl($shareInfo[0], $params['document_id'], $params['chapter_id']) . '给' . $user->username
]);
}
}
}
} catch (\Exception $e) {
throw new ErrorHttpException($e->getMessage());
}
if (!$chapter) {
throw new ErrorHttpException('该章节不存在!', [], Setting::ERROR_NO_FIND);
}
$document = DocumentLogic::instance()->getById($params['document_id']);
$creator = UserOperateLogic::instance()->getByChapterAndOperate($chapter->id, UserOperateLog::CREATE);
if ($creator) {
$author = $creator->user;
} else {
$author = $document->user;
}
if (!empty($user->id)) {
$star = Star::query()->where('user_id', '=', $user->id)->where('chapter_id', '=', $chapter->id)->first();
}
$api = null;
if ($chapter->content->layout == ChapterContent::LAYOUT_HTTP) {
$api = ChapterApi::query()->where('chapter_id', $chapter->id)->first();
if (!$chapter->content->content) {
$markdownText = '#';
//如果是导入的,没有生成文档的数据,进行生成文档并标记
$chapterRecordLogic = new ChapterRecordLogic($chapter->id);
$record = $chapterRecordLogic->showRecord();
if ($record) {
$chapterRecordLogic = new ChapterRecordLogic($chapter->id);
$markdownTextReplay = $chapterRecordLogic->recordToMarkdown($record, 1);
if ($markdownTextReplay) {
$markdownText = $markdownTextReplay;
}
}
$chapter->content->content = $markdownText;
$chapter->content->save();
}
}
$result = [
'id' => $chapter->id,
'parent_id' => $chapter->parent_id,
'name' => $chapter->name,
'document_id' => $chapter->document_id,
'created_at' => $chapter->created_at->toDateTimeString(),
'updated_at' => $chapter->updated_at->toDateTimeString(),
'content' => $chapter->content->content,
'star_id' => !empty($star) ? $star->id : '',
'prev_item' => [
'id' => $chapter->prevItem->id ?? '',
'name' => $chapter->prevItem->name ?? '',
],
'next_item' => [
'id' => $chapter->nextItem->id ?? '',
'name' => $chapter->nextItem->name ?? '',
],
'author' => [
'uid' => $author->id,
'username' => $author->username,
],
'document' => $document,
'api' => $api,
'navigation' => $this->buildNavigationSun($params['chapter_id'])
];
$showRecord = $request->post('show_record', 0);
if ($showRecord && $chapter->content->layout == 1) {
$obj = new ChapterRecordLogic($chapter->id);
$result['record'] = $obj->showRecord();
}
return $this->data($result);
}
/**
* @api {get} /document/chapter/search 文档搜索
*
* @apiName search
* @apiGroup chapter
*
* @apiParam {Array} data
* @apiParam {Array} data.data 文档搜索列表
* @apiParam {String} data.data.name 文档标题
* @apiParam {String} data.data.content 文档内容
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":{"current_page":1,"data":[{"name":"aaa","id":1130,"chapter_id":2030,"content":"> GET \/222\n\n\n\n### 请求\n\n\n\n\naasd23","layout":1}],"first_page_url":"\/?page=1","from":1,"last_page":1,"last_page_url":"\/?page=1","next_page_url":null,"path":"\/","per_page":10,"prev_page_url":null,"to":1,"total":1},"message":"ok"}
*/
public function search(Request $request)
{
$this->validate($request, [
'document_id' => 'required|integer|min:1',
'keywords' => 'required',
], [
'document_id.required' => '文档id必填',
'document_id.integer' => '文档id非法',
'keywords.required' => '关键字必填',
]);
$page = intval($request->input('page', 1));
$pageSize = intval($request->input('page_size', 10));
$keyword = $request->input('keywords');
$documentId = intval($request->input('document_id'));
if (!$keyword) {
throw new ErrorHttpException('没有关键词');
}
$chapterList = Chapter::query()
->leftJoin('document_chapter_content', 'document_chapter_content.chapter_id', 'document_chapter.id')
->where([
['document_chapter.document_id', $documentId],
['document_chapter_content.content', 'like', '%' . $keyword . '%'],
])
->orWhere([
['document_chapter.document_id', $documentId],
['document_chapter.is_dir', 0],
['document_chapter.name', 'like', '%' . $keyword . '%'],
])
->select(['document_chapter.name', 'document_chapter_content.*'])
->paginate($pageSize, '*', 'page', $page)->toArray();
if (count($chapterList['data'])) {
foreach ($chapterList['data'] as $key => $val) {
//导航
$chapterList['data'][$key]['navigation'] = $this->buildNavigationSun($val['chapter_id']);
}
}
return $this->data($chapterList);
}
public function buildNavigationSun($chapterId, $str = '', $i = 0)
{
$i++;
if ($i > 50) {
//循环大于100,不再处理
return $str;
}
$chapter = Chapter::query()->find($chapterId);
if ($chapter) {
if (!$str) {
//如果是根级
$str = $chapter->name;
} else {
//如果是上级
$str = $chapter->name . '>' . $str;
}
if ($chapter->parent_id) {
$str = $this->buildNavigationSun($chapter->parent_id, $str);
}
}
return $str;
}
}
================================================
FILE: app/Controller/Document/DocumentController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Document;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Entity\UserOperateLog;
use W7\App\Model\Logic\DocumentLogic;
use W7\Http\Message\Server\Request;
class DocumentController extends BaseController
{
public function detail(Request $request)
{
$params = $this->validate($request, [
'document_id' => 'required|integer|min:1',
], [
'document_id.required' => '文档id必填',
'document_id.integer' => '文档id非法'
]);
$res = DocumentLogic::instance()->getById($params['document_id']);
if (!$res) {
throw new ErrorHttpException('当前文档不存在', [],Setting::ERROR_NO_POWER);
}
$user = $request->getAttribute('user');
if (empty($user->isReader)) {
throw new ErrorHttpException('当前账户无权限阅读该文档', [],Setting::ERROR_NO_POWER);
}
if ($user && !empty($user->id)) {
UserOperateLog::query()->create([
'user_id' => $user->id,
'document_id' => $params['document_id'],
'chapter_id' => 0,
'operate' => UserOperateLog::PREVIEW
]);
}
$res = DocumentLogic::instance()->getById($params['document_id']);
return $this->data($res);
}
}
================================================
FILE: app/Controller/Document/DocumentHomeController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Document;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\DocumentHomeLogic;
use W7\App\Model\Logic\DocumentSearchLogic;
use W7\App\Model\Logic\HomepageSettingLogic;
use W7\Http\Message\Server\Request;
class DocumentHomeController extends BaseController
{
/**
* @api {get} /document/home 前端首页数据
* @apiName home
* @apiGroup Document.home
*
*/
public function getDocumentHome(Request $request){
//获取配置信息
$set = HomepageSettingLogic::instance()->getHomeSet();
if (!$set['open_home']['is_open']){
throw new ErrorHttpException('首页已关闭');
}
//公告
$notice = DocumentHomeLogic::instance()->getDocumentNotice();
//首页类型一
$typeList_I = DocumentHomeLogic::instance()->getDocumentTypeI();
//首页类型二
$typeList_II = DocumentHomeLogic::instance()->getDocumentTypeII();
$data = [
'set' => $set,
'notice' => $notice,
'middle_list' => $typeList_I,
'bottom_list' => $typeList_II,
];
return $this->data($data);
}
/**
* @api {get} /document/home/check 检测首页是否开启
* @apiName check
* @apiGroup Document.home
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":{"is_open":1,"url":"http:\/\/192.168.168.99:80"},"message":"ok"}
*/
public function checkHome(){
$set = HomepageSettingLogic::instance()->getOpenHome();
return $this->data($set);
}
/**
* @api {post} /document/home/search 前端首页搜索接口
* @apiName search
* @apiGroup Document.home
*
* @apiParam {String} keywords 关键词
* @apiParam {Number} page 页码
* @apiParam {Number} page_size 页数
*/
public function search(Request $request){
$page = intval($request->input('page', 1));
$pageSize = intval($request->input('page_size', 10));
$keyword = $request->input('keywords','');
//记录搜索词
DocumentSearchLogic::instance()->addSearchHotWord($keyword);
//搜索列表
$data = DocumentHomeLogic::instance()->searchDocument($keyword,$page,$pageSize);
return $this->data($data);
}
/**
* @api {get} /document/home/search-hot 获取搜索热词列表
* @apiName search-hot
* @apiGroup Document.home
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":["7","666","111","22","kkk"],"message":"ok"}
*/
public function getSearchHot(){
$data = DocumentSearchLogic::instance()->getSearchHotList(3);
return $this->data($data);
}
}
================================================
FILE: app/Controller/Document/FeedbackController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Document;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\DocumentFeedback;
use W7\Http\Message\Server\Request;
class FeedbackController extends BaseController
{
/**
* 提交反馈
* @api {post} /document/feedback/add 文档API-提交
* @apiName add
* @apiGroup document.Feedback
*
* @apiParam {Number} document_id 文档ID
* @apiParam {String} type 问题类型 格式以 , 隔开
* @apiParam {String} content 问题内容
* @apiParam {Array} images 图片
*/
public function add(Request $request)
{
//验证
$params = $this->validate($request,[
'document_id' => 'required|integer|min:1',
'type' => 'string|required',
'content' => 'string|required|max:300'
],[
'document_id.required' => '文档id必填',
'document_id.min' => '文档id最小为0',
'type.required' => '问题类型必选',
'content.required' => '反馈内容必填',
'content.max' => '反馈内容最大300个字符'
]);
$user = $request->getAttribute('user');
//图片
$images = $request->post('images');
$result = DocumentFeedback::query()->create([
'user_id' => $user->id ? : 0,
'document_id' => $params['document_id'],
'type' => trim($params['type']),
'content' => htmlspecialchars(trim($params['content']),ENT_QUOTES),
'images' => $images ? json_encode($images) : ''
]);
if (!$result) {
throw new ErrorHttpException('提交反馈失败');
}
return $this->data('success');
}
}
================================================
FILE: app/Controller/Document/MockApiReponseController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Document;
use W7\App\Controller\BaseController;
use W7\App\Model\Logic\Document\MockApi\MockApiReponseLogic;
use W7\Http\Message\Server\Request;
class MockApiReponseController extends BaseController
{
public function index(Request $request, $id, $router)
{
$mockApiReponseLogic = new MockApiReponseLogic();
$ret = $mockApiReponseLogic->mackMockApiReponse($request, $id, $router);
return $this->response()->json($ret);
}
}
================================================
FILE: app/Controller/Install/IndexController.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Controller\Install;
use W7\App\Controller\BaseController;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\Install\InstallLogic;
use W7\Http\Message\Server\Request;
class IndexController extends BaseController
{
public function config(Request $request)
{
$data = [
'is_install' => $this->isInstall(),
'api_host' => ienv('API_HOST'),
'db_database' => ienv('DATABASE_DEFAULT_DATABASE'),
];
return $this->data($data);
}
public function isInstall()
{
$value = 0;
$isInstall = file_exists(RUNTIME_PATH . '/install.lock');
if ($isInstall) {
$value = 1;
if (ienv('API_HOST')) {
//已安装已重启
$value = 2;
}
} else {
//如果吗没有install
$dateBasePwd = ienv('DATABASE_DEFAULT_PASSWORD', '');
$dateBase = ienv('DATABASE_DEFAULT_DATABASE', '');
if ($dateBasePwd || $dateBase) {
//如果数据库已安装或者配置
$value = 3;
}
}
return $value;
}
/**
* @api {post} /install/systemDetection 系统检测
* @apiName systemDetection
* @apiGroup install
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":{"composer_install":{"name":"composer install","result":"已执行","enable":true},"system":{"name":"服务器操作系统","result":"Linux 9c290f2b8a1a 4.19.76-linuxkit #1 SMP Fri Apr 3 15:53:26 UTC 2020 x86_64","enable":true},"php_version":{"name":"PHP版本","result":"7.2.24","enable":true},"base_path":{"name":"安装程序目录可写","result":"\/home\/wwwroot\/doc","enable":true},"runtime_path":{"name":"安装程序运行目录可写","result":"\/home\/wwwroot\/doc\/runtime","enable":true},"swoole":{"name":"swoole扩展","result":"swoole版本4.4.4","enable":true},"pdo_mysql":{"name":"mysql扩展","result":"已安装pdo_mysql扩展","enable":true},"mbstring":{"name":"mbstring扩展","result":"已安装mbstring扩展","enable":true},"diskfreespace":{"name":"磁盘空间","result":"36.78G","enable":true}},"message":"ok"}
*/
public function systemDetection(Request $request)
{
$diskfreespace = diskfreespace(BASE_PATH);
$diskfreespaceG = (ceil($diskfreespace / 1000 / 1000 / 10) / 100);
$isInstall = $this->isInstall();
$installMsg = '确认项目服务是否重启,重启请操作命令: sh restart.sh';
if ($isInstall) {
if ($isInstall == 3) {
$data = [
['id' => 1, 'name' => '数据库已安装', 'result' => '数据库已安装', 'enable' => 2],
];
} else {
$data = [
['id' => 1, 'name' => '服务重启', 'result' => $isInstall ? $installMsg : '未安装', 'enable' => $isInstall],
];
}
} else {
$data = [
['id' => 1, 'name' => '服务重启', 'result' => $isInstall ? $installMsg : '未安装', 'enable' => $isInstall],
['id' => 2, 'name' => '服务器操作系统', 'result' => php_uname(), 'enable' => true],
['id' => 3, 'name' => 'PHP版本', 'result' => PHP_VERSION >= 7.2 ? PHP_VERSION : 'PHP版本7.2及以上', 'enable' => PHP_VERSION >= 7.2 ? true : false],
['id' => 4, 'name' => '安装程序目录可写', 'result' => is_writable(BASE_PATH) ? BASE_PATH : BASE_PATH . '不可写', 'enable' => is_writable(BASE_PATH) ? true : false],
['id' => 5, 'name' => '安装程序运行目录可写', 'result' => is_writable(RUNTIME_PATH) ? RUNTIME_PATH : '不可写', 'enable' => is_writable(RUNTIME_PATH) ? true : false],
['id' => 6, 'name' => 'swoole扩展', 'result' => (extension_loaded('swoole') & swoole_version() >= '4.3.0') ? 'swoole版本' . swoole_version() : 'swoole版本4.3.0及以上', 'enable' => (extension_loaded('swoole') & swoole_version() >= '4.3.0') ? true : false],
['id' => 7, 'name' => 'mysql扩展', 'result' => extension_loaded('pdo_mysql') ? '已安装pdo_mysql扩展' : '未安装pdo_mysql扩展', 'enable' => extension_loaded('pdo_mysql') ? true : false],
['id' => 8, 'name' => 'mbstring扩展', 'result' => extension_loaded('mbstring') ? '已安装mbstring扩展' : '未安装mbstring扩展', 'enable' => extension_loaded('mbstring') ? true : false],
// ['id' => 9, 'name' => 'exec命令', 'result' => function_exists('exec') ? '支持' : '不支持', 'enable' => function_exists('exec') ? true : false],
['id' => 10, 'name' => '磁盘空间', 'result' => ($diskfreespace > 200000000) ? $diskfreespaceG . 'G' : '存储空间200M以上', 'enable' => ($diskfreespace > 200000000) ? true : false],
['id' => 11, 'name' => 'redis扩展', 'result' => extension_loaded('redis') ? '已安装redis扩展' : '未安装redis扩展', 'enable' => extension_loaded('redis') ? true : false],
];
}
return $this->data($data);
}
/**
* @api {post} /install/install 系统安装
* @apiName install
* @apiGroup install
*
* @apiParam {String} api_host 服务器地址
* @apiParam {String} db_database 数据库名称
* @apiParam {String} db_host 数据库地址
* @apiParam {String} db_username 数据库用户名
* @apiParam {String} db_password 数据库密码
* @apiParam {String} db_prefix 数据库表前缀
* @apiParam {String} admin_username 管理员账户
* @apiParam {String} admin_password 管理员密码
* @apiParam {String} cache_driver 缓存驱动 选项:redis
* @apiParam {String} cache_host 缓存服务器地址(redis时填写)
*
* @apiSuccessExample {json} Success-Response:
* {"status":true,"code":200,"data":"安装已完成!提示:请按照文档配置,重启相关服务","message":"ok"}
*/
public function install(Request $request)
{
$params = $this->validate($request, [
'api_host' => 'required',
'db_database' => 'required',
'db_host' => 'required',
'db_username' => 'required',
'db_password' => 'required',
'db_prefix' => 'required',
'admin_username' => 'required',
'admin_password' => 'required',
'cache_host' => 'string',
'option' => 'required',
], [
'api_host' => '服务器地址',
'db_database' => '数据库',
'db_host' => '数据库地址',
'db_username' => '数据库用户名',
'db_password' => '数据库密码',
'db_prefix' => '数据库表前缀',
'admin_username' => '管理员密码',
'admin_password' => '管理员账户',
'cache_host' => '缓存服务器',
]);
$apiHost = explode(':', $params['api_host']);
if (count($apiHost) < 3 || (!is_numeric($apiHost[2]))) {
throw new ErrorHttpException('请填写协议与端口号');
}
$params['api_host'] = $apiHost[0] . ':' . $apiHost[1] . '/';
$params['server_port'] = $apiHost[2];
$dbHost = explode(':', $params['db_host']);
if (count($dbHost) < 2 || (!is_numeric($dbHost[1]))) {
throw new ErrorHttpException('请填写数据库端口号');
}
$params['db_host'] = $dbHost[0];
$params['db_port'] = $dbHost[1];
$params['cache_driver'] = 'redis';
if ($params['cache_host'] == 'db') {
$params['cache_driver'] = 'db';
} else {
$cacheHost = explode(':', $params['cache_host']);
if (count($cacheHost) < 2 || (!is_numeric($cacheHost[1]))) {
throw new ErrorHttpException('请填写redis端口号');
}
$params['cache_host'] = $cacheHost[0];
$params['cache_port'] = $cacheHost[1];
}
$installLogic = new InstallLogic();
$data = $installLogic->install($params);
return $this->data($data);
}
}
================================================
FILE: app/Exception/ErrorHttpException.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Exception;
use W7\Core\Exception\ResponseExceptionAbstract;
class ErrorHttpException extends ResponseExceptionAbstract
{
public function __construct($message = '', $data = [], $code = 0, \Throwable $previous = null)
{
if (empty($code)) {
$code = '500';
}
$message = json_encode([
'status' => false,
'code' => $code,
'data' => $data,
'message' => $message,
], JSON_UNESCAPED_UNICODE);
parent::__construct($message, 200, $previous);
}
}
================================================
FILE: app/Exception/InternalException.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Exception;
use W7\Core\Exception\ResponseExceptionAbstract;
class InternalException extends ResponseExceptionAbstract
{
public function __construct($message = '', $code = 0, \Throwable $previous = null)
{
parent::__construct($message, 500, $previous);
}
}
================================================
FILE: app/Handler/Cache/DbHandler.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Handler\Cache;
use W7\App\Model\Service\DbCacheLogic;
use W7\Core\Cache\Handler\HandlerAbstract;
class DbHandler extends HandlerAbstract
{
protected $storage;
public static function connect($config): HandlerAbstract
{
$cacheDb = (new DbCacheLogic());
return new static($cacheDb);
}
public function set($key, $value, $ttl = null)
{
return $this->storage->set($key, $value, $ttl);
}
public function get($key, $default = null)
{
return $this->storage->get($key);
}
public function has($key)
{
return $this->storage->has($key);
}
public function setMultiple($values, $ttl = null)
{
return $this->storage->setMultiple($values);
}
public function getMultiple($keys, $default = null)
{
return $this->storage->getMultiple($keys);
}
public function delete($key)
{
return $this->storage->delete($key);
}
public function deleteMultiple($keys)
{
return $this->storage->deleteMultiple($keys);
}
public function clear()
{
return $this->storage->clear();
}
}
================================================
FILE: app/Handler/Exception/ExceptionHandler.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Handler\Exception;
use W7\App\Exception\InternalException;
use function GuzzleHttp\Psr7\build_query;
use Overtrue\Socialite\Config;
use Overtrue\Socialite\SocialiteManager;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Document;
use W7\App\Model\Logic\DocumentLogic;
use W7\App\Model\Logic\ThirdPartyLoginLogic;
use W7\Core\Exception\RouteNotAllowException;
use W7\Core\Exception\RouteNotFoundException;
use W7\Core\Exception\ValidatorException;
use W7\Core\Session\Session;
use W7\Core\View\View;
use W7\Http\Message\Server\Response;
use W7\Core\Exception\Handler\ExceptionHandler as ExceptionHandlerAbstract;
class ExceptionHandler extends ExceptionHandlerAbstract
{
public function handle(\Throwable $e): Response
{
if ($e instanceof RouteNotFoundException || $e instanceof RouteNotAllowException) {
$request = icontext()->getRequest();
$route = $request->getUri()->getPath();
if ($request->getQueryParams()) {
$route .= '?' . build_query($request->getQueryParams());
}
// if (!env('DATABASE_DEFAULT_DATABASE')) {
// //安装页
// return $this->getResponse()->html(\W7\Facade\View::render('@public/install'));
// }
//如果访问的是admin下的路由,先检测是否登录
if (substr($route, 0, 12) == '/admin-login' || $route == '/') {
return $this->getResponse()->html(\W7\Facade\View::render('@public/index'));
}
if (substr($route, 0, 6) == '/admin') {
$session = new Session();
$session->start($request);
if (!$session->get('user')) {
$this->getResponse()->redirect((string)$this->getLoginUrl());
}
}
//如果是访问预览的连接,判断该文档是否需要登录后预览
if (substr($route, 0, 8) === '/chapter') {
$session = new Session();
$session->start($request);
if (!$session->get('user')) {
$documentId = explode('/', $route)[2] ?? '';
$documentId = explode('?', $documentId)[0];
$document = DocumentLogic::instance()->getById($documentId);
//非公有文档,自动跳转登录
if ($document && $document->is_public != Document::PUBLIC_DOCUMENT) {
$this->getResponse()->redirect($this->getLoginUrl(ienv('API_HOST') . ltrim($route, '/')));
}
}
}
return $this->getResponse()->html(\W7\Facade\View::render('@public/index'));
}
if ($e instanceof InternalException) {
$message = json_encode([
'status' => false,
'code' => $e->getCode(),
'data' => [],
'message' => $e->getMessage(),
], JSON_UNESCAPED_UNICODE);
return $this->getResponse()->withContent($message);
}
if ($e instanceof ValidatorException) {
$e = new ErrorHttpException($e->getMessage(), [], $e->getCode());
}
return parent::handle($e);
}
private function getLoginUrl($redirectUrl = null)
{
$defaultLoginChannel = ThirdPartyLoginLogic::instance()->getDefaultLoginSetting();
if (empty($defaultLoginChannel['default_login_channel'])) {
return '/login?redirect_url=' . urlencode($redirectUrl);
} else {
$setting = ThirdPartyLoginLogic::instance()->getThirdPartyLoginChannelById($defaultLoginChannel['default_login_channel']);
if (!$setting) {
return '/login?redirect_url=' . urlencode($redirectUrl);
} else {
/**
* @var SocialiteManager $socialite
*/
$socialite = iloader()->get(SocialiteManager::class);
return $socialite->config(new Config([
'client_id' => $setting['setting']['app_id'],
'client_secret' => $setting['setting']['secret_key'],
'redirect_url' => ienv('API_HOST') . 'login?app_id=' . $defaultLoginChannel['default_login_channel'] . '&redirect_url=' . $redirectUrl
]))->driver($defaultLoginChannel['default_login_channel'])->stateless()->redirect()->getTargetUrl();
}
}
}
}
================================================
FILE: app/Handler/Session/CacheHandler.php
================================================
<?php
/**
* This file is part of Rangine
*
* (c) We7Team 2019 <https://www.rangine.com/>
*
* document http://s.w7.cc/index.php?c=wiki&do=view&id=317&list=2284
*
* visited https://www.rangine.com/ for more details
*/
namespace W7\App\Handler\Session;
use W7\Core\Session\Handler\HandlerAbstract;
use W7\Facade\Cache;
class CacheHandler extends HandlerAbstract {
private function getCache() {
return Cache::channel( 'default');
}
public function destroy($session_id) {
return $this->getCache()->delete($session_id);
}
public function write($session_id, $session_data) {
if (!$session_data) {
return true;
}
return $this->getCache()->set($session_id, $session_data, $this->getExpires());
}
public function read($session_id) {
return $this->getCache()->get($session_id, '');
}
public function gc($maxlifetime) {
return true;
}
}
================================================
FILE: app/Handler/Session/DbHandler.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Handler\Session;
use W7\App\Model\Entity\Session;
use W7\App\Model\Service\SessionLogic;
use W7\Core\Session\Handler\HandlerAbstract;
class DbHandler extends HandlerAbstract
{
public function read($session_id)
{
if (empty($session_id)) {
return '';
}
$session = SessionLogic::instance()->getBySessionId($session_id);
if (empty($session) || $session->expired_at < time()) {
return '';
}
return $session->data;
}
public function destroy($session_id)
{
SessionLogic::instance()->deleteBySessionId($session_id);
return true;
}
public function write($session_id, $session_data)
{
$session = SessionLogic::instance()->getBySessionId($session_id);
if (empty($session)) {
Session::query()->create([
'session_id' => $session_id,
'data' => $session_data,
'expired_at' => time() + $this->getExpires(),
]);
} else {
$session->data = $session_data;
$session->expired_at = time() + $this->getExpires();
$session->save();
}
return true;
}
public function gc($maxlifetime)
{
Session::query()->where('expired_at', '<', time() - $maxlifetime)->delete();
return true;
}
}
================================================
FILE: app/Helper/Functions.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
function timeToString($time){
$diff = time()-$time;
if ($diff < 60){
return '刚刚';
}elseif($diff > 60 && $diff <= 60*60){
return floor($diff/60).'分钟前';
}elseif($diff > 60*60 && $diff <= 60*60*24){
return floor($diff / 3600).'小时前';
}else{
return date('Y-m-d H:i',$time);
}
}
function hasForbidWords($content = ''){
$Setting = new \W7\App\Model\Logic\SettingLogic();
$words = $Setting->getByKey(\W7\App\Model\Logic\SettingLogic::KEY_FORBID_WORDS,0);
$words = explode(',',$words);
$forbid = [];
foreach ($words as $v){
if (stripos($content,$v) !== false){
$forbid[] = $v;
}
}
return $forbid;
}
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0)
{
$ckey_length = 4;
$key = md5($key);
$keya = md5(substr($key, 0, 16));
$keyb = md5(substr($key, 16, 16));
$keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length) : substr(md5($key), -$ckey_length)) : '';
$cryptkey = $keya . md5($keya . $keyc);
$key_length = strlen($cryptkey);
$string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0) . substr(md5($string . $keyb), 0, 16) . $string;
$string_length = strlen($string);
$result = '';
$box = range(0, 255);
$rndkey = array();
for ($i = 0; $i <= 255; $i++) {
$rndkey[$i] = ord($cryptkey[$i % $key_length]);
}
for ($j = $i = 0; $i < 256; $i++) {
$j = ($j + $box[$i] + $rndkey[$i]) % 256;
$tmp = $box[$i];
$box[$i] = $box[$j];
$box[$j] = $tmp;
}
for ($a = $j = $i = 0; $i < $string_length; $i++) {
$a = ($a + 1) % 256;
$j = ($j + $box[$a]) % 256;
$tmp = $box[$a];
$box[$a] = $box[$j];
$box[$j] = $tmp;
$result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256]));
}
if ($operation == 'DECODE') {
if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26) . $keyb), 0, 16)) {
return substr($result, 26);
} else {
return '';
}
} else {
return $keyc . str_replace('=', '', base64_encode($result));
}
}
function generate_label($name, $value, $isFormat = true)
{
if ($isFormat) {
$option = [];
foreach ($value as $key => $val) {
$option[] = ['label' => $val, 'value' => $key];
}
} else {
$option = $value;
}
return ['label' => $name, 'option' => $option];
}
/**
* 获取当前域名及根路径
* @return string
*/
function base_url()
{
static $baseUrl = '';
if (empty($baseUrl)) {
$request = \W7\Facade\Context::getRequest();
$baseUrl = $request->getUri()->getScheme() . '://' . $request->server('HTTP_HOST');
}
return $baseUrl;
}
================================================
FILE: app/Listener/index.html
================================================
================================================
FILE: app/Message/index.html
================================================
================================================
FILE: app/Middleware/AppAuthMiddleware.php
================================================
<?php
namespace W7\App\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Throwable;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Logic\AppLogic;
use W7\App\Model\Logic\UserLogic;
use W7\Core\Middleware\MiddlewareAbstract;
class AppAuthMiddleware extends MiddlewareAbstract
{
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$params = $request->input();
if ((empty($params['appid']) && empty($params['sign'])) || !empty($request->session->get('user'))) {
return $handler->handle($request);
}
/**
* @var AppLogic $appLogic
*/
$appLogic = iloader()->singleton(AppLogic::class);
$app = $appLogic->getByAppId($params['appid']);
if (empty($app)) {
throw new ErrorHttpException('Invalid appid or sign');
}
$sign = $appLogic->getSign($params, $app->appsecret);
if ($sign !== $params['sign']) {
throw new ErrorHttpException('Invalid sign');
}
if (empty($app->user_id)) {
$user = [
'username' => $app->name . $app->appid,
'userpass' => trim($app->appid),
];
$user['remark'] = $app->name;
try {
$app->user_id = UserLogic::instance()->createUser($user);
} catch (Throwable $e) {
throw new ErrorHttpException($e->getMessage());
}
$app->save();
}
$user = UserLogic::instance()->getByUid($app->user_id);
$request->session->destroy();
$request->session->set('user', [
'uid' => $user->id,
'username' => $user->username,
'login_from_app' => 1
]);
return $handler->handle($request);
}
}
================================================
FILE: app/Middleware/BackendDocumentPermissionMiddleware.php
================================================
<?php
namespace W7\App\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use W7\App\Model\Entity\DocumentPermission;
use W7\App\Model\Entity\User;
use W7\App\Model\Logic\DocumentPermissionLogic;
use W7\Core\Middleware\MiddlewareAbstract;
class BackendDocumentPermissionMiddleware extends MiddlewareAbstract
{
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$documentId = $request->post('document_id');
if (!$documentId) {
return parent::process($request, $handler);
}
/**
* @var User $user
*/
$user = $request->getAttribute('user');
if ($user->isFounder) {
$user->isManager = true;
$user->isOperator = true;
$user->isReader = true;
} else {
/**
* @var DocumentPermission $documentPermission
*/
$documentPermission = DocumentPermissionLogic::instance()->getByDocIdAndUid($documentId, $user->id);
if ($documentPermission) {
$user->isManager = $documentPermission->isManager;
$user->isOperator = $documentPermission->isOperator;
$user->isReader = $documentPermission->isReader;
} else {
$user->isManager = false;
$user->isOperator = false;
$user->isReader = false;
}
}
$request = $request->withAttribute('user', $user);
return parent::process($request, $handler);
}
}
================================================
FILE: app/Middleware/CheckAuthMiddleware.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Logic\UserLogic;
use W7\Core\Middleware\MiddlewareAbstract;
class CheckAuthMiddleware extends MiddlewareAbstract
{
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$user = $request->session->get('user');
if (empty($user)) {
throw new ErrorHttpException('请先登录', [], Setting::ERROR_NO_LOGIN);
}
//如果修改密码后强制退出
if (empty($user['login_from_app']) && !icache()->has(sprintf(UserLogic::USER_LOGOUT_AFTER_CHANGE_PWD, $user['uid']))) {
$request->session->destroy();
throw new ErrorHttpException('请先登录', [], Setting::ERROR_NO_LOGIN);
}
$request = $request->withAttribute('user', UserLogic::instance()->getByUid($user['uid']));
return parent::process($request, $handler);
}
}
================================================
FILE: app/Middleware/CheckFounderMiddleware.php
================================================
<?php
/**
* @author donknap
* @date 19-12-16 上午10:56
*/
namespace W7\App\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use W7\App\Exception\ErrorHttpException;
use W7\Core\Middleware\MiddlewareAbstract;
class CheckFounderMiddleware extends MiddlewareAbstract
{
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$user = $request->getAttribute('user');
if (!$user->isFounder) {
throw new ErrorHttpException('只有创始人可以访问');
}
return parent::process($request, $handler);
}
}
================================================
FILE: app/Middleware/CorsApiMiddleware.php
================================================
<?php
/**
* WeEngine Team
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use W7\App;
class CorsApiMiddleware implements MiddlewareInterface
{
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$headerHost='*';
// $headerHost = $request->getHeader('origin');
// if (!$headerHost) {
// $headerHost = $request->getHeader('referer');
// }
// $headerHost = current($headerHost);
// $urlInfo = parse_url($headerHost);
// $headerHost = ($urlInfo['scheme'] ?? '') . '://' . ($urlInfo['host'] ?? '');
$response = \W7\Facade\Context::getResponse();
$header=$request->getHeaders();
$allowHeaders=[];
foreach ($header as $key =>$val){
$allowHeaders[count($allowHeaders)]=$key;
}
$response = $response->withHeader('Access-Control-Allow-Origin', $headerHost);
$response = $response->withHeader('Access-Control-Allow-Credentials', 'true');
$response = $response->withHeader('Access-Control-Allow-Headers', implode(',', $allowHeaders));
$response = $response->withHeader('Access-Control-Allow-Methods', 'POST, GET, DELETE, PUT, PATCH, OPTIONS');
if ($request->getMethod() == 'OPTIONS') {
return $response->json('success');
}
\W7\Facade\Context::setResponse($response);
return $handler->handle($request);
}
}
================================================
FILE: app/Middleware/FrontendDocumentPermissionMiddleware.php
================================================
<?php
/**
* WeEngine Document System
*
* (c) We7Team 2019 <https://www.w7.cc>
*
* This is not a free software
* Using it under the license terms
* visited https://www.w7.cc for more details
*/
namespace W7\App\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use W7\App\Exception\ErrorHttpException;
use W7\App\Model\Entity\Document;
use W7\App\Model\Entity\Setting;
use W7\App\Model\Entity\User;
use W7\App\Model\Logic\DocumentLogic;
use W7\App\Model\Logic\DocumentPermissionLogic;
use W7\App\Model\Logic\UserLogic;
use W7\Core\Middleware\MiddlewareAbstract;
class FrontendDocumentPermissionMiddleware extends MiddlewareAbstract
{
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$user = $request->session->get('user');
if (empty($user)) {
$user = new User();
} else {
/**
* @var User $user
*/
$user = UserLogic::instance()->getByUid($user['uid']);
}
$documentId = $request->input('document_id');
if (!$documentId) {
return parent::process($request, $handler);
}
$document = DocumentLogic::instance()->getById($documentId);
if (!$document) {
$request = $request->withAttribute('user', $user);
return parent::process($request, $handler);
}
$user->isReader = $user->isFounder;
if ($document->isPublicDoc) {
//公共目录
$user->isReader = true;
} else {
if (empty($user->id)) {
//未登录
throw new ErrorHttpException('请先登录', [], Setting::ERROR_NO_LOGIN);
}
//需要权限或者登录
if ($document->is_public == Document::PRIVATE_DOCUMENT && !empty($user->id)) {
$documentPermission = DocumentPermissionLogic::instance()->getByDocIdAndUid($documentId, $user->id);
if ($documentPermission) {
$user->isReader = $documentPermission->isReader;
}
} elseif ($docu
gitextract_l4ssw8zl/
├── .editorconfig
├── .gitignore
├── .php_cs
├── LICENSE
├── README.md
├── app/
│ ├── Command/
│ │ ├── Document/
│ │ │ └── CleanUpRecordsCommand.php
│ │ ├── Install/
│ │ │ ├── InitCommand.php
│ │ │ └── SyncDataCommand.php
│ │ ├── Todo/
│ │ │ └── CustomCommand.php
│ │ └── index.html
│ ├── Controller/
│ │ ├── Admin/
│ │ │ ├── ChapterController.php
│ │ │ ├── Document/
│ │ │ │ ├── ChapterApiController.php
│ │ │ │ └── ChapterApiDataController.php
│ │ │ ├── DocumentController.php
│ │ │ ├── DocumentHomeController.php
│ │ │ ├── FeedbackController.php
│ │ │ ├── HomepageSettingController.php
│ │ │ ├── MenuSettingController.php
│ │ │ ├── SettingController.php
│ │ │ ├── StarController.php
│ │ │ ├── ThirdPartyLoginController.php
│ │ │ ├── UploadController.php
│ │ │ ├── UserController.php
│ │ │ ├── UserOperateLogController.php
│ │ │ ├── UserShareController.php
│ │ │ └── index.html
│ │ ├── BaseController.php
│ │ ├── Common/
│ │ │ ├── AuthController.php
│ │ │ ├── MenuController.php
│ │ │ ├── UserController.php
│ │ │ └── VerifyCodeController.php
│ │ ├── Document/
│ │ │ ├── ChapterController.php
│ │ │ ├── DocumentController.php
│ │ │ ├── DocumentHomeController.php
│ │ │ ├── FeedbackController.php
│ │ │ └── MockApiReponseController.php
│ │ └── Install/
│ │ └── IndexController.php
│ ├── Exception/
│ │ ├── ErrorHttpException.php
│ │ └── InternalException.php
│ ├── Handler/
│ │ ├── Cache/
│ │ │ └── DbHandler.php
│ │ ├── Exception/
│ │ │ └── ExceptionHandler.php
│ │ └── Session/
│ │ ├── CacheHandler.php
│ │ └── DbHandler.php
│ ├── Helper/
│ │ └── Functions.php
│ ├── Listener/
│ │ └── index.html
│ ├── Message/
│ │ └── index.html
│ ├── Middleware/
│ │ ├── AppAuthMiddleware.php
│ │ ├── BackendDocumentPermissionMiddleware.php
│ │ ├── CheckAuthMiddleware.php
│ │ ├── CheckFounderMiddleware.php
│ │ ├── CorsApiMiddleware.php
│ │ └── FrontendDocumentPermissionMiddleware.php
│ ├── Model/
│ │ ├── Entity/
│ │ │ ├── App.php
│ │ │ ├── BaseModel.php
│ │ │ ├── Cache.php
│ │ │ ├── Document/
│ │ │ │ ├── Chapter.php
│ │ │ │ ├── ChapterApi.php
│ │ │ │ ├── ChapterApiData.php
│ │ │ │ ├── ChapterApiExtend.php
│ │ │ │ ├── ChapterApiParam.php
│ │ │ │ ├── ChapterApiReponse.php
│ │ │ │ └── ChapterContent.php
│ │ │ ├── Document.php
│ │ │ ├── DocumentFeedback.php
│ │ │ ├── DocumentHome.php
│ │ │ ├── DocumentPermission.php
│ │ │ ├── DocumentSearch.php
│ │ │ ├── Session.php
│ │ │ ├── Setting.php
│ │ │ ├── Star.php
│ │ │ ├── User.php
│ │ │ ├── UserOperateLog.php
│ │ │ └── UserThirdParty.php
│ │ ├── Logic/
│ │ │ ├── AppLogic.php
│ │ │ ├── BaseLogic.php
│ │ │ ├── ChapterLogic.php
│ │ │ ├── Document/
│ │ │ │ ├── ChapterApi/
│ │ │ │ │ ├── ChapterCommonLogic.php
│ │ │ │ │ ├── ChapterDemoLogic.php
│ │ │ │ │ ├── ChapterImportLogic.php
│ │ │ │ │ ├── ChapterRecordLogic.php
│ │ │ │ │ └── ChapterRuleLogic.php
│ │ │ │ ├── ChapterApiDataLogic.php
│ │ │ │ ├── ChapterApiLogic.php
│ │ │ │ ├── ChapterApiParamLogic.php
│ │ │ │ ├── ChapterContentLogic.php
│ │ │ │ └── MockApi/
│ │ │ │ └── MockApiReponseLogic.php
│ │ │ ├── DocumentFeedbackLogic.php
│ │ │ ├── DocumentHomeLogic.php
│ │ │ ├── DocumentLogic.php
│ │ │ ├── DocumentPermissionLogic.php
│ │ │ ├── DocumentSearchLogic.php
│ │ │ ├── HomepageSettingLogic.php
│ │ │ ├── Install/
│ │ │ │ └── InstallLogic.php
│ │ │ ├── MenuSettingLogic.php
│ │ │ ├── OauthLogic.php
│ │ │ ├── SettingLogic.php
│ │ │ ├── StarLogic.php
│ │ │ ├── ThirdPartyLoginLogic.php
│ │ │ ├── UserLogic.php
│ │ │ ├── UserOperateLogic.php
│ │ │ └── UserShareLogic.php
│ │ ├── Service/
│ │ │ ├── AES.php
│ │ │ ├── CdnLogic.php
│ │ │ ├── DbCacheLogic.php
│ │ │ └── SessionLogic.php
│ │ └── Validate/
│ │ └── index.html
│ ├── Process/
│ │ └── index.html
│ ├── Provider/
│ │ └── Socialite/
│ │ ├── ServiceProvider.php
│ │ └── ThirdPartyLogin/
│ │ ├── OauthTrait.php
│ │ ├── QQOauth.php
│ │ ├── We7Oauth.php
│ │ └── WechatOauth.php
│ ├── Task/
│ │ └── index.html
│ └── View/
│ └── index.html
├── bin/
│ ├── gerent
│ └── server
├── composer.json
├── config/
│ ├── app.php
│ ├── crontab.php
│ ├── define.php
│ ├── log.php
│ └── server.php
├── database/
│ ├── index.html
│ ├── migrations/
│ │ ├── 2020_01_02_194246_create_user_third_party.php
│ │ ├── 2020_02_17_121335_alter_setting.php
│ │ ├── 2020_03_02_153429_create_app.php
│ │ ├── 2020_03_03_152902_alter_star.php
│ │ ├── 2020_03_03_154818_alter_document.php
│ │ ├── 2020_03_23_114510_table_operate_log.php
│ │ ├── 2020_04_07_145338_create_document_chapter_api.php
│ │ ├── 2020_04_07_145420_create_document_chapter_api_param.php
│ │ ├── 2020_04_07_151451_create_document_chapter_api_extend.php
│ │ ├── 2020_05_27_092518_create_document_chapter_api_reponse_table.php
│ │ ├── 2020_06_11_145556_add_rule_to_document_chapter_api_param_table.php
│ │ ├── 2021_03_03_170511_create_document_feedback_table.php
│ │ ├── 2021_03_05_142937_create_document_chapter_api_data_table.php
│ │ ├── 2021_03_08_164459_alter_respond_to_document_chapter_api_data_table.php
│ │ ├── 2021_03_16_104941_create_document_home_table.php
│ │ ├── 2021_03_29_110505_create_document_search_hot_table.php
│ │ ├── 2021_04_09_100433_alter_user_table.php
│ │ └── index.html
│ └── seeds/
│ ├── DatabaseSeeder.php
│ └── index.html
├── docs/
│ ├── .gitignore
│ ├── build-dev.sh
│ ├── build.sh
│ ├── frontend/
│ │ └── apidoc.json
│ └── package.json
├── install/
│ └── document.sql
├── mockApi/
│ ├── .gitignore
│ ├── app.js
│ └── package.json
├── public/
│ ├── css/
│ │ ├── app.45a4fd9d.css
│ │ ├── chunk-06ade0a7.d9d343de.css
│ │ ├── chunk-079f5797.5ffb7ccc.css
│ │ ├── chunk-07e6273c.8f6be2eb.css
│ │ ├── chunk-10615ad3.8f32f691.css
│ │ ├── chunk-1e630799.23444e38.css
│ │ ├── chunk-20afbe1d.9cfc489e.css
│ │ ├── chunk-211c6b12.9850dd89.css
│ │ ├── chunk-22e40c8e.2d7343f0.css
│ │ ├── chunk-25f82f1a.3e053f1b.css
│ │ ├── chunk-3337dd8f.3c05d3bd.css
│ │ ├── chunk-3bcf66f7.0b7a87d8.css
│ │ ├── chunk-416ef35e.8e4636b1.css
│ │ ├── chunk-457e440b.d1b08c94.css
│ │ ├── chunk-564fade6.0e433876.css
│ │ ├── chunk-56652b45.339826ab.css
│ │ ├── chunk-57425795.c9955d2b.css
│ │ ├── chunk-5b1f82de.316d8ff0.css
│ │ ├── chunk-654f0b98.193fcd50.css
│ │ ├── chunk-65eafec3.169b0d4d.css
│ │ ├── chunk-6a2c3c1a.356edd1a.css
│ │ ├── chunk-7060d2be.ba342d3f.css
│ │ ├── chunk-71aaa888.b923ac67.css
│ │ ├── chunk-73af5400.9b10b85b.css
│ │ ├── chunk-775b8fab.d326fcb8.css
│ │ ├── chunk-a3879d6c.ffbb8d99.css
│ │ ├── chunk-ab7deece.39a1833e.css
│ │ ├── chunk-b09d1c24.5230f4f0.css
│ │ ├── chunk-b9b22232.3c05d3bd.css
│ │ ├── chunk-bd264252.3d26cc4c.css
│ │ ├── chunk-d779deb8.207190f3.css
│ │ ├── chunk-f66a53c0.e0f01506.css
│ │ └── chunk-vendors.1603aa5b.css
│ ├── index.html
│ └── js/
│ ├── app.9dc9e499.js
│ ├── chunk-06ade0a7.a7e4c7a7.js
│ ├── chunk-079f5797.19ae5348.js
│ ├── chunk-07e6273c.1984b9b7.js
│ ├── chunk-10615ad3.5901db24.js
│ ├── chunk-168777de.cb8bf66b.js
│ ├── chunk-1e630799.897fa4c7.js
│ ├── chunk-20afbe1d.bcdaad46.js
│ ├── chunk-211c6b12.01b14833.js
│ ├── chunk-22e40c8e.f3e7130f.js
│ ├── chunk-25f82f1a.e3262c66.js
│ ├── chunk-2d0ba2e6.ba43e34b.js
│ ├── chunk-2d22276a.90e5dc78.js
│ ├── chunk-3337dd8f.e12552ed.js
│ ├── chunk-3bcf66f7.da2788c2.js
│ ├── chunk-416ef35e.e3de812c.js
│ ├── chunk-457e440b.71326ed5.js
│ ├── chunk-564fade6.23bb5ce8.js
│ ├── chunk-56652b45.b9202ad0.js
│ ├── chunk-57425795.4709a7c2.js
│ ├── chunk-5b1f82de.b6b71a96.js
│ ├── chunk-654f0b98.4b5aff3b.js
│ ├── chunk-65eafec3.92b978b7.js
│ ├── chunk-6a2c3c1a.5e3ea521.js
│ ├── chunk-7060d2be.17de5f7a.js
│ ├── chunk-71aaa888.7c8286dc.js
│ ├── chunk-73af5400.5503ef14.js
│ ├── chunk-775b8fab.3c36ea5b.js
│ ├── chunk-a3879d6c.c1f2b764.js
│ ├── chunk-ab7deece.198a94a8.js
│ ├── chunk-b09d1c24.40e2b6cd.js
│ ├── chunk-b9b22232.9694579b.js
│ ├── chunk-bd264252.deae42c5.js
│ ├── chunk-d779deb8.cbfbc744.js
│ ├── chunk-f66a53c0.e61a0c3e.js
│ └── chunk-vendors.26b96680.js
├── releases.md
├── restart.sh
├── route/
│ ├── admin.php
│ ├── common.php
│ ├── document.php
│ └── install.php
├── tests/
│ └── PoolTest.php
└── tools/
├── build.sh
└── pre-commit
Showing preview only (285K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2535 symbols across 144 files)
FILE: app/Command/Document/CleanUpRecordsCommand.php
class CleanUpRecordsCommand (line 18) | class CleanUpRecordsCommand extends CommandAbstract
method configure (line 22) | protected function configure()
method handle (line 27) | protected function handle($options)
method clean (line 37) | public function clean()
FILE: app/Command/Install/InitCommand.php
class InitCommand (line 19) | class InitCommand extends CommandAbstract
method handle (line 21) | protected function handle($options)
method generateConfig (line 49) | private function generateConfig($config)
method initDatabase (line 84) | private function initDatabase($config)
method createAdmin (line 123) | private function createAdmin($config)
method checkExtension (line 153) | private function checkExtension()
method installConfig (line 190) | private function installConfig()
method segmentation (line 331) | private function segmentation()
FILE: app/Command/Install/SyncDataCommand.php
class SyncDataCommand (line 18) | class SyncDataCommand extends CommandAbstract
method handle (line 22) | protected function handle($options)
method checkExtension (line 64) | private function checkExtension()
method insertData (line 87) | private function insertData($get, $userDataBase, $tables, $file)
method getdata (line 198) | private function getdata($table, $get, $userDataBase)
method handleData (line 251) | private function handleData($data, $table)
method setContent (line 304) | private function setContent($i, $count, $sql, $handle)
method checkDatabase (line 315) | private function checkDatabase($database)
method segmentation (line 335) | private function segmentation()
FILE: app/Command/Todo/CustomCommand.php
class CustomCommand (line 17) | class CustomCommand extends CommandAbstract
method configure (line 21) | protected function configure()
method handle (line 26) | protected function handle($options)
FILE: app/Controller/Admin/ChapterController.php
class ChapterController (line 35) | class ChapterController extends BaseController
method detail (line 37) | public function detail(Request $request)
method create (line 79) | public function create(Request $request)
method update (line 159) | public function update(Request $request)
method sort (line 207) | public function sort(Request $request)
method delete (line 305) | public function delete(Request $request)
method save (line 384) | public function save(Request $request)
method content (line 485) | public function content(Request $request)
method defaultShow (line 542) | public function defaultShow(Request $request)
method search (line 595) | public function search(Request $request)
method copy (line 616) | public function copy(Request $request)
method import (line 695) | public function import(Request $request)
FILE: app/Controller/Admin/Document/ChapterApiController.php
class ChapterApiController (line 19) | class ChapterApiController extends BaseController
method getApiLabel (line 37) | public function getApiLabel(Request $request)
FILE: app/Controller/Admin/Document/ChapterApiDataController.php
class ChapterApiDataController (line 22) | class ChapterApiDataController extends BaseController
method setData (line 38) | public function setData(Request $request){
method getData (line 75) | public function getData(Request $request){
FILE: app/Controller/Admin/DocumentController.php
class DocumentController (line 31) | class DocumentController extends BaseController
method all (line 33) | public function all(Request $request)
method getAllByUid (line 157) | public function getAllByUid(Request $request)
method detail (line 234) | public function detail(Request $request)
method checkNewFeed (line 297) | public function checkNewFeed(Request $request){
method operator (line 315) | public function operator(Request $request)
method create (line 406) | public function create(Request $request)
method update (line 444) | public function update(Request $request)
method delete (line 487) | public function delete(Request $request)
method checkPermissionAndGetDocument (line 515) | private function checkPermissionAndGetDocument(Request $request)
method changeDocumentFounder (line 537) | public function changeDocumentFounder(Request $request)
FILE: app/Controller/Admin/DocumentHomeController.php
class DocumentHomeController (line 11) | class DocumentHomeController extends BaseController
method check (line 15) | private function check(Request $request)
method getList (line 34) | public function getList(Request $request){
method addHomeData (line 61) | public function addHomeData(Request $request){
method editHomeData (line 104) | public function editHomeData(Request $request){
method delHomeData (line 158) | public function delHomeData(Request $request){
method getType (line 182) | public function getType(Request $request){
method queryDocument (line 197) | public function queryDocument(Request $request){
FILE: app/Controller/Admin/FeedbackController.php
class FeedbackController (line 20) | class FeedbackController extends BaseController
method getList (line 33) | public function getList(Request $request){
method detail (line 81) | public function detail(Request $request){
FILE: app/Controller/Admin/HomepageSettingController.php
class HomepageSettingController (line 11) | class HomepageSettingController extends BaseController
method check (line 13) | private function check(Request $request)
method getHomePageSet (line 32) | public function getHomePageSet(Request $request){
method setOpenHome (line 47) | public function setOpenHome(Request $request){
method setHomeBanner (line 68) | public function setHomeBanner(Request $request){
method setHomeTtile (line 88) | public function setHomeTtile(Request $request){
FILE: app/Controller/Admin/MenuSettingController.php
class MenuSettingController (line 11) | class MenuSettingController extends BaseController
method check (line 13) | private function check(Request $request)
method all (line 22) | public function all(Request $request)
method add (line 29) | public function add(Request $request)
method getById (line 43) | public function getById(Request $request)
method updateById (line 57) | public function updateById(Request $request)
method deleteById (line 76) | public function deleteById(Request $request)
method setTheme (line 88) | public function setTheme(Request $request)
method getTheme (line 100) | public function getTheme(Request $request)
FILE: app/Controller/Admin/SettingController.php
class SettingController (line 21) | class SettingController extends BaseController
method config (line 28) | public function config(Request $request){
method cos (line 39) | public function cos(Request $request)
method save (line 54) | public function save(Request $request)
method saveCos (line 94) | private function saveCos(Request $request)
method check (line 133) | private function check(Request $request)
FILE: app/Controller/Admin/StarController.php
class StarController (line 13) | class StarController extends BaseController
method all (line 15) | public function all(Request $request)
method add (line 57) | public function add(Request $request)
method delete (line 95) | public function delete(Request $request)
FILE: app/Controller/Admin/ThirdPartyLoginController.php
class ThirdPartyLoginController (line 20) | class ThirdPartyLoginController extends BaseController
method check (line 22) | private function check(Request $request)
method all (line 31) | public function all(Request $request)
method getById (line 47) | public function getById(Request $request)
method add (line 60) | public function add(Request $request)
method updateById (line 91) | public function updateById(Request $request)
method deleteById (line 121) | public function deleteById(Request $request)
method setDefaultLoginChannel (line 135) | public function setDefaultLoginChannel(Request $request)
method getDefaultLoginChannel (line 149) | public function getDefaultLoginChannel(Request $request)
FILE: app/Controller/Admin/UploadController.php
class UploadController (line 22) | class UploadController extends BaseController
method image (line 24) | public function image(Request $request)
FILE: app/Controller/Admin/UserController.php
class UserController (line 25) | class UserController extends BaseController
method all (line 36) | public function all(Request $request)
method search (line 58) | public function search(Request $request)
method add (line 88) | public function add(Request $request)
method getById (line 119) | public function getById(Request $request)
method updateSelf (line 152) | public function updateSelf(Request $request)
method updateById (line 186) | public function updateById(Request $request)
method deleteByIds (line 224) | public function deleteByIds(Request $request)
method batchUpdateDocPermissionByUid (line 248) | public function batchUpdateDocPermissionByUid(Request $request)
FILE: app/Controller/Admin/UserOperateLogController.php
class UserOperateLogController (line 14) | class UserOperateLogController extends BaseController
method getUserReaderLog (line 21) | public function getUserReaderLog(Request $request)
method getByDocument (line 82) | public function getByDocument(Request $request)
method deleteById (line 120) | public function deleteById(Request $request)
FILE: app/Controller/Admin/UserShareController.php
class UserShareController (line 9) | class UserShareController extends BaseController
method shareUrl (line 11) | public function shareUrl(Request $request)
FILE: app/Controller/BaseController.php
class BaseController (line 12) | class BaseController extends ControllerAbstract
method data (line 14) | public function data($data = [], $message = 'ok', $code = 200)
FILE: app/Controller/Common/AuthController.php
class AuthController (line 28) | class AuthController extends BaseController
method user (line 30) | public function user(Request $request)
method login (line 72) | public function login(Request $request)
method method (line 108) | public function method(Request $request)
method defaultLoginUrl (line 142) | public function defaultLoginUrl(Request $request)
method thirdPartyLogin (line 180) | public function thirdPartyLogin(Request $request)
method ThirdPartyUserCacheIn (line 309) | public function ThirdPartyUserCacheIn(Request $request)
method changeThirdPartyUser (line 359) | public function changeThirdPartyUser(Request $request)
method bindThirdPartyUser (line 387) | public function bindThirdPartyUser(Request $request)
method setThirdPartySession (line 412) | public function setThirdPartySession(Request $request, $thirdPartyUser)
method thirdPartyLoginBind (line 450) | public function thirdPartyLoginBind(Request $request)
method unbind (line 532) | public function unbind(Request $request)
method logout (line 547) | public function logout(Request $request)
method getlogouturl (line 570) | public function getlogouturl(Request $request)
method saveUserInfo (line 576) | private function saveUserInfo(Session $session, $user)
FILE: app/Controller/Common/MenuController.php
class MenuController (line 9) | class MenuController extends BaseController
method setting (line 11) | public function setting(Request $request)
FILE: app/Controller/Common/UserController.php
class UserController (line 12) | class UserController extends BaseController
method info (line 20) | public function info(Request $request){
method update (line 31) | public function update(Request $request){
method operate (line 55) | public function operate(Request $request){
FILE: app/Controller/Common/VerifyCodeController.php
class VerifyCodeController (line 21) | class VerifyCodeController extends BaseController
method image (line 25) | public function image(Request $request)
FILE: app/Controller/Document/ChapterController.php
class ChapterController (line 32) | class ChapterController extends BaseController
method ruleDemo (line 43) | public function ruleDemo(Request $request)
method catalog (line 66) | public function catalog(Request $request)
method record (line 106) | public function record(Request $request)
method detail (line 139) | public function detail(Request $request)
method search (line 275) | public function search(Request $request)
method buildNavigationSun (line 319) | public function buildNavigationSun($chapterId, $str = '', $i = 0)
FILE: app/Controller/Document/DocumentController.php
class DocumentController (line 22) | class DocumentController extends BaseController
method detail (line 24) | public function detail(Request $request)
FILE: app/Controller/Document/DocumentHomeController.php
class DocumentHomeController (line 22) | class DocumentHomeController extends BaseController
method getDocumentHome (line 32) | public function getDocumentHome(Request $request){
method checkHome (line 62) | public function checkHome(){
method search (line 78) | public function search(Request $request){
method getSearchHot (line 97) | public function getSearchHot(){
FILE: app/Controller/Document/FeedbackController.php
class FeedbackController (line 20) | class FeedbackController extends BaseController
method add (line 34) | public function add(Request $request)
FILE: app/Controller/Document/MockApiReponseController.php
class MockApiReponseController (line 19) | class MockApiReponseController extends BaseController
method index (line 21) | public function index(Request $request, $id, $router)
FILE: app/Controller/Install/IndexController.php
class IndexController (line 20) | class IndexController extends BaseController
method config (line 22) | public function config(Request $request)
method isInstall (line 32) | public function isInstall()
method systemDetection (line 62) | public function systemDetection(Request $request)
method install (line 115) | public function install(Request $request)
FILE: app/Exception/ErrorHttpException.php
class ErrorHttpException (line 17) | class ErrorHttpException extends ResponseExceptionAbstract
method __construct (line 19) | public function __construct($message = '', $data = [], $code = 0, \Thr...
FILE: app/Exception/InternalException.php
class InternalException (line 17) | class InternalException extends ResponseExceptionAbstract
method __construct (line 19) | public function __construct($message = '', $code = 0, \Throwable $prev...
FILE: app/Handler/Cache/DbHandler.php
class DbHandler (line 18) | class DbHandler extends HandlerAbstract
method connect (line 22) | public static function connect($config): HandlerAbstract
method set (line 28) | public function set($key, $value, $ttl = null)
method get (line 33) | public function get($key, $default = null)
method has (line 38) | public function has($key)
method setMultiple (line 43) | public function setMultiple($values, $ttl = null)
method getMultiple (line 48) | public function getMultiple($keys, $default = null)
method delete (line 53) | public function delete($key)
method deleteMultiple (line 58) | public function deleteMultiple($keys)
method clear (line 63) | public function clear()
FILE: app/Handler/Exception/ExceptionHandler.php
class ExceptionHandler (line 31) | class ExceptionHandler extends ExceptionHandlerAbstract
method handle (line 33) | public function handle(\Throwable $e): Response
method getLoginUrl (line 89) | private function getLoginUrl($redirectUrl = null)
FILE: app/Handler/Session/CacheHandler.php
class CacheHandler (line 18) | class CacheHandler extends HandlerAbstract {
method getCache (line 19) | private function getCache() {
method destroy (line 23) | public function destroy($session_id) {
method write (line 27) | public function write($session_id, $session_data) {
method read (line 35) | public function read($session_id) {
method gc (line 39) | public function gc($maxlifetime) {
FILE: app/Handler/Session/DbHandler.php
class DbHandler (line 19) | class DbHandler extends HandlerAbstract
method read (line 21) | public function read($session_id)
method destroy (line 33) | public function destroy($session_id)
method write (line 39) | public function write($session_id, $session_data)
method gc (line 56) | public function gc($maxlifetime)
FILE: app/Helper/Functions.php
function timeToString (line 13) | function timeToString($time){
function hasForbidWords (line 25) | function hasForbidWords($content = ''){
function authcode (line 37) | function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0)
function generate_label (line 86) | function generate_label($name, $value, $isFormat = true)
function base_url (line 103) | function base_url()
FILE: app/Middleware/AppAuthMiddleware.php
class AppAuthMiddleware (line 14) | class AppAuthMiddleware extends MiddlewareAbstract
method process (line 16) | public function process(ServerRequestInterface $request, RequestHandle...
FILE: app/Middleware/BackendDocumentPermissionMiddleware.php
class BackendDocumentPermissionMiddleware (line 13) | class BackendDocumentPermissionMiddleware extends MiddlewareAbstract
method process (line 15) | public function process(ServerRequestInterface $request, RequestHandle...
FILE: app/Middleware/CheckAuthMiddleware.php
class CheckAuthMiddleware (line 23) | class CheckAuthMiddleware extends MiddlewareAbstract
method process (line 25) | public function process(ServerRequestInterface $request, RequestHandle...
FILE: app/Middleware/CheckFounderMiddleware.php
class CheckFounderMiddleware (line 15) | class CheckFounderMiddleware extends MiddlewareAbstract
method process (line 17) | public function process(ServerRequestInterface $request, RequestHandle...
FILE: app/Middleware/CorsApiMiddleware.php
class CorsApiMiddleware (line 21) | class CorsApiMiddleware implements MiddlewareInterface
method process (line 23) | public function process(ServerRequestInterface $request, RequestHandle...
FILE: app/Middleware/FrontendDocumentPermissionMiddleware.php
class FrontendDocumentPermissionMiddleware (line 27) | class FrontendDocumentPermissionMiddleware extends MiddlewareAbstract
method process (line 29) | public function process(ServerRequestInterface $request, RequestHandle...
FILE: app/Model/Entity/App.php
class App (line 5) | class App extends BaseModel
FILE: app/Model/Entity/BaseModel.php
class BaseModel (line 17) | class BaseModel extends ModelAbstract
method serializeDate (line 30) | protected function serializeDate(\DateTimeInterface $date)
FILE: app/Model/Entity/Cache.php
class Cache (line 15) | class Cache extends BaseModel
FILE: app/Model/Entity/Document.php
class Document (line 17) | class Document extends BaseModel
method user (line 28) | public function user()
method operator (line 37) | public function operator()
method getDescriptionShortAttribute (line 42) | public function getDescriptionShortAttribute()
method getIsPublicDocAttribute (line 47) | public function getIsPublicDocAttribute()
method getIsPrivateDocAttribute (line 52) | public function getIsPrivateDocAttribute()
method getIsLoginPreviewDocAttribute (line 57) | public function getIsLoginPreviewDocAttribute()
FILE: app/Model/Entity/Document/Chapter.php
class Chapter (line 18) | class Chapter extends BaseModel
method content (line 23) | public function content()
method document (line 28) | public function document()
method getPrevItemAttribute (line 33) | public function getPrevItemAttribute()
method getNextItemAttribute (line 39) | public function getNextItemAttribute()
FILE: app/Model/Entity/Document/ChapterApi.php
class ChapterApi (line 17) | class ChapterApi extends BaseModel
method methodLabel (line 39) | public function methodLabel()
FILE: app/Model/Entity/Document/ChapterApiData.php
class ChapterApiData (line 17) | class ChapterApiData extends BaseModel
FILE: app/Model/Entity/Document/ChapterApiExtend.php
class ChapterApiExtend (line 17) | class ChapterApiExtend extends BaseModel
FILE: app/Model/Entity/Document/ChapterApiParam.php
class ChapterApiParam (line 17) | class ChapterApiParam extends BaseModel
FILE: app/Model/Entity/Document/ChapterApiReponse.php
class ChapterApiReponse (line 17) | class ChapterApiReponse extends BaseModel
FILE: app/Model/Entity/Document/ChapterContent.php
class ChapterContent (line 17) | class ChapterContent extends BaseModel
FILE: app/Model/Entity/DocumentFeedback.php
class DocumentFeedback (line 15) | class DocumentFeedback extends BaseModel
method document (line 38) | public function document()
method user (line 43) | public function user()
method getTypeNameAttribute (line 49) | public function getTypeNameAttribute()
method getStatusTextAttribute (line 57) | public function getStatusTextAttribute(){
method getImagesAttribute (line 63) | public function getImagesAttribute(){
method getContentAttribute (line 67) | public function getContentAttribute(){
FILE: app/Model/Entity/DocumentHome.php
class DocumentHome (line 15) | class DocumentHome extends BaseModel
method document (line 25) | public function document()
method user (line 30) | public function user()
method getTypeNameAttribute (line 36) | public function getTypeNameAttribute()
method getDescriptionAttribute (line 42) | public function getDescriptionAttribute(){
FILE: app/Model/Entity/DocumentPermission.php
class DocumentPermission (line 15) | class DocumentPermission extends BaseModel
method save (line 29) | public function save(array $options = [])
method document (line 38) | public function document()
method user (line 43) | public function user()
method getIsManagerAttribute (line 48) | public function getIsManagerAttribute()
method getIsOperatorAttribute (line 53) | public function getIsOperatorAttribute()
method getIsReaderAttribute (line 58) | public function getIsReaderAttribute()
method getACLAttribute (line 63) | public function getACLAttribute()
method getACLNameAttribute (line 75) | public function getACLNameAttribute()
method getRoleListAttribute (line 80) | public function getRoleListAttribute()
FILE: app/Model/Entity/DocumentSearch.php
class DocumentSearch (line 15) | class DocumentSearch extends BaseModel
method getSearchWordAttribute (line 21) | public function getSearchWordAttribute(){
FILE: app/Model/Entity/Session.php
class Session (line 16) | class Session extends BaseModel
FILE: app/Model/Entity/Setting.php
class Setting (line 15) | class Setting extends BaseModel
method getSettingAttribute (line 26) | public function getSettingAttribute()
FILE: app/Model/Entity/Star.php
class Star (line 7) | class Star extends BaseModel
method setUpdatedAt (line 12) | public function setUpdatedAt($value)
method document (line 17) | public function document()
method chapter (line 22) | public function chapter()
FILE: app/Model/Entity/User.php
class User (line 24) | class User extends BaseModel
method document (line 31) | public function document()
method getIsFounderAttribute (line 36) | public function getIsFounderAttribute()
FILE: app/Model/Entity/UserOperateLog.php
class UserOperateLog (line 5) | class UserOperateLog extends BaseModel
method getTimeStrAttribute (line 21) | public function getTimeStrAttribute(){
method setUpdatedAt (line 24) | public function setUpdatedAt($value)
method user (line 29) | public function user()
method targetUser (line 34) | public function targetUser()
method document (line 39) | public function document()
method getOperateDescAttribute (line 44) | public function getOperateDescAttribute()
FILE: app/Model/Entity/UserThirdParty.php
class UserThirdParty (line 15) | class UserThirdParty extends BaseModel
method bindUser (line 21) | public function bindUser() {
FILE: app/Model/Logic/AppLogic.php
class AppLogic (line 7) | class AppLogic extends BaseLogic
method getByAppId (line 9) | public function getByAppId($appId)
method getSign (line 17) | public function getSign($data, $token = '')
FILE: app/Model/Logic/BaseLogic.php
class BaseLogic (line 18) | class BaseLogic extends LogicAbstract
method get (line 24) | public function get($key, $default=null)
method increment (line 29) | public function increment($key, $ttl=24*3600, $step=1)
method decrement (line 41) | public function decrement($key, $ttl, $step=1)
method set (line 53) | public function set($key, $value, $ttl=24*3600)
method delete (line 59) | public function delete($key)
method getCache (line 64) | public function getCache()
method generateKey (line 72) | public function generateKey($key)
FILE: app/Model/Logic/ChapterLogic.php
class ChapterLogic (line 26) | class ChapterLogic extends BaseLogic
method getCatalog (line 35) | public function getCatalog($documentId)
method getTree (line 57) | private function getTree($data, $pid = 0, $i = 0)
method getById (line 78) | public function getById($id, $documentId = 0)
method getMaxSort (line 91) | public function getMaxSort($parentId)
method deleteByDocumentId (line 96) | public function deleteByDocumentId($documentId)
method deleteById (line 113) | public function deleteById($chapterId)
method sortByChapter (line 145) | public function sortByChapter(Chapter $source, Chapter $target, $posit...
method moveByChapter (line 177) | public function moveByChapter(Chapter $source, Chapter $target)
method moveSunChapter (line 198) | public function moveSunChapter($source, $documentId)
method searchDocument (line 215) | public function searchDocument($id, $keyword)
method getPath (line 243) | public function getPath($parent_id)
method searchChapter (line 258) | public function searchChapter($id, $keywords)
FILE: app/Model/Logic/Document/ChapterApi/ChapterCommonLogic.php
class ChapterCommonLogic (line 17) | class ChapterCommonLogic
method is_assoc (line 20) | public function is_assoc($arr)
method isJson (line 27) | public function isJson($data = '', $assoc = false)
method urlToArray (line 42) | public function urlToArray($query)
method requestIds (line 55) | public function requestIds()
method reponseIds (line 68) | public function reponseIds()
FILE: app/Model/Logic/Document/ChapterApi/ChapterDemoLogic.php
class ChapterDemoLogic (line 18) | class ChapterDemoLogic extends ChapterCommonLogic
method __construct (line 22) | public function __construct($chapterId)
method getChapterDemo (line 28) | public function getChapterDemo($locationType, $type = 1, $locationList...
method getArrayToKeyValue (line 52) | public function getArrayToKeyValue($data, $type)
method getChapterDemoChildrenArray (line 74) | public function getChapterDemoChildrenArray($listChildren, $defaultVal...
FILE: app/Model/Logic/Document/ChapterApi/ChapterImportLogic.php
class ChapterImportLogic (line 20) | class ChapterImportLogic extends ChapterCommonLogic
method getApiparam (line 24) | public function getApiparam($data, $location, $type = 'key_word')
method formartToMock (line 68) | public function formartToMock(array $arr, $location, $mergeRecursive =...
method checkType (line 128) | public function checkType($oldtype, $uniqueMergeRecursive)
method buildArrayData (line 150) | public function buildArrayData($key, $val, $location)
method dataToJson (line 273) | public function dataToJson($arr)
method keyWordToData (line 359) | public function keyWordToData($keyWord)
method compatible (line 396) | public function compatible($data)
method buildData (line 418) | public function buildData($data, $dataTemp)
FILE: app/Model/Logic/Document/ChapterApi/ChapterRecordLogic.php
class ChapterRecordLogic (line 27) | class ChapterRecordLogic
method __construct (line 34) | public function __construct($chapterId)
method recordToMarkdown (line 42) | public function recordToMarkdown($record, $sqlType = 2)
method buildReponse (line 123) | public function buildReponse($reponse, $sqlType)
method deleteAllReponse (line 179) | public function deleteAllReponse($chapterId){
method buildBody (line 183) | public function buildBody($data, $sqlType, $chapterApiReponse = '')
method buildExtend (line 209) | public function buildExtend($data, $sqlType)
method bodySort (line 228) | public function bodySort($data)
method strLengthAdaptation (line 241) | public function strLengthAdaptation($str, $defaultLength = 20, $isRow ...
method bodyTableTop (line 263) | public function bodyTableTop($chapterApiReponse)
method getLocatinonText (line 296) | public function getLocatinonText($location)
method getEnabledText (line 305) | public function getEnabledText($enabled)
method buildApi (line 314) | public function buildApi($data, $sqlType)
method buildApiText (line 383) | public function buildApiText($data, $chapterId)
method buildApiBody (line 403) | public function buildApiBody($location, $data, $sqlType, $chapterApiRe...
method getTypeText (line 424) | public function getTypeText($type)
method getChildrenTop (line 433) | public function getChildrenTop($level)
method buildBodyChildren (line 438) | public function buildBodyChildren($location, $data, $level = 0, $paren...
method copyRecord (line 552) | public function copyRecord($newChapterId)
method copyBodyChildren (line 576) | public function copyBodyChildren($chapterId, $parentId, $newChapterId,...
method chapterApiParamData (line 591) | public function chapterApiParamData($chapterId, $location, $reponseId ...
method showRecord (line 602) | public function showRecord()
method getBodyInfo (line 648) | public function getBodyInfo($chapterId, $location, $reponseId = 0)
method getReponse (line 664) | public function getReponse($chapterId)
method getBody (line 691) | public function getBody($chapterId, $chapterApi)
method getChapterIdRecordIndex (line 701) | public function getChapterIdRecordIndex($chapterId)
method getBodyChildren (line 706) | public function getBodyChildren($chapterApiParamData, $parentId)
FILE: app/Model/Logic/Document/ChapterApi/ChapterRuleLogic.php
class ChapterRuleLogic (line 18) | class ChapterRuleLogic extends ChapterCommonLogic
method __construct (line 22) | public function __construct($chapterId)
method getChapterRuleMock (line 27) | public function getChapterRuleMock($reponseId)
method send_post (line 40) | public function send_post($url, $json)
method getChapterIdRequestIndex (line 57) | public function getChapterIdRequestIndex()
method getChapterIdReponseIndex (line 62) | public function getChapterIdReponseIndex($reponseId)
method getChapterRule (line 67) | public function getChapterRule($locationType, $reponseId = 0)
method getArrayToKeyValue (line 94) | public function getArrayToKeyValue($data, $type)
method getChapterDemoChildrenArray (line 116) | public function getChapterDemoChildrenArray($listChildren, $defaultVal...
FILE: app/Model/Logic/Document/ChapterApiDataLogic.php
class ChapterApiDataLogic (line 20) | class ChapterApiDataLogic extends BaseLogic
method deleteChapterApiData (line 24) | public function deleteChapterApiData($chapter_id){
method getByChapterApiData (line 32) | public function getByChapterApiData($chapter_id){
method getRandomChapterApiData (line 37) | public function getRandomChapterApiData($chapter_id){
FILE: app/Model/Logic/Document/ChapterApiLogic.php
class ChapterApiLogic (line 19) | class ChapterApiLogic extends BaseLogic
method getMethodLabel (line 23) | public function getMethodLabel()
method getStatusCode (line 45) | public function getStatusCode()
method getApiLabel (line 52) | public function getApiLabel()
FILE: app/Model/Logic/Document/ChapterApiParamLogic.php
class ChapterApiParamLogic (line 19) | class ChapterApiParamLogic extends BaseLogic
method rawContentType (line 23) | public function rawContentType()
method getLocationLabel (line 30) | public function getLocationLabel()
method getEnabledLabel (line 48) | public function getEnabledLabel()
method getTypeLabel (line 56) | public function getTypeLabel()
FILE: app/Model/Logic/Document/ChapterContentLogic.php
class ChapterContentLogic (line 19) | class ChapterContentLogic extends BaseLogic
method getLayoutLabel (line 23) | public function getLayoutLabel()
FILE: app/Model/Logic/Document/MockApi/MockApiReponseLogic.php
class MockApiReponseLogic (line 23) | class MockApiReponseLogic extends ChapterCommonLogic
method checkRequest (line 25) | public function checkRequest(Request $request, $api)
method mackMockApiReponse (line 68) | public function mackMockApiReponse(Request $request, $id, $route)
FILE: app/Model/Logic/DocumentFeedbackLogic.php
class DocumentFeedbackLogic (line 18) | class DocumentFeedbackLogic extends BaseLogic
method getByFeedbackDetail (line 22) | public function getByFeedbackDetail($id,$did)
method setByFeedbackStatus (line 32) | public function setByFeedbackStatus($id,$did){
method getByFeedbackNew (line 37) | public function getByFeedbackNew($document_id)
FILE: app/Model/Logic/DocumentHomeLogic.php
class DocumentHomeLogic (line 20) | class DocumentHomeLogic extends BaseLogic
method getTypeData (line 28) | public function getTypeData(){
method addHomeData (line 42) | public function addHomeData($params){
method editHomeData (line 65) | public function editHomeData($params){
method delHomeData (line 80) | public function delHomeData($id){
method getByHomeData (line 94) | public function getByHomeData($id){
method getListData (line 127) | public function getListData($type,$page,$pageSize){
method queryDocument (line 167) | public function queryDocument($name,$isPublic){
method getDocumentNotice (line 192) | public function getDocumentNotice(){
method getDocumentTypeI (line 219) | public function getDocumentTypeI(){
method getDocumentTypeII (line 250) | public function getDocumentTypeII(){
method searchDocument (line 277) | public function searchDocument($keyword,$page,$pageSize,$isPublic = 1){
method buildNavigationSun (line 310) | public function buildNavigationSun($chapterId, $str = '', $i = 0)
method getByChapter (line 339) | private function getByChapter($documentId)
method getByChapterChildren (line 365) | private function getByChapterChildren($chapterId){
method getByChapterList (line 390) | public function getByChapterList($documentId){
method getByChapterChildrenList (line 417) | private function getByChapterChildrenList(&$data,$children,&$k){
FILE: app/Model/Logic/DocumentLogic.php
class DocumentLogic (line 19) | class DocumentLogic extends BaseLogic
method getById (line 23) | public function getById($id)
method deleteByDocument (line 32) | public function deleteByDocument(Document $document)
method createCreatorPermission (line 52) | public function createCreatorPermission(Document $document)
method getDocByCreatorId (line 62) | public function getDocByCreatorId($id)
FILE: app/Model/Logic/DocumentPermissionLogic.php
class DocumentPermissionLogic (line 19) | class DocumentPermissionLogic extends BaseLogic
method getRoleList (line 23) | public function getRoleList()
method add (line 28) | public function add($documentId, $userId, $permission)
method updateByDocIdAndUid (line 46) | public function updateByDocIdAndUid($documentId, $userId, $permission)
method getByDocIdAndUid (line 73) | public function getByDocIdAndUid($documentId, $userId)
method getByDocIdAndPermission (line 78) | public function getByDocIdAndPermission($documentId, $permission)
method clearByDocId (line 88) | public function clearByDocId($documentId)
method clearByUid (line 98) | public function clearByUid($userId)
method getFounderACL (line 103) | public function getFounderACL()
FILE: app/Model/Logic/DocumentSearchLogic.php
class DocumentSearchLogic (line 18) | class DocumentSearchLogic extends BaseLogic
method addSearchHotWord (line 23) | public function addSearchHotWord($word){
method getSearchHotList (line 35) | public function getSearchHotList($limit=20){
FILE: app/Model/Logic/HomepageSettingLogic.php
class HomepageSettingLogic (line 9) | class HomepageSettingLogic extends BaseLogic
method getHomeSet (line 21) | public function getHomeSet()
method setOpenHome (line 35) | public function setOpenHome( array $config){
method setHomeBanner (line 45) | public function setHomeBanner(array $images){
method setHomeTitle (line 53) | public function setHomeTitle($name){
method getOpenHome (line 61) | public function getOpenHome()
method getHomeBanner (line 74) | public function getHomeBanner(){
method getHomeTitle (line 86) | public function getHomeTitle(){
FILE: app/Model/Logic/Install/InstallLogic.php
class InstallLogic (line 18) | class InstallLogic
method install (line 20) | public function install($config)
method initDatabase (line 85) | private function initDatabase($config)
method createAdmin (line 119) | private function createAdmin($config)
method generateConfig (line 149) | private function generateConfig($config)
method checkExtension (line 179) | private function checkExtension()
FILE: app/Model/Logic/MenuSettingLogic.php
class MenuSettingLogic (line 7) | class MenuSettingLogic extends BaseLogic
method all (line 13) | public function all()
method getMenuSetting (line 24) | public function getMenuSetting()
method add (line 34) | public function add(array $config)
method getById (line 43) | public function getById($id)
method updateById (line 49) | public function updateById($id, array $config)
method deleteById (line 59) | public function deleteById($id)
method setTheme (line 70) | public function setTheme($theme)
method getTheme (line 77) | public function getTheme()
FILE: app/Model/Logic/OauthLogic.php
class OauthLogic (line 18) | class OauthLogic extends BaseLogic
method getThirdPartyUserByUsernameUid (line 22) | public function getThirdPartyUserByUsernameUid($uid, $username)
FILE: app/Model/Logic/SettingLogic.php
class SettingLogic (line 18) | class SettingLogic extends BaseLogic
method getByKey (line 27) | public function getByKey($key, $hide = 1)
method showHide (line 36) | public function showHide($key, $data)
method save (line 62) | public function save($key, $data)
FILE: app/Model/Logic/StarLogic.php
class StarLogic (line 8) | class StarLogic extends BaseLogic
method clearByDocumentId (line 12) | public function clearByDocumentId($documentId)
method clearByUid (line 17) | public function clearByUid($userId)
method clearByChapterId (line 22) | public function clearByChapterId($chapterId)
FILE: app/Model/Logic/ThirdPartyLoginLogic.php
class ThirdPartyLoginLogic (line 17) | class ThirdPartyLoginLogic extends BaseLogic
method __construct (line 23) | public function __construct()
method getThirdPartyLoginSetting (line 56) | public function getThirdPartyLoginSetting($hide = 0)
method getThirdPartyLoginChannelById (line 66) | public function getThirdPartyLoginChannelById($id, $hide = 0)
method deleteThirdPartyLoginChannelById (line 78) | public function deleteThirdPartyLoginChannelById($id)
method addThirdPartyLoginChannel (line 95) | public function addThirdPartyLoginChannel(array $config)
method updateThirdPartyLoginChannelById (line 103) | public function updateThirdPartyLoginChannelById($id, array $config)
method setDefaultLoginSetting (line 125) | public function setDefaultLoginSetting(array $data)
method getDefaultLoginSetting (line 132) | public function getDefaultLoginSetting()
FILE: app/Model/Logic/UserLogic.php
class UserLogic (line 18) | class UserLogic extends BaseLogic
method getByUserName (line 29) | public function getByUserName($username)
method getByUid (line 34) | public function getByUid($uid)
method createUser (line 39) | public function createUser($data)
method createBucket (line 56) | public function createBucket($username, $avatar = '') {
method updateUser (line 78) | public function updateUser($userInfo)
method deleteByIds (line 99) | public function deleteByIds(array $ids)
method userPwdEncryption (line 125) | public function userPwdEncryption($username, $userpass)
FILE: app/Model/Logic/UserOperateLogic.php
class UserOperateLogic (line 9) | class UserOperateLogic extends BaseLogic
method getByChapterAndOperate (line 13) | public function getByChapterAndOperate($chapterId, $operate)
method clearByUid (line 18) | public function clearByUid($userId)
method clearByDocId (line 23) | public function clearByDocId($documentId)
method lists (line 28) | public function lists($where = [], $page = 1, $size = 20, $hasCreateCh...
FILE: app/Model/Logic/UserShareLogic.php
class UserShareLogic (line 7) | class UserShareLogic extends BaseLogic
method getShareUrl (line 13) | public function getShareUrl($userId, $documentId, $chapterId)
method getUidAndChapterByShareKey (line 18) | public function getUidAndChapterByShareKey($shareKey)
FILE: app/Model/Service/AES.php
class AES (line 7) | class AES
method __construct (line 26) | public function __construct($key="w7document"){
method initialize (line 36) | public function initialize($params)
method encrypt (line 50) | public function encrypt($data) {
method decrypt (line 61) | public function decrypt($data) {
FILE: app/Model/Service/CdnLogic.php
class CdnLogic (line 24) | class CdnLogic extends LogicAbstract
method __construct (line 36) | public function __construct()
method connection (line 45) | public function connection($channel = '')
method channel (line 78) | public function channel($channel, $runTestBucket = false)
method uploadFile (line 131) | public function uploadFile($uploadPath, $realPath)
method getDirFiles (line 155) | public function getDirFiles($dir = ''): array
method getFileUrl (line 177) | public function getFileUrl($uploadFile, $timeout = null)
method deleteFile (line 192) | public function deleteFile($uploadFile)
method deletePath (line 222) | public function deletePath($path)
method convertUrl (line 240) | public function convertUrl($uploadPath, $returnOld = false)
method replacePublicRootUrl (line 255) | private function replacePublicRootUrl($url)
method replacePublicRootPath (line 270) | private function replacePublicRootPath($path)
FILE: app/Model/Service/DbCacheLogic.php
class DbCacheLogic (line 19) | class DbCacheLogic extends LogicAbstract
method set (line 23) | public function set($key, $value, $ttl = null)
method get (line 37) | public function get($key, $default = null)
method has (line 48) | public function has($key)
method setMultiple (line 54) | public function setMultiple($values, $ttl = null)
method getMultiple (line 62) | public function getMultiple($keys, $default = null)
method delete (line 71) | public function delete($key)
method deleteMultiple (line 82) | public function deleteMultiple($keys)
method clear (line 90) | public function clear()
FILE: app/Model/Service/SessionLogic.php
class SessionLogic (line 19) | class SessionLogic extends LogicAbstract
method getBySessionId (line 23) | public function getBySessionId($sessionId)
method deleteBySessionId (line 28) | public function deleteBySessionId($sessionId)
FILE: app/Provider/Socialite/ServiceProvider.php
class ServiceProvider (line 9) | class ServiceProvider extends ProviderAbstract
method register (line 11) | public function register()
method registerSocialiteManager (line 17) | private function registerSocialiteManager()
method registerThirdPartyLogin (line 24) | private function registerThirdPartyLogin()
FILE: app/Provider/Socialite/ThirdPartyLogin/OauthTrait.php
type OauthTrait (line 10) | trait OauthTrait
method initConfig (line 15) | private function initConfig()
method getAppUnionId (line 25) | abstract public function getAppUnionId();
method getTokenUrl (line 32) | protected function getTokenUrl()
method getUserInfoUrl (line 38) | protected function getUserInfoUrl()
method mapUserToObject (line 51) | protected function mapUserToObject(array $user)
method logout (line 64) | public function logout(Response $response): Response
FILE: app/Provider/Socialite/ThirdPartyLogin/QQOauth.php
class QQOauth (line 8) | class QQOauth extends QQProvider
method getAppUnionId (line 12) | public function getAppUnionId()
method getTokenUrl (line 22) | protected function getTokenUrl()
method getUserByToken (line 27) | protected function getUserByToken(AccessTokenInterface $token)
FILE: app/Provider/Socialite/ThirdPartyLogin/We7Oauth.php
class We7Oauth (line 21) | class We7Oauth extends AbstractProvider implements ProviderInterface
method getAppUnionId (line 25) | public function getAppUnionId()
method getAuthUrl (line 30) | protected function getAuthUrl($state)
method getTokenFields (line 66) | protected function getTokenFields($code)
method getSign (line 76) | public function getSign($data, $appsecret = '')
method getAccessToken (line 94) | public function getAccessToken($code)
method getUserByToken (line 111) | protected function getUserByToken(AccessTokenInterface $token)
method logout (line 124) | public function logout(Response $psrResponse): Response
FILE: app/Provider/Socialite/ThirdPartyLogin/WechatOauth.php
class WechatOauth (line 7) | class WechatOauth extends WeChatProvider
method getAppUnionId (line 11) | public function getAppUnionId()
method getTokenUrl (line 20) | protected function getTokenUrl()
FILE: database/migrations/2020_01_02_194246_create_user_third_party.php
class CreateUserThirdParty (line 6) | class CreateUserThirdParty extends Migration {
method up (line 12) | public function up() {
method down (line 27) | public function down() {
FILE: database/migrations/2020_02_17_121335_alter_setting.php
class AlterSetting (line 6) | class AlterSetting extends Migration {
method up (line 12) | public function up() {
method down (line 23) | public function down() {
FILE: database/migrations/2020_03_02_153429_create_app.php
class CreateApp (line 6) | class CreateApp extends Migration {
method up (line 12) | public function up() {
method down (line 27) | public function down() {
FILE: database/migrations/2020_03_03_152902_alter_star.php
class AlterStar (line 6) | class AlterStar extends Migration {
method up (line 12) | public function up() {
method down (line 25) | public function down() {
FILE: database/migrations/2020_03_03_154818_alter_document.php
class AlterDocument (line 6) | class AlterDocument extends Migration {
method up (line 12) | public function up() {
method down (line 23) | public function down() {
FILE: database/migrations/2020_03_23_114510_table_operate_log.php
class TableOperateLog (line 6) | class TableOperateLog extends Migration {
method up (line 12) | public function up() {
method down (line 23) | public function down() {
FILE: database/migrations/2020_04_07_145338_create_document_chapter_api.php
class CreateDocumentChapterApi (line 16) | class CreateDocumentChapterApi extends Migration
method up (line 23) | public function up()
method down (line 42) | public function down()
FILE: database/migrations/2020_04_07_145420_create_document_chapter_api_param.php
class CreateDocumentChapterApiParam (line 16) | class CreateDocumentChapterApiParam extends Migration
method up (line 23) | public function up()
method down (line 44) | public function down()
FILE: database/migrations/2020_04_07_151451_create_document_chapter_api_extend.php
class CreateDocumentChapterApiExtend (line 16) | class CreateDocumentChapterApiExtend extends Migration
method up (line 23) | public function up()
method down (line 38) | public function down()
FILE: database/migrations/2020_05_27_092518_create_document_chapter_api_reponse_table.php
class CreateDocumentChapterApiReponseTable2020_05_27_092518 (line 16) | class CreateDocumentChapterApiReponseTable2020_05_27_092518 extends Migr...
method up (line 23) | public function up()
method down (line 41) | public function down()
FILE: database/migrations/2020_06_11_145556_add_rule_to_document_chapter_api_param_table.php
class AddRuleToDocumentChapterApiParamTable2020_06_11_145556 (line 16) | class AddRuleToDocumentChapterApiParamTable2020_06_11_145556 extends Mig...
method up (line 23) | public function up()
method down (line 35) | public function down()
FILE: database/migrations/2021_03_03_170511_create_document_feedback_table.php
class CreateDocumentFeedbackTable2021_03_03_170511 (line 6) | class CreateDocumentFeedbackTable2021_03_03_170511 extends Migration {
method up (line 12) | public function up() {
method down (line 31) | public function down() {
FILE: database/migrations/2021_03_05_142937_create_document_chapter_api_data_table.php
class CreateDocumentChapterApiDataTable2021_03_05_142937 (line 6) | class CreateDocumentChapterApiDataTable2021_03_05_142937 extends Migrati...
method up (line 12) | public function up() {
method down (line 26) | public function down() {
FILE: database/migrations/2021_03_08_164459_alter_respond_to_document_chapter_api_data_table.php
class AlterRespondToDocumentChapterApiDataTable2021_03_08_164459 (line 6) | class AlterRespondToDocumentChapterApiDataTable2021_03_08_164459 extends...
method up (line 12) | public function up() {
method down (line 23) | public function down() {
FILE: database/migrations/2021_03_16_104941_create_document_home_table.php
class CreateDocumentHomeTable2021_03_16_104941 (line 6) | class CreateDocumentHomeTable2021_03_16_104941 extends Migration {
method up (line 12) | public function up() {
method down (line 33) | public function down() {
FILE: database/migrations/2021_03_29_110505_create_document_search_hot_table.php
class CreateDocumentSearchHotTable2021_03_29_110505 (line 6) | class CreateDocumentSearchHotTable2021_03_29_110505 extends Migration {
method up (line 12) | public function up() {
method down (line 27) | public function down() {
FILE: database/migrations/2021_04_09_100433_alter_user_table.php
class AlterUserTable2021_04_09_100433 (line 6) | class AlterUserTable2021_04_09_100433 extends Migration {
method up (line 12) | public function up() {
method down (line 28) | public function down() {
FILE: database/seeds/DatabaseSeeder.php
class DatabaseSeeder (line 5) | class DatabaseSeeder extends Seeder {
method run (line 11) | public function run() {
FILE: install/document.sql
type `ims_app` (line 22) | CREATE TABLE `ims_app` (
type `ims_cache` (line 39) | CREATE TABLE `ims_cache` (
type `ims_document` (line 56) | CREATE TABLE `ims_document` (
type `ims_document_chapter` (line 78) | CREATE TABLE `ims_document_chapter` (
type `ims_document_chapter_api` (line 101) | CREATE TABLE `ims_document_chapter_api` (
type `ims_document_chapter_api_extend` (line 121) | CREATE TABLE `ims_document_chapter_api_extend` (
type `ims_document_chapter_api_param` (line 137) | CREATE TABLE `ims_document_chapter_api_param` (
type `ims_document_chapter_api_reponse` (line 161) | CREATE TABLE `ims_document_chapter_api_reponse` (
type `ims_document_chapter_content` (line 177) | CREATE TABLE `ims_document_chapter_content` (
type `ims_document_permission` (line 194) | CREATE TABLE `ims_document_permission` (
type `ims_migration` (line 212) | CREATE TABLE `ims_migration` (
type `ims_session` (line 238) | CREATE TABLE `ims_session` (
type `ims_setting` (line 255) | CREATE TABLE `ims_setting` (
type `ims_user` (line 270) | CREATE TABLE `ims_user` (
type `ims_user_operate_log` (line 292) | CREATE TABLE `ims_user_operate_log` (
type `ims_user_star` (line 312) | CREATE TABLE `ims_user_star` (
type `ims_user_third_party` (line 330) | CREATE TABLE `ims_user_third_party` (
FILE: mockApi/app.js
function treeToTemplate (line 29) | function treeToTemplate(tree, num = 0) {
function romoveSlash (line 159) | function romoveSlash(obj) {
FILE: public/js/app.9dc9e499.js
function e (line 1) | function e(e){for(var a,c,o=e[0],d=e[1],i=e[2],h=0,f=[];h<o.length;h++)c...
function t (line 1) | function t(){for(var n,e=0;e<r.length;e++){for(var t=r[e],a=!0,c=1;c<t.l...
function o (line 1) | function o(n){return d.p+"js/"+({}[n]||n)+"."+{"chunk-079f5797":"19ae534...
function d (line 1) | function d(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{...
FILE: public/js/chunk-06ade0a7.a7e4c7a7.js
function k (line 1) | function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}
function O (line 1) | function O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firs...
function D (line 1) | function D(e,t){return O(e).appendChild(t)}
function M (line 1) | function M(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r...
function A (line 1) | function A(e,t,r,n){var i=M(e,t,r,n);return i.setAttribute("role","prese...
function N (line 1) | function N(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.c...
function E (line 1) | function E(){var e;try{e=document.activeElement}catch(t){e=document.body...
function L (line 1) | function L(e,t){var r=e.className;k(t).test(r)||(e.className+=(r?" ":"")...
function P (line 1) | function P(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!k(r[n])...
function I (line 1) | function I(e){var t=Array.prototype.slice.call(arguments,1);return funct...
function W (line 1) | function W(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&...
function B (line 1) | function B(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.le...
function H (line 1) | function H(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}
function K (line 1) | function K(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e...
function V (line 1) | function V(e){while(J.length<=e)J.push(G(J)+" ");return J[e]}
function G (line 1) | function G(e){return e[e.length-1]}
function X (line 1) | function X(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}
function Y (line 1) | function Y(e,t,r){var n=0,i=r(t);while(n<e.length&&r(e[n])<=i)n++;e.spli...
function Q (line 1) | function Q(){}
function Z (line 1) | function Z(e,t){var r;return Object.create?r=Object.create(e):(Q.prototy...
function te (line 1) | function te(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCas...
function re (line 1) | function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(...
function ne (line 1) | function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;retu...
function oe (line 1) | function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}
function ae (line 1) | function ae(e,t,r){while((r<0?t>0:t<e.length)&&oe(e.charAt(t)))t+=r;retu...
function se (line 1) | function se(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,...
function le (line 1) | function le(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.le...
function ue (line 1) | function ue(e,t,r){var n;ce=null;for(var i=0;i<e.length;++i){var o=e[i];...
function r (line 1) | function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<...
function l (line 1) | function l(e,t,r){this.level=e,this.from=t,this.to=r}
function fe (line 1) | function fe(e,t){var r=e.order;return null==r&&(r=e.order=de(e.text,t)),r}
function me (line 1) | function me(e,t){return e._handlers&&e._handlers[t]||he}
function ge (line 1) | function ge(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1...
function ve (line 1) | function ve(e,t){var r=me(e,t);if(r.length)for(var n=Array.prototype.sli...
function ye (line 1) | function ye(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:f...
function _e (line 1) | function _e(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(va...
function be (line 1) | function be(e,t){return me(e,t).length>0}
function we (line 1) | function we(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.of...
function Ce (line 1) | function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}
function xe (line 1) | function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}
function ke (line 1) | function ke(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.r...
function Te (line 1) | function Te(e){Ce(e),xe(e)}
function Se (line 1) | function Se(e){return e.target||e.srcElement}
function Oe (line 1) | function Oe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?...
function Ne (line 1) | function Ne(e){if(null==De){var t=M("span","");D(e,M("span",[t,document...
function Ee (line 1) | function Ee(e){if(null!=Me)return Me;var t=D(e,document.createTextNode("...
function We (line 1) | function We(e){if(null!=Ie)return Ie;var t=D(e,M("span","x")),r=t.getBou...
function He (line 1) | function He(e,t){arguments.length>2&&(t.dependencies=Array.prototype.sli...
function Fe (line 1) | function Fe(e,t){je[e]=t}
function $e (line 1) | function $e(e){if("string"==typeof e&&je.hasOwnProperty(e))e=je[e];else ...
function Ue (line 1) | function Ue(e,t){t=$e(t);var r=Be[t.name];if(!r)return Ue(e,"text/plain"...
function ze (line 1) | function ze(e,t){var r=qe.hasOwnProperty(e)?qe[e]:qe[e]={};W(t,r)}
function Ke (line 1) | function Ke(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t)...
function Je (line 1) | function Je(e,t){var r;while(e.innerMode){if(r=e.innerMode(t),!r||r.mode...
function Ve (line 1) | function Ve(e,t,r){return!e.startState||e.startState(t,r)}
function Xe (line 1) | function Xe(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is ...
function Ye (line 1) | function Ye(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,(func...
function Qe (line 1) | function Qe(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text...
function Ze (line 1) | function Ze(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height...
function et (line 1) | function et(e){if(null==e.parent)return null;for(var t=e.parent,r=H(t.li...
function tt (line 1) | function tt(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n)...
function rt (line 1) | function rt(e,t){return t>=e.first&&t<e.first+e.size}
function nt (line 1) | function nt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}
function it (line 1) | function it(e,t,r){if(void 0===r&&(r=null),!(this instanceof it))return ...
function ot (line 1) | function ot(e,t){return e.line-t.line||e.ch-t.ch}
function at (line 1) | function at(e,t){return e.sticky==t.sticky&&0==ot(e,t)}
function st (line 1) | function st(e){return it(e.line,e.ch)}
function lt (line 1) | function lt(e,t){return ot(e,t)<0?t:e}
function ct (line 1) | function ct(e,t){return ot(e,t)<0?e:t}
function ut (line 1) | function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}
function dt (line 1) | function dt(e,t){if(t.line<e.first)return it(e.first,0);var r=e.first+e....
function ft (line 1) | function ft(e,t){var r=e.ch;return null==r||r>t?it(e.line,t):r<0?it(e.li...
function ht (line 1) | function ht(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=dt(e,t[n]);return r}
function gt (line 1) | function gt(e,t,r,n){var i=[e.state.modeGen],o={};Tt(e,t.text,e.doc.mode...
function vt (line 1) | function vt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=yt(...
function yt (line 1) | function yt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return ...
function _t (line 1) | function _t(e,t,r,n){var i=e.doc.mode,o=new Ge(t,e.options.tabSize,r);o....
function bt (line 1) | function bt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){va...
function wt (line 1) | function wt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Je(e,r).mode);var o=...
function xt (line 1) | function xt(e,t,r,n){var i,o=e.doc,a=o.mode;t=dt(o,t);var s,l=Xe(o,t.lin...
function kt (line 1) | function kt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)...
function Tt (line 1) | function Tt(e,t,r,n,i,o,a){var s=r.flattenSpans;null==s&&(s=e.options.fl...
function St (line 1) | function St(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e...
function Ot (line 1) | function Ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highli...
function At (line 1) | function At(){Dt=!0}
function Nt (line 1) | function Nt(){Mt=!0}
function Et (line 1) | function Et(e,t,r){this.marker=e,this.from=t,this.to=r}
function Lt (line 1) | function Lt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker...
function Pt (line 1) | function Pt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(...
function Rt (line 1) | function Rt(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[...
function It (line 1) | function It(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o...
function Wt (line 1) | function Wt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o...
function Bt (line 1) | function Bt(e,t){if(t.full)return null;var r=rt(e,t.from.line)&&Xe(e,t.f...
function jt (line 1) | function jt(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.fr...
function Ht (line 1) | function Ht(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(...
function Ft (line 1) | function Ft(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r]...
function $t (line 1) | function $t(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine...
function Ut (line 1) | function Ut(e){return e.inclusiveLeft?-1:0}
function qt (line 1) | function qt(e){return e.inclusiveRight?1:0}
function zt (line 1) | function zt(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;va...
function Kt (line 1) | function Kt(e,t){var r,n=Mt&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n...
function Jt (line 1) | function Jt(e){return Kt(e,!0)}
function Vt (line 1) | function Vt(e){return Kt(e,!1)}
function Gt (line 1) | function Gt(e,t){var r,n=Mt&&e.markedSpans;if(n)for(var i=0;i<n.length;+...
function Xt (line 1) | function Xt(e,t,r,n,i){var o=Xe(e,t),a=Mt&&o.markedSpans;if(a)for(var s=...
function Yt (line 1) | function Yt(e){var t;while(t=Jt(e))e=t.find(-1,!0).line;return e}
function Qt (line 1) | function Qt(e){var t;while(t=Vt(e))e=t.find(1,!0).line;return e}
function Zt (line 1) | function Zt(e){var t,r;while(t=Vt(e))e=t.find(1,!0).line,(r||(r=[])).pus...
function er (line 1) | function er(e,t){var r=Xe(e,t),n=Yt(r);return r==n?t:et(n)}
function tr (line 1) | function tr(e,t){if(t>e.lastLine())return t;var r,n=Xe(e,t);if(!rr(e,n))...
function rr (line 1) | function rr(e,t){var r=Mt&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.l...
function nr (line 1) | function nr(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return nr(e,...
function ir (line 1) | function ir(e){e=Yt(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){...
function or (line 1) | function or(e){if(0==e.height)return 0;var t,r=e.text.length,n=e;while(t...
function ar (line 1) | function ar(e){var t=e.display,r=e.doc;t.maxLine=Xe(r,r.first),t.maxLine...
function lr (line 1) | function lr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles...
function cr (line 1) | function cr(e){e.parent=null,Ft(e)}
function fr (line 1) | function fr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass...
function hr (line 1) | function hr(e,t){var r=A("span",null,null,l?"padding-right: .1px":null),...
function pr (line 1) | function pr(e){var t=M("span","•","cm-invalidchar");return t.title="\\u"...
function mr (line 1) | function mr(e,t,r,n,i,o,l){if(t){var c,u=e.splitSpaces?gr(t,e.trailingSp...
function gr (line 1) | function gr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",...
function vr (line 1) | function vr(e,t){return function(r,n,i,o,a,s,l){i=i?i+" cm-force-border"...
function yr (line 1) | function yr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,...
function _r (line 1) | function _r(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,s,l,c...
function br (line 1) | function br(e,t,r){this.line=t,this.rest=Zt(t),this.size=this.rest?et(G(...
function wr (line 1) | function wr(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new br(e.doc,Xe(e.d...
function xr (line 1) | function xr(e){Cr?Cr.ops.push(e):e.ownsGroup=Cr={ops:[e],delayedCallback...
function kr (line 1) | function kr(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r]....
function Tr (line 1) | function Tr(e,t){var r=e.ownsGroup;if(r)try{kr(r)}finally{Cr=null,t(r)}}
function Or (line 1) | function Or(e,t){var r=me(e,t);if(r.length){var n,i=Array.prototype.slic...
function Dr (line 1) | function Dr(){var e=Sr;Sr=null;for(var t=0;t<e.length;++t)e[t]()}
function Mr (line 1) | function Mr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes...
function Ar (line 1) | function Ar(e){return e.node==e.text&&(e.node=M("div",null,null,"positio...
function Nr (line 1) | function Nr(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.li...
function Er (line 1) | function Er(e,t){var r=e.display.externalMeasured;return r&&r.line==t.li...
function Lr (line 1) | function Lr(e,t){var r=t.text.className,n=Er(e,t);t.text==t.node&&(t.nod...
function Pr (line 1) | function Pr(e,t){Nr(e,t),t.line.wrapClass?Ar(t).className=t.line.wrapCla...
function Rr (line 1) | function Rr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter...
function Ir (line 1) | function Ir(e,t,r){t.alignable&&(t.alignable=null);for(var n=k("CodeMirr...
function Wr (line 1) | function Wr(e,t,r,n){var i=Er(e,t);return t.text=t.node=i.pre,i.bgClass&...
function Br (line 1) | function Br(e,t,r){if(jr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.le...
function jr (line 1) | function jr(e,t,r,n,i){if(t.widgets)for(var o=Ar(r),a=0,s=t.widgets;a<s....
function Hr (line 1) | function Hr(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).pus...
function Fr (line 1) | function Fr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)re...
function $r (line 1) | function $r(e,t){for(var r=Se(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r...
function Ur (line 1) | function Ur(e){return e.lineSpace.offsetTop}
function qr (line 1) | function qr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}
function zr (line 1) | function zr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=D(e.mea...
function Kr (line 1) | function Kr(e){return F-e.display.nativeBarWidth}
function Jr (line 1) | function Jr(e){return e.display.scroller.clientWidth-Kr(e)-e.display.bar...
function Vr (line 1) | function Vr(e){return e.display.scroller.clientHeight-Kr(e)-e.display.ba...
function Gr (line 1) | function Gr(e,t,r){var n=e.options.lineWrapping,i=n&&Jr(e);if(!t.measure...
function Xr (line 1) | function Xr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure...
function Yr (line 1) | function Yr(e,t){t=Yt(t);var r=et(t),n=e.display.externalMeasured=new br...
function Qr (line 1) | function Qr(e,t,r,n){return tn(e,en(e,t),r,n)}
function Zr (line 1) | function Zr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.d...
function en (line 1) | function en(e,t){var r=et(t),n=Zr(e,r);n&&!n.text?n=null:n&&n.changes&&(...
function tn (line 1) | function tn(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache...
function on (line 1) | function on(e,t,r){for(var n,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e...
function an (line 1) | function an(e,t){var r=nn;if("left"==t){for(var n=0;n<e.length;n++)if((r...
function sn (line 1) | function sn(e,t,r,n){var i,o=on(t.map,r,n),l=o.node,c=o.start,u=o.end,d=...
function ln (line 1) | function ln(e,t){if(!window.screen||null==screen.logicalXDPI||screen.log...
function cn (line 1) | function cn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,...
function un (line 1) | function un(e){e.display.externalMeasure=null,O(e.display.lineMeasure);f...
function dn (line 1) | function dn(e){un(e),e.display.cachedCharWidth=e.display.cachedTextHeigh...
function fn (line 1) | function fn(){return u&&g?-(document.body.getBoundingClientRect().left-p...
function hn (line 1) | function hn(){return u&&g?-(document.body.getBoundingClientRect().top-pa...
function pn (line 1) | function pn(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e...
function mn (line 1) | function mn(e,t,r,n,i){if(!i){var o=pn(t);r.top+=o,r.bottom+=o}if("line"...
function gn (line 1) | function gn(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==...
function vn (line 1) | function vn(e,t,r,n,i){return n||(n=Xe(e.doc,t.line)),mn(e,n,Qr(e,n,t.ch...
function yn (line 1) | function yn(e,t,r,n,i,o){function a(t,a){var s=tn(e,i,t,a?"right":"left"...
function _n (line 1) | function _n(e,t){var r=0;t=dt(e.doc,t),e.options.lineWrapping||(r=Mn(e.d...
function bn (line 1) | function bn(e,t,r,n,i){var o=it(e,t,r);return o.xRel=i,n&&(o.outside=n),o}
function wn (line 1) | function wn(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return bn(...
function Cn (line 1) | function Cn(e,t,r,n){n-=pn(t);var i=t.text.length,o=se((function(t){retu...
function xn (line 1) | function xn(e,t,r,n){r||(r=en(e,t));var i=mn(e,t,tn(e,r,n),"line").top;r...
function kn (line 1) | function kn(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}
function Tn (line 1) | function Tn(e,t,r,n,i){i-=ir(t);var o=en(e,t),a=pn(t),s=0,l=t.text.lengt...
function Sn (line 1) | function Sn(e,t,r,n,i,o,a){var s=se((function(s){var l=i[s],c=1!=l.level...
function On (line 1) | function On(e,t,r,n,i,o,a){var s=Cn(e,t,n,a),l=s.begin,c=s.end;/\s/.test...
function Dn (line 1) | function Dn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(...
function Mn (line 1) | function Mn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t...
function An (line 1) | function An(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t....
function Nn (line 1) | function Nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.ge...
function En (line 1) | function En(e){var t=Dn(e.display),r=e.options.lineWrapping,n=r&&Math.ma...
function Ln (line 1) | function Ln(e){var t=e.doc,r=En(e);t.iter((function(e){var t=r(e);t!=e.h...
function Pn (line 1) | function Pn(e,t,r,n){var i=e.display;if(!r&&"true"==Se(t).getAttribute("...
function Rn (line 1) | function Rn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.view...
function In (line 1) | function In(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e....
function Wn (line 1) | function Wn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.ex...
function Bn (line 1) | function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display...
function jn (line 1) | function jn(e,t,r,n){var i,o=Rn(e,t),a=e.display.view;if(!Mt||r==e.doc.f...
function Hn (line 1) | function Hn(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<...
function Fn (line 1) | function Fn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[...
function $n (line 1) | function $n(e){e.display.input.showSelection(e.display.input.prepareSele...
function Un (line 1) | function Un(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=doc...
function qn (line 1) | function qn(e,t,r){var n=yn(e,t,"div",null,null,!e.options.singleCursorH...
function zn (line 1) | function zn(e,t){return e.top-t.top||e.left-t.left}
function Kn (line 1) | function Kn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFrag...
function Jn (line 1) | function Jn(e){if(e.state.focused){var t=e.display;clearInterval(t.blink...
function Vn (line 1) | function Vn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||X...
function Gn (line 1) | function Gn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.sta...
function Xn (line 1) | function Xn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.st...
function Yn (line 1) | function Yn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blu...
function Qn (line 1) | function Qn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.le...
function Zn (line 1) | function Zn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e....
function ei (line 1) | function ei(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scr...
function ti (line 1) | function ti(e,t){if(!ye(e,"scrollCursorIntoView")){var r=e.display,n=r.s...
function ri (line 1) | function ri(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||...
function ni (line 1) | function ni(e,t){var r=ii(e,t);null!=r.scrollTop&&di(e,r.scrollTop),null...
function ii (line 1) | function ii(e,t){var r=e.display,n=Dn(e.display);t.top<0&&(t.top=0);var ...
function oi (line 1) | function oi(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scroll...
function ai (line 1) | function ai(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:...
function si (line 1) | function si(e,t,r){null==t&&null==r||ci(e),null!=t&&(e.curOp.scrollLeft=...
function li (line 1) | function li(e,t){ci(e),e.curOp.scrollToPos=t}
function ci (line 1) | function ci(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;...
function ui (line 1) | function ui(e,t,r,n){var i=ii(e,{left:Math.min(t.left,r.left),top:Math.m...
function di (line 1) | function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||$i(e,{top:t}),fi(e,t...
function fi (line 1) | function fi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight...
function hi (line 1) | function hi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWi...
function pi (line 1) | function pi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.do...
function n (line 1) | function n(){var i=e.getBoundingClientRect(),o="vert"==r?document.elemen...
function vi (line 1) | function vi(e,t){t||(t=pi(e));var r=e.display.barWidth,n=e.display.barHe...
function yi (line 1) | function yi(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style....
function bi (line 1) | function bi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.dis...
function Ci (line 1) | function Ci(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,for...
function xi (line 1) | function xi(e){var t=e.curOp;t&&Tr(t,(function(e){for(var t=0;t<e.ops.le...
function ki (line 1) | function ki(e){for(var t=e.ops,r=0;r<t.length;r++)Ti(t[r]);for(var n=0;n...
function Ti (line 1) | function Ti(e){var t=e.cm,r=t.display;Wi(t),e.updateMaxLine&&ar(t),e.mus...
function Si (line 1) | function Si(e){e.updatedDisplay=e.mustUpdate&&Hi(e.cm,e.update)}
function Oi (line 1) | function Oi(e){var t=e.cm,r=t.display;e.updatedDisplay&&Qn(t),e.barMeasu...
function Di (line 1) | function Di(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style....
function Mi (line 1) | function Mi(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Fi(t,...
function Ai (line 1) | function Ai(e,t){if(e.curOp)return t();Ci(e);try{return t()}finally{xi(e)}}
function Ni (line 1) | function Ni(e,t){return function(){if(e.curOp)return t.apply(e,arguments...
function Ei (line 1) | function Ei(e){return function(){if(this.curOp)return e.apply(this,argum...
function Li (line 1) | function Li(e){return function(){var t=this.cm;if(!t||t.curOp)return e.a...
function Pi (line 1) | function Pi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highl...
function Ri (line 1) | function Ri(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){...
function Wi (line 1) | function Wi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWi...
function Bi (line 1) | function Bi(e){if(e.hasFocus())return null;var t=E();if(!t||!N(e.display...
function ji (line 1) | function ji(e){if(e&&e.activeElt&&e.activeElt!=E()&&(e.activeElt.focus()...
function Hi (line 1) | function Hi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Bn(e...
function Fi (line 1) | function Fi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWr...
function $i (line 1) | function $i(e,t){var r=new Ii(e,t);if(Hi(e,r)){Qn(e),Fi(e,r);var n=pi(e)...
function Ui (line 1) | function Ui(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a...
function qi (line 1) | function qi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}
function zi (line 1) | function zi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.disp...
function Ki (line 1) | function Ki(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.fir...
function Ji (line 1) | function Ji(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=nt(e.opt...
function Vi (line 1) | function Vi(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null...
function Gi (line 1) | function Gi(e){var t=e.gutters,r=e.gutterSpecs;O(t),e.lineGutter=null;fo...
function Xi (line 1) | function Xi(e){Gi(e.display),In(e),Ki(e)}
function Yi (line 1) | function Yi(e,t,n,i){var o=this;this.input=n,o.scrollbarFiller=M("div",n...
function eo (line 1) | function eo(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.det...
function to (line 1) | function to(e){var t=eo(e);return t.x*=Zi,t.y*=Zi,t}
function ro (line 1) | function ro(e,t){var n=eo(t),i=n.x,o=n.y,a=e.display,s=a.scroller,c=s.sc...
function oo (line 1) | function oo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((...
function ao (line 1) | function ao(e,t){return new no([new io(e,t||e)],0)}
function so (line 1) | function so(e){return e.text?it(e.from.line+e.text.length-1,G(e.text).le...
function lo (line 1) | function lo(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return so(t...
function co (line 1) | function co(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel...
function uo (line 1) | function uo(e,t,r){return e.line==t.line?it(r.line,e.ch-t.ch+r.ch):it(r....
function fo (line 1) | function fo(e,t,r){for(var n=[],i=it(e.first,0),o=i,a=0;a<t.length;a++){...
function ho (line 1) | function ho(e){e.doc.mode=Ue(e.options,e.doc.modeOption),po(e)}
function po (line 1) | function po(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null)...
function mo (line 1) | function mo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==G(t.text)&&(!e.cm|...
function go (line 1) | function go(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){...
function vo (line 1) | function vo(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked....
function yo (line 1) | function yo(e,t){if(t.cm)throw new Error("This document is already in us...
function _o (line 1) | function _o(e){("rtl"==e.doc.direction?L:S)(e.display.lineDiv,"CodeMirro...
function bo (line 1) | function bo(e){Ai(e,(function(){_o(e),In(e)}))}
function wo (line 1) | function wo(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastM...
function Co (line 1) | function Co(e,t){var r={from:st(t.from),to:so(t),text:Ye(e,t.from,t.to)}...
function xo (line 1) | function xo(e){while(e.length){var t=G(e);if(!t.ranges)break;e.pop()}}
function ko (line 1) | function ko(e,t){return t?(xo(e.done),G(e.done)):e.done.length&&!G(e.don...
function To (line 1) | function To(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,s=+new Da...
function So (line 1) | function So(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.le...
function Oo (line 1) | function Oo(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i....
function Do (line 1) | function Do(e,t){var r=G(t);r&&r.ranges&&r.equals(e)||t.push(e)}
function Mo (line 1) | function Mo(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,...
function Ao (line 1) | function Ao(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marke...
function No (line 1) | function No(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i...
function Eo (line 1) | function Eo(e,t){var r=No(e,t),n=Bt(e,t);if(!r)return n;if(!n)return r;f...
function Lo (line 1) | function Lo(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.rang...
function Po (line 1) | function Po(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ot(t,i)<0;o!=ot(r,...
function Ro (line 1) | function Ro(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend))...
function Io (line 1) | function Io(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o...
function Wo (line 1) | function Wo(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Fo(e,oo(e.cm,i,e...
function Bo (line 1) | function Bo(e,t,r,n){Fo(e,ao(t,r),n)}
function jo (line 1) | function jo(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges...
function Ho (line 1) | function Ho(e,t,r){var n=e.history.done,i=G(n);i&&i.ranges?(n[n.length-1...
function Fo (line 1) | function Fo(e,t,r){$o(e,t,r),Oo(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}
function $o (line 1) | function $o(e,t,r){(be(e,"beforeSelectionChange")||e.cm&&be(e.cm,"before...
function Uo (line 1) | function Uo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput...
function qo (line 1) | function qo(e){Uo(e,zo(e,e.sel,null,!1))}
function zo (line 1) | function zo(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges...
function Ko (line 1) | function Ko(e,t,r,n,i){var o=Xe(e,t.line);if(o.markedSpans)for(var a=0;a...
function Jo (line 1) | function Jo(e,t,r,n,i){var o=n||1,a=Ko(e,t,r,o,i)||!i&&Ko(e,t,r,o,!0)||K...
function Vo (line 1) | function Vo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?dt(e,it(t.line-1...
function Go (line 1) | function Go(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),U)}
function Xo (line 1) | function Xo(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,or...
function Yo (line 1) | function Yo(e,t,r){if(e.cm){if(!e.cm.curOp)return Ni(e.cm,Yo)(e,t,r);if(...
function Qo (line 1) | function Qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to))...
function Zo (line 1) | function Zo(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(va...
function ea (line 1) | function ea(e,t){if(0!=t&&(e.first+=t,e.sel=new no(X(e.sel.ranges,(funct...
function ta (line 1) | function ta(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ni(e.cm,ta)(e,t,r,n);if...
function ra (line 1) | function ra(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line...
function na (line 1) | function na(e,t,r,n,i){var o;n||(n=r),ot(n,r)<0&&(o=[n,r],r=o[0],n=o[1])...
function ia (line 1) | function ia(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}
function oa (line 1) | function oa(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ra...
function aa (line 1) | function aa(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;o...
function sa (line 1) | function sa(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Xe(e,ut(e,t)...
function la (line 1) | function la(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;...
function ca (line 1) | function ca(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i...
function da (line 1) | function da(e,t,r){ir(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&...
function fa (line 1) | function fa(e,t,r,n){var i=new ua(e,r,n),o=e.cm;return o&&i.noHScroll&&(...
function ma (line 1) | function ma(e,t,r,n,i){if(n&&n.shared)return va(e,t,r,n,i);if(e.cm&&!e.c...
function va (line 1) | function va(e,t,r,n,i){n=W(n),n.shared=!1;var o=[ma(e,t,r,n,i)],a=o[0],s...
function ya (line 1) | function ya(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine(...
function _a (line 1) | function _a(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.c...
function ba (line 1) | function ba(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];vo(r.p...
function ka (line 1) | function ka(e){var t=this;if(Oa(t),!ye(t,e)&&!$r(t.display,e)){Ce(e),a&&...
function Ta (line 1) | function Ta(e,t){if(a&&(!e.state.draggingText||+new Date-xa<100))Te(t);e...
function Sa (line 1) | function Sa(e,t){var r=Pn(e,t);if(r){var n=document.createDocumentFragme...
function Oa (line 1) | function Oa(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e....
function Da (line 1) | function Da(e){if(document.getElementsByClassName){for(var t=document.ge...
function Aa (line 1) | function Aa(){Ma||(Na(),Ma=!0)}
function Na (line 1) | function Na(){var e;pe(window,"resize",(function(){null==e&&(e=setTimeou...
function Ea (line 1) | function Ea(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.ca...
function Ba (line 1) | function Ba(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a...
function ja (line 1) | function ja(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r...
function Ha (line 1) | function Ha(e,t,r,n){t=qa(t);var i=t.call?t.call(e,n):t[e];if(!1===i)ret...
function Fa (line 1) | function Fa(e){var t="string"==typeof e?e:La[e.keyCode];return"Ctrl"==t|...
function $a (line 1) | function $a(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(C?t....
function Ua (line 1) | function Ua(e,t){if(d&&34==e.keyCode&&e["char"])return!1;var r=La[e.keyC...
function qa (line 1) | function qa(e){return"string"==typeof e?Wa[e]:e}
function za (line 1) | function za(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){var...
function Ka (line 1) | function Ka(e,t,r){var n=ae(e.text,t+r,r);return n<0||n>e.text.length?nu...
function Ja (line 1) | function Ja(e,t,r){var n=Ka(e,t.ch,r);return null==n?null:new it(t.line,...
function Va (line 1) | function Va(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=fe(r,t...
function Ga (line 1) | function Ga(e,t,r,n){var i=fe(t,e.doc.direction);if(!i)return Ja(t,r,n);...
function Ya (line 1) | function Ya(e,t){var r=Xe(e.doc,t),n=Yt(r);return n!=r&&(t=et(n)),Va(!0,...
function Qa (line 1) | function Qa(e,t){var r=Xe(e.doc,t),n=Qt(r);return n!=r&&(t=et(n)),Va(!0,...
function Za (line 1) | function Za(e,t){var r=Ya(e,t.line),n=Xe(e.doc,r.line),i=fe(n,e.doc.dire...
function es (line 1) | function es(e,t,r){if("string"==typeof t&&(t=Xa[t],!t))return!1;e.displa...
function ts (line 1) | function ts(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ha(t,...
function ns (line 1) | function ns(e,t,r,n){var i=e.state.keySeq;if(i){if(Fa(t))return"handled"...
function is (line 1) | function is(e,t,r,n){var i=ts(e,t,n);return"multi"==i&&(e.state.keySeq=t...
function os (line 1) | function os(e,t){var r=Ua(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?...
function as (line 1) | function as(e,t,r){return ns(e,"'"+r+"'",t,(function(t){return es(e,t,!0...
function ls (line 1) | function ls(e){var t=this;if((!e.target||e.target==t.display.input.getFi...
function cs (line 1) | function cs(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.al...
function us (line 1) | function us(e){16==e.keyCode&&(this.doc.sel.shift=!1),ye(this,e)}
function ds (line 1) | function ds(e){var t=this;if((!e.target||e.target==t.display.input.getFi...
function gs (line 1) | function gs(e,t){var r=+new Date;return hs&&hs.compare(r,e,t)?(fs=hs=nul...
function vs (line 1) | function vs(e){var t=this,r=t.display;if(!(ye(t,e)||r.activeTouch&&r.inp...
function ys (line 1) | function ys(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"tri...
function _s (line 1) | function _s(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};i...
function bs (line 1) | function bs(e,t,r,n){a?setTimeout(I(Vn,e),0):e.curOp.focus=E();var i,o=_...
function ws (line 1) | function ws(e,t,r,n){var i=e.display,o=!1,c=Ni(e,(function(t){l&&(i.scro...
function Cs (line 1) | function Cs(e,t,r){if("char"==r)return new io(t,t);if("word"==r)return e...
function xs (line 1) | function xs(e,t,r,n){a&&Gn(e);var i=e.display,o=e.doc;Ce(t);var s,l,c=o....
function ks (line 1) | function ks(e,t){var r=t.anchor,n=t.head,i=Xe(e.doc,r.line);if(0==ot(r,n...
function Ts (line 1) | function Ts(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.tou...
function Ss (line 1) | function Ss(e,t){return Ts(e,t,"gutterClick",!0)}
function Os (line 1) | function Os(e,t){$r(e.display,t)||Ds(e,t)||ye(e,t,"contextmenu")||x||e.d...
function Ds (line 1) | function Ds(e,t){return!!be(e,"gutterContextMenu")&&Ts(e,t,"gutterContex...
function Ms (line 1) | function Ms(e){e.display.wrapper.className=e.display.wrapper.className.r...
function Ls (line 1) | function Ls(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=...
function Ps (line 1) | function Ps(e,t,r){var n=r&&r!=As;if(!t!=!n){var i=e.display.dragFunctio...
function Rs (line 1) | function Rs(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-w...
function Is (line 1) | function Is(e,t){var r=this;if(!(this instanceof Is))return new Is(e,t);...
function Ws (line 1) | function Ws(e){var t=e.display;pe(t.scroller,"mousedown",Ni(e,vs)),pe(t....
function js (line 1) | function js(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mod...
function Fs (line 1) | function Fs(e){Hs=e}
function $s (line 1) | function $s(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a...
function Us (line 1) | function Us(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");...
function qs (line 1) | function qs(e,t){if(e.options.electricChars&&e.options.smartIndent)for(v...
function zs (line 1) | function zs(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var ...
function Ks (line 1) | function Ks(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttri...
function Js (line 1) | function Js(){var e=M("textarea",null,null,"position: absolute; bottom: ...
function Vs (line 1) | function Vs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constr...
function Gs (line 1) | function Gs(e,t,r,n,i){var o=t,a=r,s=Xe(e,t.line),l=i&&"rtl"==e.directio...
function Xs (line 1) | function Xs(e,t,r,n){var i,o,a=e.doc,s=t.left;if("page"==n){var l=Math.m...
function Qs (line 1) | function Qs(e,t){var r=Zr(e,t.line);if(!r||r.hidden)return null;var n=Xe...
function Zs (line 1) | function Zs(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrappe...
function el (line 1) | function el(e,t){return t&&(e.bad=!0),e}
function tl (line 1) | function tl(e,t,r,n,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;functi...
function rl (line 1) | function rl(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv...
function nl (line 1) | function nl(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!N(n,t))return el...
function o (line 1) | function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/...
function a (line 1) | function a(e){if(o(e)&&!ye(n,e)){if(n.somethingSelected())Fs({lineWise:!...
function t (line 1) | function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.o...
function ol (line 1) | function ol(e,t){if(t=t?W(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&...
function al (line 1) | function al(e){e.off=ge,e.on=pe,e.wheelEventPixels=to,e.Doc=Ca,e.splitLi...
function o (line 1) | function o(e){if(!ye(n,e)){if(n.somethingSelected())Fs({lineWise:!1,text...
function r (line 1) | function r(){var n=t.poll();n||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t...
function v (line 1) | function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="...
function y (line 1) | function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrap...
function _createForOfIteratorHelper (line 1) | function _createForOfIteratorHelper(e,t){var r;if("undefined"===typeof S...
function _unsupportedIterableToArray (line 1) | function _unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)r...
function _arrayLikeToArray (line 1) | function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(...
function ownKeys (line 1) | function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbo...
function _objectSpread (line 1) | function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null...
function treeToTemplate (line 1) | function treeToTemplate(tree){var num=arguments.length>1&&void 0!==argum...
function romoveSlash (line 1) | function romoveSlash(e){var t={},r=/\//g;for(var n in e)"string"==typeof...
function t (line 1) | function t(e,r){for(var n=0;n<e.length;n++)e[n].is_dir?t(e[n].children,e...
function r (line 1) | function r(r){var n=r.length-1;""==r[n].name&&""==r[n].description?t.$me...
function r (line 1) | function r(r){var n=r.length-1;""==r[n].name&&""==r[n].description?e.$me...
function t (line 1) | function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{...
function n (line 1) | function n(e){return e&&e.__esModule?e:{default:e}}
function n (line 1) | function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Ar...
function i (line 1) | function i(e){if(Array.isArray(e))return n(e)}
function o (line 1) | function o(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(...
function a (line 1) | function a(e,t){if(e){if("string"===typeof e)return n(e,t);var r=Object....
function s (line 1) | function s(){throw new TypeError("Invalid attempt to spread non-iterable...
function l (line 1) | function l(e){return i(e)||o(e)||a(e)||s()}
function e (line 1) | function e(e){return{type:e,style:"keyword"}}
function p (line 1) | function p(e){var t,r=!1,n=!1;while(null!=(t=e.next())){if(!r){if("/"==t...
function m (line 1) | function m(e,t,r){return n=e,i=r,t}
function g (line 1) | function g(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=v(r),...
function v (line 1) | function v(e){return function(t,r){var n,i=!1;if(s&&"@"==t.peek()&&t.mat...
function y (line 1) | function y(e,t){var r,n=!1;while(r=e.next()){if("/"==r&&n){t.tokenize=g;...
function _ (line 1) | function _(e,t){var r,n=!1;while(null!=(r=e.next())){if(!n&&("`"==r||"$"...
function w (line 1) | function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf...
function x (line 1) | function x(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.p...
function k (line 1) | function k(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;f...
function T (line 1) | function T(e,t,r,n,i){var o=e.cc;S.state=e,S.stream=i,S.marked=null,S.cc...
function O (line 1) | function O(){for(var e=arguments.length-1;e>=0;e--)S.cc.push(arguments[e])}
function D (line 1) | function D(){return O.apply(null,arguments),!0}
function M (line 1) | function M(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}
function A (line 1) | function A(e){var t=S.state;if(S.marked="def",t.context)if("var"==t.lexi...
function N (line 1) | function N(e,t){if(t){if(t.block){var r=N(e,t.prev);return r?r==t.prev?t...
function E (line 1) | function E(e){return"public"==e||"private"==e||"protected"==e||"abstract...
function L (line 1) | function L(e,t,r){this.prev=e,this.vars=t,this.block=r}
function P (line 1) | function P(e,t){this.name=e,this.next=t}
function I (line 1) | function I(){S.state.context=new L(S.state.context,S.state.localVars,!1)...
function W (line 1) | function W(){S.state.context=new L(S.state.context,S.state.localVars,!0)...
function B (line 1) | function B(){S.state.localVars=S.state.context.vars,S.state.context=S.st...
function j (line 1) | function j(e,t){var r=function(){var r=S.state,n=r.indented;if("stat"==r...
function H (line 1) | function H(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.inde...
function F (line 1) | function F(e){function t(r){return r==e?D():";"==e||"}"==r||")"==r||"]"=...
function $ (line 1) | function $(e,t){return"var"==e?D(j("vardef",t),ke,F(";"),H):"keyword a"=...
function U (line 1) | function U(e){if("("==e)return D(We,F(")"))}
function q (line 1) | function q(e,t){return J(e,t,!1)}
function z (line 1) | function z(e,t){return J(e,t,!0)}
function K (line 1) | function K(e){return"("!=e?O():D(j(")"),V,F(")"),H)}
function J (line 1) | function J(e,t,r){if(S.state.fatArrowAt==S.stream.start){var n=r?ee:Z;if...
function V (line 1) | function V(e){return e.match(/[;\}\)\],]/)?O():O(q)}
function G (line 1) | function G(e,t){return","==e?D(V):X(e,t,!1)}
function X (line 1) | function X(e,t,r){var n=0==r?G:X,i=0==r?q:z;return"=>"==e?D(I,r?ee:Z,B):...
function Y (line 1) | function Y(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?D(Y):D(q,Q)}
function Q (line 1) | function Q(e){if("}"==e)return S.marked="string-2",S.state.tokenize=_,D(Y)}
function Z (line 1) | function Z(e){return w(S.stream,S.state),O("{"==e?$:q)}
function ee (line 1) | function ee(e){return w(S.stream,S.state),O("{"==e?$:z)}
function te (line 1) | function te(e){return function(t){return"."==t?D(e?ne:re):"variable"==t&...
function re (line 1) | function re(e,t){if("target"==t)return S.marked="keyword",D(G)}
function ne (line 1) | function ne(e,t){if("target"==t)return S.marked="keyword",D(X)}
function ie (line 1) | function ie(e){return":"==e?D(H,$):O(G,F(";"),H)}
function oe (line 1) | function oe(e){if("variable"==e)return S.marked="property",D()}
function ae (line 1) | function ae(e,t){return"async"==e?(S.marked="property",D(ae)):"variable"...
function se (line 1) | function se(e){return"variable"!=e?O(le):(S.marked="property",D(Pe))}
function le (line 1) | function le(e){return":"==e?D(z):"("==e?O(Pe):void 0}
function ce (line 1) | function ce(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var a=S....
function ue (line 1) | function ue(e,t,r){for(var n=3;n<arguments.length;n++)S.cc.push(argument...
function de (line 1) | function de(e){return"}"==e?D():O($,de)}
function fe (line 1) | function fe(e,t){if(c){if(":"==e)return D(ge);if("?"==t)return D(fe)}}
function he (line 1) | function he(e,t){if(c&&(":"==e||"in"==t))return D(ge)}
function pe (line 1) | function pe(e){if(c&&":"==e)return S.stream.match(/^\s*\w+\s+is\b/,!1)?D...
function me (line 1) | function me(e,t){if("is"==t)return S.marked="keyword",D()}
function ge (line 1) | function ge(e,t){return"keyof"==t||"typeof"==t||"infer"==t?(S.marked="ke...
function ve (line 1) | function ve(e){if("=>"==e)return D(ge)}
function ye (line 1) | function ye(e,t){return"variable"==e||"keyword"==S.style?(S.marked="prop...
function _e (line 1) | function _e(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"...
function be (line 1) | function be(e,t){return"<"==t?D(j(">"),ce(ge,">"),H,be):"|"==t||"."==e||...
function we (line 1) | function we(e,t){if("<"==t)return D(j(">"),ce(ge,">"),H,be)}
function Ce (line 1) | function Ce(){return O(ge,xe)}
function xe (line 1) | function xe(e,t){if("="==t)return D(ge)}
function ke (line 1) | function ke(e,t){return"enum"==t?(S.marked="keyword",D(Ye)):O(Te,fe,De,Me)}
function Te (line 1) | function Te(e,t){return c&&E(t)?(S.marked="keyword",D(Te)):"variable"==e...
function Se (line 1) | function Se(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("varia...
function Oe (line 1) | function Oe(){return O(Te,De)}
function De (line 1) | function De(e,t){if("="==t)return D(z)}
function Me (line 1) | function Me(e){if(","==e)return D(ke)}
function Ae (line 1) | function Ae(e,t){if("keyword b"==e&&"else"==t)return D(j("form","else"),...
function Ne (line 1) | function Ne(e,t){return"await"==t?D(Ne):"("==e?D(j(")"),Ee,H):void 0}
function Ee (line 1) | function Ee(e){return"var"==e?D(ke,Le):"variable"==e?D(Le):O(Le)}
function Le (line 1) | function Le(e,t){return")"==e?D():";"==e?D(Le):"in"==t||"of"==t?(S.marke...
function Pe (line 1) | function Pe(e,t){return"*"==t?(S.marked="keyword",D(Pe)):"variable"==e?(...
function Re (line 1) | function Re(e,t){return"*"==t?(S.marked="keyword",D(Re)):"variable"==e?(...
function Ie (line 1) | function Ie(e,t){return"keyword"==e||"variable"==e?(S.marked="type",D(Ie...
function We (line 1) | function We(e,t){return"@"==t&&D(q,We),"spread"==e?D(We):c&&E(t)?(S.mark...
function Be (line 1) | function Be(e,t){return"variable"==e?je(e,t):He(e,t)}
function je (line 1) | function je(e,t){if("variable"==e)return A(t),D(He)}
function He (line 1) | function He(e,t){return"<"==t?D(j(">"),ce(Ce,">"),H,He):"extends"==t||"i...
function Fe (line 1) | function Fe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t...
function $e (line 1) | function $e(e,t){if("?"==t)return D($e);if(":"==e)return D(ge,De);if("="...
function Ue (line 1) | function Ue(e,t){return"*"==t?(S.marked="keyword",D(Ge,F(";"))):"default...
function qe (line 1) | function qe(e,t){return"as"==t?(S.marked="keyword",D(F("variable"))):"va...
function ze (line 1) | function ze(e){return"string"==e?D():"("==e?O(q):O(Ke,Je,Ge)}
function Ke (line 1) | function Ke(e,t){return"{"==e?ue(Ke,"}"):("variable"==e&&A(t),"*"==t&&(S...
function Je (line 1) | function Je(e){if(","==e)return D(Ke,Je)}
function Ve (line 1) | function Ve(e,t){if("as"==t)return S.marked="keyword",D(Ke)}
function Ge (line 1) | function Ge(e,t){if("from"==t)return S.marked="keyword",D(q)}
function Xe (line 1) | function Xe(e){return"]"==e?D():O(ce(z,"]"))}
function Ye (line 1) | function Ye(){return O(j("form"),Te,F("{"),j("}"),ce(Qe,"}"),H,H)}
function Qe (line 1) | function Qe(){return O(Te,De)}
function Ze (line 1) | function Ze(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t...
function et (line 1) | function et(e,t,r){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]...
function n (line 1) | function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enume...
FILE: public/js/chunk-07e6273c.1984b9b7.js
function o (line 1) | function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){va...
function r (line 1) | function r(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[...
function n (line 1) | function n(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enume...
FILE: public/js/chunk-10615ad3.5901db24.js
function a (line 1) | function a(t,n){var e;if("undefined"===typeof Symbol||null==t[Symbol.ite...
function s (line 1) | function s(t,n){if(t){if("string"===typeof t)return o(t,n);var e=Object....
function o (line 1) | function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Ar...
FILE: public/js/chunk-168777de.cb8bf66b.js
function treeToTemplate (line 1) | function treeToTemplate(tree){var num=arguments.length>1&&void 0!==argum...
function romoveSlash (line 1) | function romoveSlash(e){var t={},r=/\//g;for(var a in e)"string"==typeof...
function v (line 1) | function v(e,t,a,o,i,s){var u=a+e.length,c=o.length,l=f;return void 0!==...
FILE: public/js/chunk-1e630799.897fa4c7.js
function i (line 1) | function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){va...
function c (line 1) | function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[...
function n (line 1) | function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enume...
FILE: public/js/chunk-20afbe1d.bcdaad46.js
function l (line 1) | function l(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){va...
function c (line 1) | function c(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[...
function a (line 1) | function a(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enume...
FILE: public/js/chunk-211c6b12.01b14833.js
function u (line 1) | function u(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.ite...
function d (line 1) | function d(e,t){if(e){if("string"===typeof e)return h(e,t);var n=Object....
function h (line 1) | function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Ar...
function f (line 1) | function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){va...
function p (line 1) | function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[...
function f (line 1) | function f(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t]...
function p (line 1) | function p(e,t,n){var r,i;return t||(t=250),function(){var o=n||this,a=+...
function a (line 1) | function a(e,t){var n=t.appendChild(c(e));if(e.children.length){var r=l(...
function s (line 1) | function s(e,t){var n=!1,r=l(n);t.forEach((function(e){a(e,r)}));var i=d...
function c (line 1) | function c(n){var r=document.createElement("li"),i=document.createElemen...
function l (line 1) | function l(t){var n=e.orderedList?"ol":"ul",r=document.createElement(n),...
function u (line 1) | function u(){var t;e.scrollContainer&&document.querySelector(e.scrollCon...
function d (line 1) | function d(t){var n=0;return t!==document.querySelector(e.contentSelecto...
function h (line 1) | function h(a){var s;e.scrollContainer&&document.querySelector(e.scrollCo...
function f (line 1) | function f(t){return-1!==t.className.indexOf(e.collapsibleClass)&&-1!==t...
function p (line 1) | function p(t){var n=t.target||t.srcElement;"string"===typeof n.className...
function m (line 1) | function m(){i=!0}
function g (line 1) | function g(e,t,r,o,a,s){var c=r+e.length,l=o.length,u=f;return void 0!==...
function n (line 1) | function n(e){return e[e.length-1]}
function r (line 1) | function r(e){return+e.nodeName.split("H").join("")}
function i (line 1) | function i(t){if(!(t instanceof window.HTMLElement))return t;if(e.ignore...
function o (line 1) | function o(t,r){var o=i(t),a=o.headingLevel,s=r,c=n(s),l=c?c.headingLeve...
function a (line 1) | function a(t,n){var r=n;e.ignoreSelector&&(r=n.split(",").map((function(...
function s (line 1) | function s(e){return t.call(e,(function(e,t){var n=i(t);return n&&o(n,e....
function n (line 1) | function n(e){c();var t=e.duration,n=e.offset,i=location.hash?s(location...
function r (line 1) | function r(e,t){var n,r,i=window.pageYOffset,o={duration:t.duration,offs...
function i (line 7) | function i(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}
function s (line 7) | function s(e,t){this.totalCount=e,this.dataCount=t}
function l (line 7) | function l(){this.buffer=new Array,this.length=0}
function p (line 7) | function p(e,t){if(void 0==e.length)throw new Error(e.length+"/"+t);var ...
function y (line 7) | function y(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=...
function S (line 7) | function S(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<1...
function k (line 7) | function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[...
function r (line 7) | function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enume...
FILE: public/js/chunk-25f82f1a.e3262c66.js
function u (line 1) | function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!...
function s (line 1) | function s(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.creat...
function l (line 1) | function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(C){ret...
function b (line 1) | function b(){}
function v (line 1) | function v(){}
function g (line 1) | function g(){}
function F (line 1) | function F(t){["next","throw","return"].forEach((function(e){u(t,e,(func...
function O (line 1) | function O(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.typ...
function S (line 1) | function S(t,e,r){var n=f;return function(o,i){if(n===d)throw new Error(...
function E (line 1) | function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,...
function k (line 1) | function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.f...
function j (line 1) | function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.comp...
function L (line 1) | function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.r...
function P (line 1) | function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typ...
function A (line 1) | function A(){return{value:e,done:!0}}
function o (line 1) | function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="nex...
function i (line 1) | function i(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return vo...
function a (line 1) | function a(t){return function(){var e=this,r=arguments;return new Promis...
function s (line 1) | function s(t,e){var r;if("undefined"===typeof Symbol||null==t[Symbol.ite...
function l (line 1) | function l(t,e){if(t){if("string"===typeof t)return f(t,e);var r=Object....
function f (line 1) | function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Ar...
FILE: public/js/chunk-3337dd8f.e12552ed.js
function n (line 1) | function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){va...
function o (line 1) | function o(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[...
function r (line 1) | function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enume...
FILE: public/js/chunk-416ef35e.e3de812c.js
function a (line 1) | function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Ar...
function i (line 1) | function i(t){if(Array.isArray(t))return a(t)}
function s (line 1) | function s(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(...
function o (line 1) | function o(t,e){if(t){if("string"===typeof t)return a(t,e);var r=Object....
function n (line 1) | function n(){throw new TypeError("Invalid attempt to spread non-iterable...
function l (line 1) | function l(t){return i(t)||s(t)||o(t)||n()}
FILE: public/js/chunk-457e440b.71326ed5.js
function g (line 1) | function g(e,t,n,i,c,s){var o=n+e.length,_=i.length,u=p;return void 0!==...
FILE: public/js/chunk-56652b45.b9202ad0.js
function c (line 1) | function c(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.ite...
function s (line 1) | function s(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object....
function u (line 1) | function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Ar...
FILE: public/js/chunk-5b1f82de.b6b71a96.js
function y (line 1) | function y(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){va...
function _ (line 1) | function _(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[...
function o (line 1) | function o(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enume...
FILE: public/js/chunk-654f0b98.4b5aff3b.js
function getUrlParam (line 1) | function getUrlParam(e,t){var i=new RegExp("(^|&)"+t+"=([^&]*)(&|$)");if...
function replaceParamVal (line 1) | function replaceParamVal(url,paramName,replaceVal){var oUrl=url.toString...
function timestampFormat (line 1) | function timestampFormat(e){var t=Date.parse(e)/1e3;function i(e){return...
FILE: public/js/chunk-65eafec3.92b978b7.js
function ownKeys (line 1) | function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbo...
function _objectSpread (line 1) | function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null...
function g (line 1) | function g(e,t,n,a,s,c){var o=n+e.length,_=a.length,u=p;return void 0!==...
function n (line 1) | function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enume...
FILE: public/js/chunk-6a2c3c1a.5e3ea521.js
function d (line 1) | function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){va...
function f (line 1) | function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[...
function a (line 1) | function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enume...
FILE: public/js/chunk-ab7deece.198a94a8.js
function v (line 1) | function v(e,t,n,o,i,c){var u=n+e.length,l=o.length,s=p;return void 0!==...
function getUrlParam (line 1) | function getUrlParam(e,t){var r=new RegExp("(^|&)"+t+"=([^&]*)(&|$)");if...
function replaceParamVal (line 1) | function replaceParamVal(url,paramName,replaceVal){var oUrl=url.toString...
function timestampFormat (line 1) | function timestampFormat(e){var t=Date.parse(e)/1e3;function r(e){return...
FILE: public/js/chunk-b9b22232.9694579b.js
function n (line 1) | function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){va...
function l (line 1) | function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[...
function s (line 1) | function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enume...
FILE: public/js/chunk-bd264252.deae42c5.js
function h (line 1) | function h(e,t,i,o,r,s){var l=i+e.length,c=o.length,d=p;return void 0!==...
FILE: public/js/chunk-f66a53c0.e61a0c3e.js
function v (line 1) | function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){va...
function b (line 1) | function b(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[...
function U (line 1) | function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){va...
function x (line 1) | function x(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[...
function S (line 1) | function S(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){va...
function Q (line 1) | function Q(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[...
function getUrlParam (line 1) | function getUrlParam(e,t){var a=new RegExp("(^|&)"+t+"=([^&]*)(&|$)");if...
function replaceParamVal (line 1) | function replaceParamVal(url,paramName,replaceVal){var oUrl=url.toString...
function timestampFormat (line 1) | function timestampFormat(e){var t=Date.parse(e)/1e3;function a(e){return...
function r (line 1) | function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enume...
FILE: public/js/chunk-vendors.26b96680.js
function n (line 1) | function n(e){const t="[A-Z_][A-Z0-9_.]*",n={$pattern:t,keyword:"HEADER ...
function n (line 1) | function n(e){return{name:"Node REPL",contains:[{className:"meta",starts...
function i (line 1) | function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Sym...
function n (line 1) | function n(e){const t="\\d(_|\\d)*",n="[eE][-+]?"+t,i=t+"(\\."+t+")?("+n...
function n (line 1) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 1) | function i(e){return r("(",e,")?")}
function r (line 1) | function r(...e){const t=e.map(e=>n(e)).join("");return t}
function a (line 1) | function a(e){const t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n=...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 1) | function n(e){const t={begin:"<",end:">",contains:[e.inherit(e.TITLE_MOD...
function n (line 1) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 1) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 1) | function r(e){const t={begin:"^'{3,}[ \\t]*$",relevance:10},n=[{begin:/\...
function n (line 1) | function n(e){const t={className:"string",begin:"\\[\n(multipart)?",end:...
function n (line 1) | function n(e){const t={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|c...
function n (line 1) | function n(e){const t={begin:"`[\\s\\S]"};return{name:"AutoHotkey",case_...
function n (line 1) | function n(e){const t={begin:/[\w-]+ *=/,returnBegin:!0,relevance:0,cont...
function n (line 1) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 1) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 1) | function r(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",r...
function n (line 1) | function n(e){return{name:"Test Anything Protocol",case_insensitive:!0,c...
function n (line 1) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 1) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 1) | function r(e){const t={className:"params",begin:"\\(",end:"\\)"},n=/(_[a...
function l (line 1) | function l(e){this.defaults=e,this.interceptors={request:new a,response:...
function n (line 1) | function n(e){const t={keyword:"break default func interface select case...
function n (line 1) | function n(e){return{name:"Mizar",keywords:"environ vocabularies notatio...
function n (line 1) | function n(e){return{name:"RenderMan RIB",keywords:"ArchiveRecord AreaLi...
function n (line 1) | function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){...
class a (line 1) | class a{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}ign...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function o (line 1) | function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replac...
function s (line 1) | function s(e,...t){const n=Object.create(null);for(const i in e)n[i]=e[i...
class u (line 1) | class u{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e...
method constructor (line 1) | constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(...
method addText (line 1) | addText(e){this.buffer+=o(e)}
method openNode (line 1) | openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.cla...
method closeNode (line 1) | closeNode(e){c(e)&&(this.buffer+=l)}
method value (line 1) | value(){return this.buffer}
method span (line 1) | span(e){this.buffer+=`<span class="${e}">`}
class d (line 1) | class d{constructor(){this.rootNode={children:[]},this.stack=[this.rootN...
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
class p (line 1) | class p extends d{constructor(e){super(),this.options=e}addKeyword(e,t){...
method constructor (line 1) | constructor(e){super(),this.options=e}
method addKeyword (line 1) | addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNo...
method addText (line 1) | addText(e){""!==e&&this.add(e)}
method addSublanguage (line 1) | addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}
method toHTML (line 1) | toHTML(){const e=new u(this,this.options);return e.value()}
method finalize (line 1) | finalize(){return!0}
function h (line 1) | function h(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"...
function f (line 1) | function f(e){return e?"string"===typeof e?e:e.source:null}
function _ (line 1) | function _(...e){const t=e.map(e=>f(e)).join("");return t}
function m (line 1) | function m(...e){const t="("+e.map(e=>f(e)).join("|")+")";return t}
function g (line 1) | function g(e){return new RegExp(e.toString()+"|").exec("").length-1}
function b (line 1) | function b(e,t){const n=e&&e.exec(t);return n&&0===n.index}
function v (line 1) | function v(e,t="|"){const n=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|...
function z (line 1) | function z(e,t){const n=e.input[e.index-1];"."===n&&t.ignoreMatch()}
function Y (line 1) | function Y(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.spli...
function W (line 1) | function W(e,t){Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}
function K (line 1) | function K(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & e...
function Q (line 1) | function Q(e,t){void 0===e.relevance&&(e.relevance=1)}
function J (line 1) | function J(e,t,n=Z){const i={};return"string"===typeof e?r(n,e.split(" "...
function ee (line 1) | function ee(e,t){return t?Number(t):te(e)?0:1}
function te (line 1) | function te(e){return X.includes(e.toLowerCase())}
function ne (line 1) | function ne(e,{plugins:t}){function n(t,n){return new RegExp(f(t),"m"+(e...
function ie (line 1) | function ie(e){return!!e&&(e.endsWithParent||ie(e.starts))}
function re (line 1) | function re(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e...
function oe (line 1) | function oe(e){return Boolean(e||""===e)}
function se (line 1) | function se(e){const t={props:["language","code","autodetect"],data:func...
function ce (line 1) | function ce(e){return e.nodeName.toLowerCase()}
function ue (line 1) | function ue(e){const t=[];return function e(n,i){for(let r=n.firstChild;...
function de (line 1) | function de(e,t,n){let i=0,r="";const a=[];function s(){return e.length&...
function d (line 1) | function d(e){return u.noHighlightRe.test(e)}
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function f (line 1) | function f(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.classNa...
function _ (line 1) | function _(e,t,n,i){const r={code:t,language:e};$("before:highlight",r);...
function m (line 1) | function m(e,n,i,s){const c=n;function d(e,t){const n=O.case_insensitive...
function g (line 1) | function g(e){const t={relevance:0,emitter:new u.__emitter(u),value:_e(e...
function v (line 1) | function v(e,n){n=n||u.languages||Object.keys(t);const i=g(e),r=n.filter...
function E (line 1) | function E(e){return u.tabReplace||u.useBR?e.replace(s,e=>"\n"===e?u.use...
function y (line 1) | function y(e,t,i){const r=t?n[t]:i;e.classList.add("hljs"),r&&e.classLis...
function x (line 1) | function x(e){let t=null;const n=f(e);if(d(n))return;$("before:highlight...
function w (line 1) | function w(e){e.useBR&&(fe("10.3.0","'useBR' will be removed entirely in...
function N (line 1) | function N(){fe("10.6.0","initHighlightingOnLoad() is deprecated. Use h...
function A (line 1) | function A(){if(!k)return void(R=!0);const e=document.querySelectorAll("...
function D (line 1) | function D(){k=!0,R&&A()}
function I (line 1) | function I(n,i){let r=null;try{r=i(e)}catch(a){if(pe("Language definitio...
function M (line 1) | function M(){return Object.keys(t)}
function L (line 1) | function L(e){fe("10.4.0","requireLanguage will be removed entirely in v...
function P (line 1) | function P(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}
function F (line 1) | function F(e,{languageName:t}){"string"===typeof e&&(e=[e]),e.forEach(e=...
function B (line 1) | function B(e){const t=P(e);return t&&!t.disableAutodetect}
function U (line 1) | function U(e){r.push(e)}
function $ (line 1) | function $(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}
function j (line 1) | function j(e){return fe("10.2.0","fixMarkup will be removed entirely in ...
function n (line 1) | function n(e){const t={className:"variable",variants:[{begin:/\$[\w\d#@]...
function l (line 1) | function l(e){return e&&e.__esModule?e:{default:e}}
function S (line 14) | function S(e,t,n){n=n||E;var i,r,a=n.createElement("script");if(a.text=e...
function C (line 14) | function C(e){return null==e?e+"":"object"===typeof e||"function"===type...
function w (line 14) | function w(e){var t=!!e&&"length"in e&&e.length,n=C(e);return!b(e)&&!v(e...
function se (line 25) | function se(e,t,i,r){var a,s,c,u,d,f,g,b=t&&t.ownerDocument,y=t?t.nodeTy...
function le (line 25) | function le(){var e=[];function t(n,r){return e.push(n+" ")>i.cacheLengt...
function ce (line 25) | function ce(e){return e[E]=!0,e}
function ue (line 25) | function ue(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(...
function de (line 25) | function de(e,t){var n=e.split("|"),r=n.length;while(r--)i.attrHandle[n[...
function pe (line 25) | function pe(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourc...
function he (line 25) | function he(e){return function(t){var n=t.nodeName.toLowerCase();return"...
function fe (line 25) | function fe(e){return function(t){var n=t.nodeName.toLowerCase();return(...
function _e (line 25) | function _e(e){return function(t){return"form"in t?t.parentNode&&!1===t....
function me (line 25) | function me(e){return ce((function(t){return t=+t,ce((function(n,i){var ...
function ge (line 25) | function ge(e){return e&&"undefined"!==typeof e.getElementsByTagName&&e}
function be (line 25) | function be(){}
function ve (line 25) | function ve(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}
function Ee (line 25) | function Ee(e,t,n){var i=t.dir,r=t.next,a=r||i,o=n&&"parentNode"===a,s=C...
function ye (line 25) | function ye(e){return e.length>1?function(t,n,i){var r=e.length;while(r-...
function Se (line 25) | function Se(e,t,n){for(var i=0,r=t.length;i<r;i++)se(e,t[i],n);return n}
function Ce (line 25) | function Ce(e,t,n,i,r){for(var a,o=[],s=0,l=e.length,c=null!=t;s<l;s++)(...
function Te (line 25) | function Te(e,t,n,i,r,a){return i&&!i[E]&&(i=Te(i)),r&&!r[E]&&(r=Te(r,a)...
function xe (line 25) | function xe(e){for(var t,n,r,a=e.length,o=i.relative[e[0].type],s=o||i.r...
function we (line 25) | function we(e,t){var n=t.length>0,r=e.length>0,a=function(a,o,s,l,u){var...
function A (line 25) | function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerC...
function I (line 25) | function I(e,t,n){return b(t)?x.grep(e,(function(e,i){return!!t.call(e,i...
function U (line 25) | function U(e,t){while((e=e[t])&&1!==e.nodeType);return e}
function j (line 25) | function j(e){var t={};return x.each(e.match($)||[],(function(e,n){t[n]=...
function G (line 25) | function G(e){return e}
function q (line 25) | function q(e){throw e}
function H (line 25) | function H(e,t,n,i){var r;try{e&&b(r=e.promise)?r.call(e).done(t).fail(n...
function o (line 25) | function o(e,t,i,r){return function(){var s=this,l=arguments,c=function(...
function Y (line 25) | function Y(){E.removeEventListener("DOMContentLoaded",Y),n.removeEventLi...
function X (line 25) | function X(e,t){return t.toUpperCase()}
function Z (line 25) | function Z(e){return e.replace(K,"ms-").replace(Q,X)}
function ee (line 25) | function ee(){this.expando=x.expando+ee.uid++}
function ae (line 25) | function ae(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""...
function oe (line 25) | function oe(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.re...
function fe (line 25) | function fe(e,t,n,i){var r,a,o=20,s=i?function(){return i.cur()}:functio...
function me (line 25) | function me(e){var t,n=e.ownerDocument,i=e.nodeName,r=_e[i];return r||(t...
function ge (line 25) | function ge(e,t){for(var n,i,r=[],a=0,o=e.length;a<o;a++)i=e[a],i.style&...
function Se (line 25) | function Se(e,t){var n;return n="undefined"!==typeof e.getElementsByTagN...
function Ce (line 25) | function Ce(e,t){for(var n=0,i=e.length;n<i;n++)te.set(e[n],"globalEval"...
function xe (line 25) | function xe(e,t,n,i,r){for(var a,o,s,l,c,u,d=t.createDocumentFragment(),...
function Re (line 25) | function Re(){return!0}
function ke (line 25) | function ke(){return!1}
function Ae (line 25) | function Ae(e,t){return e===De()===("focus"===t)}
function De (line 25) | function De(){try{return E.activeElement}catch(e){}}
function Ie (line 25) | function Ie(e,t,n,i,r,a){var o,s;if("object"===typeof t){for(s in"string...
function Me (line 25) | function Me(e,t,n){n?(te.set(e,t,!1),x.event.add(e,t,{namespace:!1,handl...
function Be (line 25) | function Be(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"...
function Ue (line 25) | function Ue(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}
function $e (line 25) | function $e(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.sli...
function je (line 25) | function je(e,t){var n,i,r,a,o,s,l;if(1===t.nodeType){if(te.hasData(e)&&...
function Ge (line 25) | function Ge(e,t){var n=t.nodeName.toLowerCase();"input"===n&&be.test(e.t...
function qe (line 25) | function qe(e,t,n,i){t=c(t);var r,a,o,s,l,u,d=0,p=e.length,h=p-1,f=t[0],...
function He (line 25) | function He(e,t,n){for(var i,r=t?x.filter(t,e):e,a=0;null!=(i=r[a]);a++)...
function Ke (line 25) | function Ke(e,t,n){var i,r,a,o,s=e.style;return n=n||ze(e),n&&(o=n.getPr...
function Qe (line 25) | function Qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(...
function e (line 25) | function e(){if(u){c.style.cssText="position:absolute;left:-11111px;widt...
function t (line 25) | function t(e){return Math.round(parseFloat(e))}
function et (line 25) | function et(e){var t=e[0].toUpperCase()+e.slice(1),n=Xe.length;while(n--...
function tt (line 25) | function tt(e){var t=x.cssProps[e]||Je[e];return t||(e in Ze?e:Je[e]=et(...
function ot (line 25) | function ot(e,t,n){var i=le.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[...
function st (line 25) | function st(e,t,n,i,r,a){var o="width"===t?1:0,s=0,l=0;if(n===(i?"border...
function lt (line 25) | function lt(e,t,n){var i=ze(e),r=!g.boxSizingReliable()||n,a=r&&"border-...
function ct (line 25) | function ct(e,t,n,i,r){return new ct.prototype.init(e,t,n,i,r)}
function ft (line 25) | function ft(){dt&&(!1===E.hidden&&n.requestAnimationFrame?n.requestAnima...
function _t (line 25) | function _t(){return n.setTimeout((function(){ut=void 0})),ut=Date.now()}
function mt (line 25) | function mt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=ce[i],r...
function gt (line 25) | function gt(e,t,n){for(var i,r=(Et.tweeners[t]||[]).concat(Et.tweeners["...
function bt (line 25) | function bt(e,t,n){var i,r,a,o,s,l,c,u,d="width"in t||"height"in t,p=thi...
function vt (line 25) | function vt(e,t){var n,i,r,a,o;for(n in e)if(i=Z(n),r=t[i],a=e[n],Array....
function Et (line 25) | function Et(e,t,n){var i,r,a=0,o=Et.prefilters.length,s=x.Deferred().alw...
function xt (line 25) | function xt(e){var t=e.match($)||[];return t.join(" ")}
function wt (line 25) | function wt(e){return e.getAttribute&&e.getAttribute("class")||""}
function Ot (line 25) | function Ot(e){return Array.isArray(e)?e:"string"===typeof e&&e.match($)...
function Bt (line 25) | function Bt(e,t,n,i){var r;if(Array.isArray(t))x.each(t,(function(t,r){n...
function Qt (line 25) | function Qt(e){return function(t,n){"string"!==typeof t&&(n=t,t="*");var...
function Xt (line 25) | function Xt(e,t,n,i){var r={},a=e===Yt;function o(s){var l;return r[s]=!...
function Zt (line 25) | function Zt(e,t){var n,i,r=x.ajaxSettings.flatOptions||{};for(n in t)voi...
function Jt (line 25) | function Jt(e,t,n){var i,r,a,o,s=e.contents,l=e.dataTypes;while("*"===l[...
function en (line 25) | function en(e,t,n,i){var r,a,o,s,l,c={},u=e.dataTypes.slice();if(u[1])fo...
function T (line 25) | function T(e,t,o,l){var d,p,v,E,y,S=t;c||(c=!0,s&&n.clearTimeout(s),i=vo...
function n (line 25) | function n(e){return{name:"ERB",subLanguage:"xml",contains:[e.COMMENT("<...
function n (line 25) | function n(e){return{name:"Clojure REPL",contains:[{className:"meta",beg...
function n (line 25) | function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{...
function c (line 25) | function c(e){var t=e.move,n=e.size,i=e.bar,r={},a="translate"+i.axis+"(...
function n (line 25) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 25) | function i(...e){const t="("+e.map(e=>n(e)).join("|")+")";return t}
function r (line 25) | function r(e){const t=i(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)...
function c (line 25) | function c(e){const t=n(e),c=l,u="and or not only",d="[\\w-]+",p="("+d+"...
function n (line 25) | function n(e){return{name:"LDIF",contains:[{className:"attribute",begin:...
function n (line 25) | function n(e){const t={className:"string",begin:'(~)?"',end:'"',illegal:...
function n (line 25) | function n(e){const t=["add","and","cmp","cmpg","cmpl","const","div","do...
function n (line 25) | function n(e){const t=e.COMMENT(/\(\*/,/\*\)/),n={className:"attribute",...
function n (line 25) | function n(e){const t={className:"variable",variants:[{begin:"\\b([gtps]...
function n (line 25) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 25) | function i(e){return r("(?=",e,")")}
function r (line 25) | function r(...e){const t=e.map(e=>n(e)).join("");return t}
function a (line 25) | function a(e,t={}){return t.variants=e,t}
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function o (line 25) | function o(e){const t="[A-Za-z0-9_$]+",n=a([e.C_LINE_COMMENT_MODE,e.C_BL...
function n (line 25) | function n(e){const t="exports register file shl array record property f...
function n (line 25) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 25) | function i(e){return r("(",e,")?")}
function r (line 25) | function r(...e){const t=e.map(e=>n(e)).join("");return t}
function a (line 25) | function a(e){const t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n=...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 25) | function n(e){var t="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]...
function n (line 25) | function n(e){const t={keyword:"module use_module import_module include_...
function o (line 25) | function o(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e[...
function s (line 25) | function s(){var e;return("undefined"!==typeof XMLHttpRequest||"undefine...
function n (line 25) | function n(e){const t={className:"comment",begin:/\$noop\(/,end:/\)/,con...
function n (line 25) | function n(e){const t="[a-zA-Z_][\\w.]*",n="<\\?(lasso(script)?|=)",i="\...
function n (line 25) | function n(e){const t="ObjectLoader Animate MovieCredits Slides Filters ...
function n (line 25) | function n(e){const t="module schema namespace boundary-space preserve n...
function n (line 25) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 25) | function i(e){return r("(?=",e,")")}
function r (line 25) | function r(...e){const t=e.map(e=>n(e)).join("");return t}
function a (line 25) | function a(e){const t=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function i (line 25) | function i(e,t,n,i,r,a,o,s){var l,c="function"===typeof e?e.options:e;if...
function n (line 25) | function n(e){var t={className:"subst",begin:/\\[tn"\\]/},n={className:"...
function n (line 25) | function n(e){const t={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA...
function n (line 25) | function n(e){const t="(_?[ui](8|16|32|64|128))?",n="(_?f(32|64))?",i="[...
function n (line 25) | function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{...
function n (line 25) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 25) | function i(e){return r("(?=",e,")")}
function r (line 25) | function r(...e){const t=e.map(e=>n(e)).join("");return t}
function a (line 25) | function a(...e){const t="("+e.map(e=>n(e)).join("|")+")";return t}
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function T (line 25) | function T(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/...
function a (line 25) | function a(e){return e&&e.__esModule?e:{default:e}}
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function o (line 25) | function o(e,t){if(!r.default.prototype.$isServer)if(t){var n=[],i=t.off...
function n (line 25) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 25) | function i(e){return r("(?=",e,")")}
function r (line 25) | function r(...e){const t=e.map(e=>n(e)).join("");return t}
function a (line 25) | function a(...e){const t="("+e.map(e=>n(e)).join("|")+")";return t}
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function o (line 25) | function o(e){const t={className:"number",relevance:0,variants:[{begin:/...
function i (line 31) | function i(e){return void 0===e||null===e}
function r (line 31) | function r(e){return void 0!==e&&null!==e}
function a (line 31) | function a(e){return!0===e}
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function o (line 31) | function o(e){return!1===e}
function s (line 31) | function s(e){return"string"===typeof e||"number"===typeof e||"symbol"==...
function l (line 31) | function l(e){return null!==e&&"object"===typeof e}
function u (line 31) | function u(e){return"[object Object]"===c.call(e)}
method constructor (line 1) | constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(...
method addText (line 1) | addText(e){this.buffer+=o(e)}
method openNode (line 1) | openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.cla...
method closeNode (line 1) | closeNode(e){c(e)&&(this.buffer+=l)}
method value (line 1) | value(){return this.buffer}
method span (line 1) | span(e){this.buffer+=`<span class="${e}">`}
function d (line 31) | function d(e){return"[object RegExp]"===c.call(e)}
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function p (line 31) | function p(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t...
method constructor (line 1) | constructor(e){super(),this.options=e}
method addKeyword (line 1) | addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNo...
method addText (line 1) | addText(e){""!==e&&this.add(e)}
method addSublanguage (line 1) | addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}
method toHTML (line 1) | toHTML(){const e=new u(this,this.options);return e.value()}
method finalize (line 1) | finalize(){return!0}
function h (line 31) | function h(e){return r(e)&&"function"===typeof e.then&&"function"===type...
function f (line 31) | function f(e){return null==e?"":Array.isArray(e)||u(e)&&e.toString===c?J...
function _ (line 31) | function _(e){var t=parseFloat(e);return isNaN(t)?e:t}
function m (line 31) | function m(e,t){for(var n=Object.create(null),i=e.split(","),r=0;r<i.len...
function b (line 31) | function b(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(...
function E (line 31) | function E(e,t){return v.call(e,t)}
function y (line 31) | function y(e){var t=Object.create(null);return function(n){var i=t[n];re...
function O (line 31) | function O(e,t){function n(n){var i=arguments.length;return i?i>1?e.appl...
function N (line 31) | function N(e,t){return e.bind(t)}
function k (line 31) | function k(e,t){t=t||0;var n=e.length-t,i=new Array(n);while(n--)i[n]=e[...
function A (line 31) | function A(e,t){for(var n in t)e[n]=t[n];return e}
function D (line 31) | function D(e){for(var t={},n=0;n<e.length;n++)e[n]&&A(t,e[n]);return t}
function I (line 31) | function I(e,t,n){}
function P (line 31) | function P(e,t){if(e===t)return!0;var n=l(e),i=l(t);if(!n||!i)return!n&&...
function F (line 31) | function F(e,t){for(var n=0;n<e.length;n++)if(P(e[n],t))return n;return-1}
function B (line 31) | function B(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments...
function H (line 31) | function H(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}
function V (line 31) | function V(e,t,n,i){Object.defineProperty(e,t,{value:n,enumerable:!!i,wr...
function Y (line 31) | function Y(e){if(!z.test(e)){var t=e.split(".");return function(e){for(v...
function ue (line 31) | function ue(e){return"function"===typeof e&&/native code/.test(e.toStrin...
function e (line 31) | function e(){this.set=Object.create(null)}
function ge (line 31) | function ge(e){me.push(e),_e.target=e}
function be (line 31) | function be(){me.pop(),_e.target=me[me.length-1]}
function Se (line 31) | function Se(e){return new ve(void 0,void 0,void 0,String(e))}
function Ce (line 31) | function Ce(e){var t=new ve(e.tag,e.data,e.children&&e.children.slice(),...
function Re (line 31) | function Re(e){Ne=e}
function Ae (line 31) | function Ae(e,t){e.__proto__=t}
function De (line 31) | function De(e,t,n){for(var i=0,r=n.length;i<r;i++){var a=n[i];V(e,a,t[a])}}
function Ie (line 31) | function Ie(e,t){var n;if(l(e)&&!(e instanceof ve))return E(e,"__ob__")&...
function Me (line 31) | function Me(e,t,n,i,r){var a=new _e,o=Object.getOwnPropertyDescriptor(e,...
function Le (line 31) | function Le(e,t,n){if(Array.isArray(e)&&p(t))return e.length=Math.max(e....
function Pe (line 31) | function Pe(e,t){if(Array.isArray(e)&&p(t))e.splice(t,1);else{var n=e.__...
function Fe (line 31) | function Fe(e){for(var t=void 0,n=0,i=e.length;n<i;n++)t=e[n],t&&t.__ob_...
function Ue (line 31) | function Ue(e,t){if(!t)return e;for(var n,i,r,a=pe?Reflect.ownKeys(t):Ob...
function $e (line 31) | function $e(e,t,n){return n?function(){var i="function"===typeof t?t.cal...
function je (line 31) | function je(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n...
function Ge (line 31) | function Ge(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.p...
function qe (line 31) | function qe(e,t,n,i){var r=Object.create(e||null);return t?A(r,t):r}
function Ve (line 31) | function Ve(e,t){var n=e.props;if(n){var i,r,a,o={};if(Array.isArray(n))...
function ze (line 31) | function ze(e,t){var n=e.inject;if(n){var i=e.inject={};if(Array.isArray...
function Ye (line 31) | function Ye(e){var t=e.directives;if(t)for(var n in t){var i=t[n];"funct...
function We (line 31) | function We(e,t,n){if("function"===typeof t&&(t=t.options),Ve(t,n),ze(t,...
function Ke (line 31) | function Ke(e,t,n,i){if("string"===typeof n){var r=e[t];if(E(r,n))return...
function Qe (line 31) | function Qe(e,t,n,i){var r=t[e],a=!E(n,e),o=n[e],s=et(Boolean,r.type);if...
function Xe (line 31) | function Xe(e,t,n){if(E(t,"default")){var i=t.default;return e&&e.$optio...
function Ze (line 31) | function Ze(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return ...
function Je (line 31) | function Je(e,t){return Ze(e)===Ze(t)}
function et (line 31) | function et(e,t){if(!Array.isArray(t))return Je(t,e)?0:-1;for(var n=0,i=...
function tt (line 31) | function tt(e,t,n){ge();try{if(t){var i=t;while(i=i.$parent){var r=i.$op...
function nt (line 31) | function nt(e,t,n,i,r){var a;try{a=n?e.apply(t,n):e.call(t),a&&!a._isVue...
function it (line 31) | function it(e,t,n){if(G.errorHandler)try{return G.errorHandler.call(null...
function rt (line 31) | function rt(e,t,n){if(!Q&&!X||"undefined"===typeof console)throw e}
function ct (line 31) | function ct(){lt=!1;var e=st.slice(0);st.length=0;for(var t=0;t<e.length...
function ft (line 31) | function ft(e,t){var n;if(st.push((function(){if(e)try{e.call(t)}catch(C...
function mt (line 31) | function mt(e){gt(e,_t),_t.clear()}
function gt (line 31) | function gt(e,t){var n,i,r=Array.isArray(e);if(!(!r&&!l(e)||Object.isFro...
function vt (line 31) | function vt(e,t){function n(){var e=arguments,i=n.fns;if(!Array.isArray(...
function Et (line 31) | function Et(e,t,n,r,o,s){var l,c,u,d;for(l in e)c=e[l],u=t[l],d=bt(l),i(...
function yt (line 31) | function yt(e,t,n){var o;e instanceof ve&&(e=e.data.hook||(e.data.hook={...
function St (line 31) | function St(e,t,n){var a=t.options.props;if(!i(a)){var o={},s=e.attrs,l=...
function Ct (line 31) | function Ct(e,t,n,i,a){if(r(t)){if(E(t,n))return e[n]=t[n],a||delete t[n...
function Tt (line 31) | function Tt(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return ...
function xt (line 31) | function xt(e){return s(e)?[Se(e)]:Array.isArray(e)?Ot(e):void 0}
function wt (line 31) | function wt(e){return r(e)&&r(e.text)&&o(e.isComment)}
function Ot (line 31) | function Ot(e,t){var n,o,l,c,u=[];for(n=0;n<e.length;n++)o=e[n],i(o)||"b...
function Nt (line 31) | function Nt(e){var t=e.$options.provide;t&&(e._provided="function"===typ...
function Rt (line 31) | function Rt(e){var t=kt(e.$options.inject,e);t&&(Re(!1),Object.keys(t).f...
function kt (line 31) | function kt(e,t){if(e){for(var n=Object.create(null),i=pe?Reflect.ownKey...
function At (line 31) | function At(e,t){if(!e||!e.length)return{};for(var n={},i=0,r=e.length;i...
function Dt (line 31) | function Dt(e){return e.isComment&&!e.asyncFactory||" "===e.text}
function It (line 31) | function It(e,t,i){var r,a=Object.keys(t).length>0,o=e?!!e.$stable:!a,s=...
function Mt (line 31) | function Mt(e,t,n){var i=function(){var e=arguments.length?n.apply(null,...
function Lt (line 31) | function Lt(e,t){return function(){return e[t]}}
function Pt (line 31) | function Pt(e,t){var n,i,a,o,s;if(Array.isArray(e)||"string"===typeof e)...
function Ft (line 31) | function Ft(e,t,n,i){var r,a=this.$scopedSlots[e];a?(n=n||{},i&&(n=A(A({...
function Bt (line 31) | function Bt(e){return Ke(this.$options,"filters",e,!0)||L}
function Ut (line 31) | function Ut(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}
function $t (line 31) | function $t(e,t,n,i,r){var a=G.keyCodes[t]||n;return r&&i&&!G.keyCodes[t...
function jt (line 31) | function jt(e,t,n,i,r){if(n)if(l(n)){var a;Array.isArray(n)&&(n=D(n));va...
function Gt (line 31) | function Gt(e,t){var n=this._staticTrees||(this._staticTrees=[]),i=n[e];...
function qt (line 31) | function qt(e,t,n){return Ht(e,"__once__"+t+(n?"_"+n:""),!0),e}
function Ht (line 31) | function Ht(e,t,n){if(Array.isArray(e))for(var i=0;i<e.length;i++)e[i]&&...
function Vt (line 31) | function Vt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}
function zt (line 31) | function zt(e,t){if(t)if(u(t)){var n=e.on=e.on?A({},e.on):{};for(var i i...
function Yt (line 31) | function Yt(e,t,n,i){t=t||{$stable:!n};for(var r=0;r<e.length;r++){var a...
function Wt (line 31) | function Wt(e,t){for(var n=0;n<t.length;n+=2){var i=t[n];"string"===type...
function Kt (line 31) | function Kt(e,t){return"string"===typeof e?t+e:e}
function Qt (line 31) | function Qt(e){e._o=qt,e._n=_,e._s=f,e._l=Pt,e._t=Ft,e._q=P,e._i=F,e._m=...
function Xt (line 31) | function Xt(e,t,i,r,o){var s,l=this,c=o.options;E(r,"_uid")?(s=Object.cr...
function Zt (line 31) | function Zt(e,t,i,a,o){var s=e.options,l={},c=s.props;if(r(c))for(var u ...
function Jt (line 31) | function Jt(e,t,n,i,r){var a=Ce(e);return a.fnContext=n,a.fnOptions=i,t....
function en (line 31) | function en(e,t){for(var n in t)e[C(n)]=t[n]}
function rn (line 31) | function rn(e,t,n,o,s){if(!i(e)){var c=n.$options._base;if(l(e)&&(e=c.ex...
function an (line 31) | function an(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},i=e.dat...
function on (line 31) | function on(e){for(var t=e.hook||(e.hook={}),n=0;n<nn.length;n++){var i=...
function sn (line 31) | function sn(e,t){var n=function(n,i){e(n,i),t(n,i)};return n._merged=!0,n}
function ln (line 31) | function ln(e,t){var n=e.model&&e.model.prop||"value",i=e.model&&e.model...
function dn (line 31) | function dn(e,t,n,i,r,o){return(Array.isArray(n)||s(n))&&(r=i,i=n,n=void...
function pn (line 31) | function pn(e,t,n,i,a){if(r(n)&&r(n.__ob__))return ye();if(r(n)&&r(n.is)...
function hn (line 31) | function hn(e,t,n){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,n=!0),r(...
function fn (line 31) | function fn(e){l(e.style)&&mt(e.style),l(e.class)&&mt(e.class)}
function _n (line 31) | function _n(e){e._vnode=null,e._staticTrees=null;var t=e.$options,i=e.$v...
function bn (line 31) | function bn(e){Qt(e.prototype),e.prototype.$nextTick=function(e){return ...
function vn (line 31) | function vn(e,t){return(e.__esModule||pe&&"Module"===e[Symbol.toStringTa...
function En (line 31) | function En(e,t,n,i,r){var a=ye();return a.asyncFactory=e,a.asyncMeta={d...
function yn (line 31) | function yn(e,t){if(a(e.error)&&r(e.errorComp))return e.errorComp;if(r(e...
function Sn (line 31) | function Sn(e){return e.isComment&&e.asyncFactory}
function Cn (line 31) | function Cn(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t...
function Tn (line 31) | function Tn(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e....
function xn (line 31) | function xn(e,t){mn.$on(e,t)}
function wn (line 31) | function wn(e,t){mn.$off(e,t)}
function On (line 31) | function On(e,t){var n=mn;return function i(){var r=t.apply(null,argumen...
function Nn (line 31) | function Nn(e,t,n){mn=e,Et(t,n||{},xn,wn,On,e),mn=void 0}
function Rn (line 31) | function Rn(e){var t=/^hook:/;e.prototype.$on=function(e,n){var i=this;i...
function An (line 31) | function An(e){var t=kn;return kn=e,function(){kn=t}}
function Dn (line 31) | function Dn(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){while(n.$o...
function In (line 31) | function In(e){e.prototype._update=function(e,t){var n=this,i=n.$el,r=n....
function Mn (line 31) | function Mn(e,t,n){var i;return e.$el=t,e.$options.render||(e.$options.r...
function Ln (line 31) | function Ln(e,t,i,r,a){var o=r.data.scopedSlots,s=e.$scopedSlots,l=!!(o&...
function Pn (line 31) | function Pn(e){while(e&&(e=e.$parent))if(e._inactive)return!0;return!1}
function Fn (line 31) | function Fn(e,t){if(t){if(e._directInactive=!1,Pn(e))return}else if(e._d...
function Bn (line 31) | function Bn(e,t){if((!t||(e._directInactive=!0,!Pn(e)))&&!e._inactive){e...
function Un (line 31) | function Un(e,t){ge();var n=e.$options[t],i=t+" hook";if(n)for(var r=0,a...
function zn (line 31) | function zn(){Vn=$n.length=jn.length=0,Gn={},qn=Hn=!1}
function Qn (line 31) | function Qn(){var e,t;for(Yn=Wn(),Hn=!0,$n.sort((function(e,t){return e....
function Xn (line 31) | function Xn(e){var t=e.length;while(t--){var n=e[t],i=n.vm;i._watcher===...
function Zn (line 31) | function Zn(e){e._inactive=!1,jn.push(e)}
function Jn (line 31) | function Jn(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Fn(e[t],!0)}
function ei (line 31) | function ei(e){var t=e.id;if(null==Gn[t]){if(Gn[t]=!0,Hn){var n=$n.lengt...
function ri (line 31) | function ri(e,t,n){ii.get=function(){return this[t][n]},ii.set=function(...
function ai (line 31) | function ai(e){e._watchers=[];var t=e.$options;t.props&&oi(e,t.props),t....
function oi (line 31) | function oi(e,t){var n=e.$options.propsData||{},i=e._props={},r=e.$optio...
function si (line 31) | function si(e){var t=e.$options.data;t=e._data="function"===typeof t?li(...
function li (line 31) | function li(e,t){ge();try{return e.call(t,t)}catch(Co){return tt(Co,t,"d...
function ui (line 31) | function ui(e,t){var n=e._computedWatchers=Object.create(null),i=le();fo...
function di (line 31) | function di(e,t,n){var i=!le();"function"===typeof n?(ii.get=i?pi(t):hi(...
function pi (line 31) | function pi(e){return function(){var t=this._computedWatchers&&this._com...
function hi (line 31) | function hi(e){return function(){return e.call(this,this)}}
function fi (line 31) | function fi(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeo...
function _i (line 31) | function _i(e,t){for(var n in t){var i=t[n];if(Array.isArray(i))for(var ...
function mi (line 31) | function mi(e,t,n,i){return u(n)&&(i=n,n=n.handler),"string"===typeof n&...
function gi (line 31) | function gi(e){var t={get:function(){return this._data}},n={get:function...
function vi (line 31) | function vi(e){e.prototype._init=function(e){var t=this;t._uid=bi++,t._i...
function Ei (line 31) | function Ei(e,t){var n=e.$options=Object.create(e.constructor.options),i...
function yi (line 31) | function yi(e){var t=e.options;if(e.super){var n=yi(e.super),i=e.superOp...
function Si (line 31) | function Si(e){var t,n=e.options,i=e.sealedOptions;for(var r in n)n[r]!=...
function Ci (line 31) | function Ci(e){this._init(e)}
function Ti (line 31) | function Ti(e){e.use=function(e){var t=this._installedPlugins||(this._in...
function xi (line 31) | function xi(e){e.mixin=function(e){return this.options=We(this.options,e...
function wi (line 31) | function wi(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,i...
function Oi (line 31) | function Oi(e){var t=e.options.props;for(var n in t)ri(e.prototype,"_pro...
function Ni (line 31) | function Ni(e){var t=e.options.computed;for(var n in t)di(e.prototype,n,...
function Ri (line 31) | function Ri(e){$.forEach((function(t){e[t]=function(e,n){return n?("comp...
function ki (line 31) | function ki(e){return e&&(e.Ctor.options.name||e.tag)}
function Ai (line 31) | function Ai(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===type...
function Di (line 31) | function Di(e,t){var n=e.cache,i=e.keys,r=e._vnode;for(var a in n){var o...
function Ii (line 31) | function Ii(e,t,n,i){var r=e[t];!r||i&&r.tag===i.tag||r.componentInstanc...
function Fi (line 31) | function Fi(e){var t={get:function(){return G}};Object.defineProperty(e,...
function Ki (line 31) | function Ki(e){var t=e.data,n=e,i=e;while(r(i.componentInstance))i=i.com...
function Qi (line 31) | function Qi(e,t){return{staticClass:Zi(e.staticClass,t.staticClass),clas...
function Xi (line 31) | function Xi(e,t){return r(e)||r(t)?Zi(e,Ji(t)):""}
function Zi (line 31) | function Zi(e,t){return e?t?e+" "+t:e:t||""}
function Ji (line 31) | function Ji(e){return Array.isArray(e)?er(e):l(e)?tr(e):"string"===typeo...
function er (line 31) | function er(e){for(var t,n="",i=0,a=e.length;i<a;i++)r(t=Ji(e[i]))&&""!=...
function tr (line 31) | function tr(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}
function or (line 31) | function or(e){return rr(e)?"svg":"math"===e?"math":void 0}
function lr (line 31) | function lr(e){if(!Q)return!0;if(ar(e))return!1;if(e=e.toLowerCase(),nul...
function ur (line 31) | function ur(e){if("string"===typeof e){var t=document.querySelector(e);r...
function dr (line 31) | function dr(e,t){var n=document.createElement(e);return"select"!==e||t.d...
function pr (line 31) | function pr(e,t){return document.createElementNS(nr[e],t)}
function hr (line 31) | function hr(e){return document.createTextNode(e)}
function fr (line 31) | function fr(e){return document.createComment(e)}
function _r (line 31) | function _r(e,t,n){e.insertBefore(t,n)}
function mr (line 31) | function mr(e,t){e.removeChild(t)}
function gr (line 31) | function gr(e,t){e.appendChild(t)}
function br (line 31) | function br(e){return e.parentNode}
function vr (line 31) | function vr(e){return e.nextSibling}
function Er (line 31) | function Er(e){return e.tagName}
function yr (line 31) | function yr(e,t){e.textContent=t}
function Sr (line 31) | function Sr(e,t){e.setAttribute(t,"")}
function xr (line 31) | function xr(e,t){var n=e.data.ref;if(r(n)){var i=e.context,a=e.component...
function Nr (line 31) | function Nr(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.i...
function Rr (line 31) | function Rr(e,t){if("input"!==e.tag)return!0;var n,i=r(n=e.data)&&r(n=n....
function kr (line 31) | function kr(e,t,n){var i,a,o={};for(i=t;i<=n;++i)a=e[i].key,r(a)&&(o[a]=...
function Ar (line 31) | function Ar(e){var t,n,o={},l=e.modules,c=e.nodeOps;for(t=0;t<Or.length;...
function Ir (line 31) | function Ir(e,t){(e.data.directives||t.data.directives)&&Mr(e,t)}
function Mr (line 31) | function Mr(e,t){var n,i,r,a=e===wr,o=t===wr,s=Pr(e.data.directives,e.co...
function Pr (line 31) | function Pr(e,t){var n,i,r=Object.create(null);if(!e)return r;for(n=0;n<...
function Fr (line 31) | function Fr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{})...
function Br (line 31) | function Br(e,t,n,i,r){var a=e.def&&e.def[t];if(a)try{a(n.elm,e,n,i,r)}c...
function $r (line 31) | function $r(e,t){var n=t.componentOptions;if((!r(n)||!1!==n.Ctor.options...
function jr (line 31) | function jr(e,t,n){e.tagName.indexOf("-")>-1?Gr(e,t,n):Hi(t)?Wi(n)?e.rem...
function Gr (line 31) | function Gr(e,t,n){if(Wi(n))e.removeAttribute(t);else{if(ee&&!te&&"TEXTA...
function Hr (line 31) | function Hr(e,t){var n=t.elm,a=t.data,o=e.data;if(!(i(a.staticClass)&&i(...
function Kr (line 31) | function Kr(e){if(r(e[Yr])){var t=ee?"change":"input";e[t]=[].concat(e[Y...
function Qr (line 31) | function Qr(e,t,n){var i=Vr;return function r(){var a=t.apply(null,argum...
function Zr (line 31) | function Zr(e,t,n,i){if(Xr){var r=Yn,a=t;t=a._wrapper=function(e){if(e.t...
function Jr (line 31) | function Jr(e,t,n,i){(i||Vr).removeEventListener(e,t._wrapper||t,n)}
function ea (line 31) | function ea(e,t){if(!i(e.data.on)||!i(t.data.on)){var n=t.data.on||{},r=...
function ia (line 31) | function ia(e,t){if(!i(e.data.domProps)||!i(t.data.domProps)){var n,a,o=...
function ra (line 31) | function ra(e,t){return!e.composing&&("OPTION"===e.tagName||aa(e,t)||oa(...
function aa (line 31) | function aa(e,t){var n=!0;try{n=document.activeElement!==e}catch(Co){}re...
function oa (line 31) | function oa(e,t){var n=e.value,i=e._vModifiers;if(r(i)){if(i.number)retu...
function ca (line 31) | function ca(e){var t=ua(e.style);return e.staticStyle?A(e.staticStyle,t):t}
function ua (line 31) | function ua(e){return Array.isArray(e)?D(e):"string"===typeof e?la(e):e}
function da (line 31) | function da(e,t){var n,i={};if(t){var r=e;while(r.componentInstance)r=r....
function ba (line 31) | function ba(e,t){var n=t.data,a=e.data;if(!(i(n.staticStyle)&&i(n.style)...
function ya (line 31) | function ya(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.s...
function Sa (line 31) | function Sa(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.s...
function Ca (line 31) | function Ca(e){if(e){if("object"===typeof e){var t={};return!1!==e.css&&...
function Ia (line 31) | function Ia(e){Da((function(){Da(e)}))}
function Ma (line 31) | function Ma(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n...
function La (line 31) | function La(e,t){e._transitionClasses&&b(e._transitionClasses,t),Sa(e,t)}
function Pa (line 31) | function Pa(e,t,n){var i=Ba(e,t),r=i.type,a=i.timeout,o=i.propCount;if(!...
function Ba (line 31) | function Ba(e,t){var n,i=window.getComputedStyle(e),r=(i[Na+"Delay"]||""...
function Ua (line 31) | function Ua(e,t){while(e.length<t.length)e=e.concat(e);return Math.max.a...
function $a (line 31) | function $a(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}
function ja (line 31) | function ja(e,t){var n=e.elm;r(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._...
function Ga (line 31) | function Ga(e,t){var n=e.elm;r(n._enterCb)&&(n._enterCb.cancelled=!0,n._...
function qa (line 31) | function qa(e){return"number"===typeof e&&!isNaN(e)}
function Ha (line 31) | function Ha(e){if(i(e))return!1;var t=e.fns;return r(t)?Ha(Array.isArray...
function Va (line 31) | function Va(e,t){!0!==t.data.show&&ja(t)}
function Xa (line 31) | function Xa(e,t,n){Za(e,t,n),(ee||ne)&&setTimeout((function(){Za(e,t,n)}...
function Za (line 31) | function Za(e,t,n){var i=t.value,r=e.multiple;if(!r||Array.isArray(i)){f...
function Ja (line 31) | function Ja(e,t){return t.every((function(t){return!P(t,e)}))}
function eo (line 31) | function eo(e){return"_value"in e?e._value:e.value}
function to (line 31) | function to(e){e.target.composing=!0}
function no (line 31) | function no(e){e.target.composing&&(e.target.composing=!1,io(e.target,"i...
function io (line 31) | function io(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,...
function ro (line 31) | function ro(e){return!e.componentInstance||e.data&&e.data.transition?e:r...
function lo (line 31) | function lo(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abst...
function co (line 31) | function co(e){var t={},n=e.$options;for(var i in n.propsData)t[i]=e[i];...
function uo (line 31) | function uo(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{...
function po (line 31) | function po(e){while(e=e.parent)if(e.data.transition)return!0}
function ho (line 31) | function ho(e,t){return t.key===e.key&&t.tag===e.tag}
function vo (line 31) | function vo(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._ent...
function Eo (line 31) | function Eo(e){e.data.newPos=e.elm.getBoundingClientRect()}
function yo (line 31) | function yo(e){var t=e.data.pos,n=e.data.newPos,i=t.left-n.left,r=t.top-...
function n (line 31) | function n(e){return{name:"FIX",contains:[{begin:/[^\u2401\u0001]+/,end:...
function n (line 31) | function n(e){const t="([ui](8|16|32|64|128|size)|f(32|64))?",n="abstrac...
function c (line 31) | function c(e){const t=["npm","print"],r=["yes","no","on","off","it","tha...
function n (line 31) | function n(e){const t="\\[",n="\\]";return{name:"Inform 7",aliases:["i7"...
function n (line 31) | function n(e){var t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\...
function n (line 31) | function n(e){return{name:"Protocol Buffers",keywords:{keyword:"package ...
function n (line 31) | function n(e){return{name:"Leaf",contains:[{className:"function",begin:"...
function i (line 37) | function i(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({bef...
function o (line 37) | function o(e){a&&(e._devtoolHook=a,a.emit("vuex:init",e),a.on("vuex:trav...
function s (line 37) | function s(e,t){return e.filter(t)[0]}
function l (line 37) | function l(e,t){if(void 0===t&&(t=[]),null===e||"object"!==typeof e)retu...
function c (line 37) | function c(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}
function u (line 37) | function u(e){return null!==e&&"object"===typeof e}
method constructor (line 1) | constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(...
method addText (line 1) | addText(e){this.buffer+=o(e)}
method openNode (line 1) | openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.cla...
method closeNode (line 1) | closeNode(e){c(e)&&(this.buffer+=l)}
method value (line 1) | value(){return this.buffer}
method span (line 1) | span(e){this.buffer+=`<span class="${e}">`}
function d (line 37) | function d(e){return e&&"function"===typeof e.then}
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function p (line 37) | function p(e,t){return function(){return e(t)}}
method constructor (line 1) | constructor(e){super(),this.options=e}
method addKeyword (line 1) | addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNo...
method addText (line 1) | addText(e){""!==e&&this.add(e)}
method addSublanguage (line 1) | addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}
method toHTML (line 1) | toHTML(){const e=new u(this,this.options);return e.value()}
method finalize (line 1) | finalize(){return!0}
function m (line 37) | function m(e,t,n){if(t.update(n),n.modules)for(var i in n.modules){if(!t...
function E (line 37) | function E(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.pu...
function y (line 37) | function y(e,t){e._actions=Object.create(null),e._mutations=Object.creat...
function S (line 37) | function S(e,t,n){var i=e._vm;e.getters={},e._makeLocalGettersCache=Obje...
function C (line 37) | function C(e,t,n,i,r){var a=!n.length,o=e._modules.getNamespace(n);if(i....
function T (line 37) | function T(e,t,n){var i=""===t,r={dispatch:i?e.dispatch:function(n,i,r){...
function x (line 37) | function x(e,t){if(!e._makeLocalGettersCache[t]){var n={},i=t.length;Obj...
function w (line 37) | function w(e,t,n,i){var r=e._mutations[t]||(e._mutations[t]=[]);r.push((...
function O (line 37) | function O(e,t,n,i){var r=e._actions[t]||(e._actions[t]=[]);r.push((func...
function N (line 37) | function N(e,t,n,i){e._wrappedGetters[t]||(e._wrappedGetters[t]=function...
function R (line 37) | function R(e){e._vm.$watch((function(){return this._data.$$state}),(func...
function k (line 37) | function k(e,t){return t.reduce((function(e,t){return e[t]}),e)}
function A (line 37) | function A(e,t,n){return u(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payloa...
function D (line 37) | function D(e){g&&e===g||(g=e,i(g))}
function B (line 37) | function B(e){return U(e)?Array.isArray(e)?e.map((function(e){return{key...
function U (line 37) | function U(e){return Array.isArray(e)||u(e)}
function $ (line 37) | function $(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):...
function j (line 37) | function j(e,t,n){var i=e._modulesNamespaceMap[n];return i}
function G (line 37) | function G(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);va...
function q (line 37) | function q(e,t,n){var i=n?e.groupCollapsed:e.group;try{i.call(e,t)}catch...
function H (line 37) | function H(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}
function V (line 37) | function V(){var e=new Date;return" @ "+Y(e.getHours(),2)+":"+Y(e.getMin...
function z (line 37) | function z(e,t){return new Array(t+1).join(e)}
function Y (line 37) | function Y(e,t){return z("0",t-e.toString().length)+e}
function n (line 37) | function n(e){const t="[A-Za-z_][0-9A-Za-z_]*",n={keyword:"if for while ...
function r (line 37) | function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(...
function n (line 37) | function n(e){const t="\\d(_|\\d)*",n="[eE][-+]?"+t,i=t+"(\\."+t+")?("+n...
function o (line 37) | function o(e){var t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=t+"(<"+t+"(\\s*,\...
function n (line 37) | function n(e){return{name:"Gherkin",aliases:["feature"],keywords:"Featur...
function n (line 37) | function n(e){const t=e.COMMENT(/\{/,/\}/,{contains:["self"]});return{na...
function r (line 37) | function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.se...
function n (line 37) | function n(e){const t="if then else elseif for thru do while unless step...
function r (line 37) | function r(e){return!!e&&"object"===typeof e}
function a (line 37) | function a(e){var t=Object.prototype.toString.call(e);return"[object Reg...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function l (line 37) | function l(e){return e.$$typeof===s}
function c (line 37) | function c(e){return Array.isArray(e)?[]:{}}
function u (line 37) | function u(e,t){var n=t&&!0===t.clone;return n&&i(e)?h(c(e),e,t):e}
method constructor (line 1) | constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(...
method addText (line 1) | addText(e){this.buffer+=o(e)}
method openNode (line 1) | openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.cla...
method closeNode (line 1) | closeNode(e){c(e)&&(this.buffer+=l)}
method value (line 1) | value(){return this.buffer}
method span (line 1) | span(e){this.buffer+=`<span class="${e}">`}
function d (line 37) | function d(e,t,n){var r=e.slice();return t.forEach((function(t,a){"undef...
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function p (line 37) | function p(e,t,n){var r={};return i(e)&&Object.keys(e).forEach((function...
method constructor (line 1) | constructor(e){super(),this.options=e}
method addKeyword (line 1) | addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNo...
method addText (line 1) | addText(e){""!==e&&this.add(e)}
method addSublanguage (line 1) | addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}
method toHTML (line 1) | toHTML(){const e=new u(this,this.options);return e.value()}
method finalize (line 1) | finalize(){return!0}
function h (line 37) | function h(e,t,n){var i=Array.isArray(t),r=Array.isArray(e),a=n||{arrayM...
function n (line 37) | function n(e){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,key...
function n (line 37) | function n(e){const t={variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\...
function a (line 37) | function a(e){return e&&e.__esModule?e:{default:e}}
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 37) | function n(e){const t="do if then else end until while abort array attri...
function n (line 37) | function n(e){const t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n="(-|\\+)...
function n (line 37) | function n(e){return{aliases:["pycon"],contains:[{className:"meta",start...
function o (line 37) | function o(e){return e&&e.__esModule?e:{default:e}}
function d (line 37) | function d(e,t,n){return function(){var i=arguments.length>0&&void 0!==a...
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function a (line 37) | function a(e){return e&&e.__esModule?e:{default:e}}
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function a (line 37) | function a(e){return null!==e&&"object"===("undefined"===typeof e?"undef...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 37) | function n(e){return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"...
function n (line 37) | function n(e){const t={begin:/[a-z][A-Za-z0-9_]*/,relevance:0},n={classN...
function n (line 37) | function n(e){return{name:"Dockerfile",aliases:["docker"],case_insensiti...
function n (line 37) | function n(e){return{name:"Plain text",aliases:["text","txt"],disableAut...
function n (line 37) | function n(e){const t={keyword:"rec with let in inherit assert if else t...
function n (line 37) | function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{...
function i (line 37) | function i(e,t,n,i,r,a,o,s){var l,c="function"===typeof e?e.options:e;if...
function e (line 37) | function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.en...
function D (line 37) | function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function e (line 37) | function e(t,n,i){D(this,e),this.data=t,this.config=n,this.parent=i||nul...
function P (line 37) | function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function e (line 37) | function e(t,n){P(this,e),this.config=n,this.initNodes(t)}
function n (line 37) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 37) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 37) | function r(e){const t={className:"params",begin:"\\(",end:"\\)"},n={vari...
function d (line 37) | function d(e){return e&&e.__esModule?e:{default:e}}
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function n (line 37) | function n(e){return{name:"Diff",aliases:["patch"],contains:[{className:...
function n (line 37) | function n(e){return{name:"Cap’n Proto",aliases:["capnp"],keywords:{keyw...
function o (line 37) | function o(e){return e&&e.__esModule?e:{default:e}}
function u (line 37) | function u(e){return e?"string"===typeof e?e:e.source:null}
method constructor (line 1) | constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(...
method addText (line 1) | addText(e){this.buffer+=o(e)}
method openNode (line 1) | openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.cla...
method closeNode (line 1) | closeNode(e){c(e)&&(this.buffer+=l)}
method value (line 1) | value(){return this.buffer}
method span (line 1) | span(e){this.buffer+=`<span class="${e}">`}
function d (line 37) | function d(e){return p("(?=",e,")")}
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function p (line 37) | function p(...e){const t=e.map(e=>u(e)).join("");return t}
method constructor (line 1) | constructor(e){super(),this.options=e}
method addKeyword (line 1) | addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNo...
method addText (line 1) | addText(e){""!==e&&this.add(e)}
method addSublanguage (line 1) | addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}
method toHTML (line 1) | toHTML(){const e=new u(this,this.options);return e.value()}
method finalize (line 1) | finalize(){return!0}
function h (line 37) | function h(e){const t=(e,{after:t})=>{const n="</"+e[0].slice(1),i=e.inp...
function n (line 37) | function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{...
function i (line 37) | function i(e,t,n,i,r,a,o,s){var l,c="function"===typeof e?e.options:e;if...
function n (line 37) | function n(e){return{name:"HAML",case_insensitive:!0,contains:[{classNam...
function n (line 37) | function n(e){const t={keyword:"and case default else elsif false if in ...
function n (line 37) | function n(e){const t={variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\...
function n (line 37) | function n(e){const t=["string","char","byte","int","long","bool","decim...
function p (line 37) | function p(e){return e&&e.__esModule?e:{default:e}}
method constructor (line 1) | constructor(e){super(),this.options=e}
method addKeyword (line 1) | addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNo...
method addText (line 1) | addText(e){""!==e&&this.add(e)}
method addSublanguage (line 1) | addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}
method toHTML (line 1) | toHTML(){const e=new u(this,this.options);return e.value()}
method finalize (line 1) | finalize(){return!0}
function n (line 37) | function n(e){return{name:"Clean",aliases:["clean","icl","dcl"],keywords...
function s (line 37) | function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}
function r (line 37) | function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a ...
function e (line 37) | function e(){r(this,e)}
function n (line 37) | function n(e){var t="[ \\t\\f]*",n="[ \\t\\f]+",i=t+"[:=]"+t,r=n,a="("+i...
function n (line 37) | function n(e){const t={className:"literal",begin:/[+-]/,relevance:0};ret...
function o (line 37) | function o(e){return e&&e.__esModule?e:{default:e}}
function _ (line 37) | function _(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Erro...
function m (line 37) | function m(e,t){if(e){for(var n=e.className,i=(t||"").split(" "),r=0,a=i...
function g (line 37) | function g(e,t){if(e&&t){for(var n=t.split(" "),i=" "+e.className+" ",r=...
function v (line 37) | function v(e,t,n){if(e&&t)if("object"===("undefined"===typeof t?"undefin...
function o (line 37) | function o(){var o=this,s=Number(new Date)-a,l=arguments;function c(){a=...
function n (line 37) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 37) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 37) | function r(...e){const t="("+e.map(e=>n(e)).join("|")+")";return t}
function a (line 37) | function a(e){const t="lcase month vartype instrrev ubound setlocale get...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 37) | function n(e){const t={literal:"true false null"},n=[e.C_LINE_COMMENT_MO...
function n (line 37) | function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{...
function s (line 37) | function s(e,t,n,i,r,a,o,s){var l,c="function"===typeof e?e.options:e;if...
function St (line 37) | function St(e){var t=window.getComputedStyle(e),n=t.getPropertyValue("bo...
function Ct (line 37) | function Ct(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments...
function er (line 37) | function er(e,t){return Object.prototype.hasOwnProperty.call(e,t)}
function tr (line 37) | function tr(e,t){var n={},i=void 0;for(i in e)n[i]=e[i];for(i in t)if(er...
function nr (line 37) | function nr(e){return void 0!==e&&(e=parseInt(e,10),isNaN(e)&&(e=null)),e}
function ir (line 37) | function ir(e){return"undefined"!==typeof e&&(e=nr(e),isNaN(e)&&(e=80)),e}
function rr (line 37) | function rr(e){return"number"===typeof e?e:"string"===typeof e?/^\d+(?:p...
function ar (line 37) | function ar(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arg...
function or (line 37) | function or(e,t,n){var i=!1,r=e.indexOf(t),a=-1!==r,o=function(){e.push(...
function sr (line 37) | function sr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?argumen...
function mr (line 37) | function mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments...
function gr (line 37) | function gr(e){var t={};return Object.keys(e).forEach((function(n){var i...
function Er (line 37) | function Er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a...
function e (line 37) | function e(t){for(var n in Er(this,e),this.observers=[],this.table=null,...
function Zr (line 37) | function Zr(e,t){var n=t.row,i=t.column,r=t.$index,a=i.property,o=a&&Obj...
function Jr (line 37) | function Jr(e,t){var n=t.row,i=t.treeNode,r=t.store;if(!i)return null;va...
function xl (line 37) | function xl(){}
function e (line 37) | function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.en...
function sc (line 37) | function sc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a...
function e (line 37) | function e(t){for(var n in sc(this,e),this.id=dc++,this.text=null,this.c...
function _c (line 37) | function _c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a...
function e (line 37) | function e(t){var n=this;for(var i in _c(this,e),this.currentNode=null,t...
function Ju (line 37) | function Ju(e,t,n){var i=void 0;i=n.response?""+(n.response.error||n.res...
function ed (line 37) | function ed(e){var t=e.responseText||e.response;if(!t)return t;try{retur...
function td (line 37) | function td(e){if("undefined"!==typeof XMLHttpRequest){var t=new XMLHttp...
function fd (line 37) | function fd(){}
function Gp (line 37) | function Gp(e){var t=e.move,n=e.size,i=e.bar,r={},a="translate"+i.axis+"...
function Dh (line 37) | function Dh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a...
function e (line 37) | function e(t){for(var n in Dh(this,e),this._hue=0,this._saturation=100,t...
function e (line 37) | function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.en...
function Og (line 37) | function Og(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a...
function e (line 37) | function e(t,n,i){Og(this,e),this.data=t,this.config=n,this.parent=i||nu...
function Ag (line 37) | function Ag(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a...
function e (line 37) | function e(t,n){Ag(this,e),this.config=n,this.initNodes(t)}
function n (line 37) | function n(e){const t={$pattern:/(`?)[A-Za-z0-9_]+\b/,keyword:"do while ...
function l (line 37) | function l(e){const t=n(e),l=o,c=a,u="@[a-z-]+",d="and or not only",p="[...
function n (line 37) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 37) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 37) | function r(e){const t={keyword:"in of on if for while finally var new fu...
function n (line 37) | function n(e,n,i){this._reference=e.jquery?e[0]:e,this.state={};var r="u...
function i (line 37) | function i(t){var n=t.style.display,i=t.style.visibility;t.style.display...
function r (line 37) | function r(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"...
function a (line 37) | function a(e){var t=Object.assign({},e);return t.right=t.left+t.width,t....
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function o (line 37) | function o(e,t){var n,i=0;for(n in e){if(e[n]===t)return i;i++}return null}
function s (line 37) | function s(t,n){var i=e.getComputedStyle(t,null);return i[n]}
function l (line 37) | function l(t){var n=t.offsetParent;return n!==e.document.body&&n?n:e.doc...
function c (line 37) | function c(t){var n=t.parentNode;return n?n===e.document?e.document.body...
function u (line 37) | function u(t){return t!==e.document.body&&("fixed"===s(t,"position")||(t...
method constructor (line 1) | constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(...
method addText (line 1) | addText(e){this.buffer+=o(e)}
method openNode (line 1) | openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.cla...
method closeNode (line 1) | closeNode(e){c(e)&&(this.buffer+=l)}
method value (line 1) | value(){return this.buffer}
method span (line 1) | span(e){this.buffer+=`<span class="${e}">`}
function d (line 37) | function d(e,t){function n(e){return""!==e&&!isNaN(parseFloat(e))&&isFin...
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function p (line 37) | function p(e){var t={};return e&&"[object Function]"===t.toString.call(e)}
method constructor (line 1) | constructor(e){super(),this.options=e}
method addKeyword (line 1) | addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNo...
method addText (line 1) | addText(e){""!==e&&this.add(e)}
method addSublanguage (line 1) | addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}
method toHTML (line 1) | toHTML(){const e=new u(this,this.options);return e.value()}
method finalize (line 1) | finalize(){return!0}
function h (line 37) | function h(e){var t={width:e.offsetWidth,height:e.offsetHeight,left:e.of...
function f (line 37) | function f(e){var t=e.getBoundingClientRect(),n=-1!=navigator.userAgent....
function _ (line 37) | function _(e,t,n){var i=f(e),r=f(t);if(n){var a=c(t);r.top+=a.scrollTop,...
function m (line 37) | function m(t){for(var n=["","ms","webkit","moz","o"],i=0;i<n.length;i++)...
function s (line 37) | function s(e,t){t.forEach((function(t){e.classList.add(t)}))}
function l (line 37) | function l(e,t){t.forEach((function(t){e.setAttribute(t.split(":")[0],t....
function n (line 37) | function n(e){return{name:"Mojolicious",subLanguage:"xml",contains:[{cla...
function n (line 44) | function n(){}
function r (line 44) | function r(){i.off(e,r),t.apply(n,arguments)}
function r (line 44) | function r(e,t,n,r,a){var o=function(e,t,n,r){return function(n){n.deleg...
function o (line 44) | function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.en...
function s (line 44) | function s(e){!function(e,t){if(!(e instanceof t))throw new TypeError("C...
function _ (line 44) | function _(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.en...
function g (line 44) | function g(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError(...
function b (line 44) | function b(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t....
function e (line 44) | function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{...
function n (line 44) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 44) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 44) | function r(...e){const t="("+e.map(e=>n(e)).join("|")+")";return t}
function a (line 44) | function a(e){const t=["abs","accept","alarm","and","atan2","bind","binm...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 44) | function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{...
function i (line 44) | function i(e,t,n,i,r,a,o,s){var l,c="function"===typeof e?e.options:e;if...
function e (line 44) | function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(...
function t (line 44) | function t(){this.__entries__=[]}
function s (line 44) | function s(e,t){var n=!1,i=!1,r=0;function s(){n&&(n=!1,e()),i&&c()}func...
function e (line 44) | function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutati...
function _ (line 44) | function _(e){return parseFloat(e)||0}
function m (line 44) | function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n...
function g (line 44) | function g(e){for(var t=["top","right","bottom","left"],n={},i=0,r=t;i<r...
function b (line 44) | function b(e){var t=e.getBBox();return T(0,0,t.width,t.height)}
function v (line 44) | function v(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;va...
function y (line 44) | function y(e){return e===h(e).document.documentElement}
function S (line 44) | function S(e){return i?E(e)?b(e):v(e):f}
function C (line 44) | function C(e){var t=e.x,n=e.y,i=e.width,r=e.height,a="undefined"!==typeo...
function T (line 44) | function T(e,t,n,i){return{x:e,y:t,width:n,height:i}}
function e (line 44) | function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentR...
function e (line 44) | function e(e,t){var n=C(t);p(this,{target:e,contentRect:n})}
function e (line 44) | function e(e,t,i){if(this.activeObservations_=[],this.observations_=new ...
function e (line 44) | function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a...
function n (line 44) | function n(e){const t={$pattern:/\.?\w+/,keyword:"abstract add and array...
function o (line 44) | function o(e){return e&&e.__esModule?e:{default:e}}
function n (line 44) | function n(e){return{name:"Backus–Naur Form",contains:[{className:"attri...
function n (line 44) | function n(e){const t={className:"variable",begin:/\$[\w\d#@][\w\d_]*/},...
function n (line 44) | function n(e){const t="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",n="[a-zA-Z_]\\w*...
function n (line 44) | function n(e){const t="div mod in and or not xor asserterror begin case ...
function n (line 44) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 44) | function i(e){return a("(",e,")*")}
function r (line 44) | function r(e){return a("(",e,")?")}
function a (line 44) | function a(...e){const t=e.map(e=>n(e)).join("");return t}
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function o (line 44) | function o(...e){const t="("+e.map(e=>n(e)).join("|")+")";return t}
function s (line 44) | function s(e){const t={"builtin-name":["action","bindattr","collection",...
function l (line 44) | function l(e){const t=s(e);return t.name="HTMLbars",e.getLanguage("handl...
function n (line 44) | function n(e){const t={className:"variable",variants:[{begin:"\\$\\("+e....
function i (line 44) | function i(e){this.message=e}
function a (line 59) | function a(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))ret...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 59) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 59) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 59) | function r(...e){const t="("+e.map(e=>n(e)).join("|")+")";return t}
function a (line 59) | function a(e){const t=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),n={c...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 59) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 59) | function i(...e){const t=e.map(e=>n(e)).join("");return t}
function r (line 59) | function r(e){const t=/([-a-zA-Z$._][\w$.-]*)/,n={className:"type",begin...
function n (line 59) | function n(e){const t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9...
function n (line 59) | function n(e){const t="Int Float String Bool Dynamic Void Array ";return...
function n (line 59) | function n(e){const t=e.COMMENT(/^\s*@?rem\b/,/$/,{relevance:10}),n={cla...
function n (line 59) | function n(e){return e?"string"===typeof e?e:e.source:null}
function i (line 59) | function i(e){return r("(",e,")*")}
function r (line 59) | function r(...e){const t=e.map(e=>n(e)).join("");return t}
function a (line 59) | function a(e){const t={keyword:"abort acronym acronyms alias all and ass...
method constructor (line 1) | constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}
method ignoreMatch (line 1) | ignoreMatch(){this.ignore=!0}
function n (line 59) | function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{...
function i (line 59) | function i(e,t,n,i,r,a,o,s){var l,c="function"===typeof e?e.options:e;if...
function n (line 59) | function n(e){return{name:"Coq",keywords:{keyword:"_|0 as at cofix else ...
function s (line 59) | function s(e){return e&&e.__esModule?e:{default:e}}
function c (line 59) | function c(){}
function u (line 59) | function u(e,t){return l.call(e,t)}
method constructor (line 1) | constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(...
method addText (line 1) | addText(e){this.buffer+=o(e)}
method openNode (line 1) | openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.cla...
method closeNode (line 1) | closeNode(e){c(e)&&(this.buffer+=l)}
method value (line 1) | value(){return this.buffer}
method span (line 1) | span(e){this.buffer+=`<span class="${e}">`}
function d (line 59) | function d(e,t){for(var n in t)e[n]=t[n];return e}
method constructor (line 1) | constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}
method top (line 1) | get top(){return this.stack[this.stack.length-1]}
method root (line 1) | get root(){return this.rootNode}
method add (line 1) | add(e){this.top.children.push(e)}
method openNode (line 1) | openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}
method closeNode (line 1) | closeNode(){if(this.stack.length>1)return this.stack.pop()}
method closeAllNodes (line 1) | closeAllNodes(){while(this.closeNode());}
method toJSON (line 1) | toJSON(){return JSON.stringify(this.rootNode,null,4)}
method walk (line 1) | walk(e){return this.constructor._walk(e,this.rootNode)}
method _walk (line 1) | static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(...
method _collapse (line 1) | static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every...
function p (line 59) | function p(e){for(var t={},n=0;n<e.length;n++)e[n]&&d(t,e[n]);return t}
method constructor (line 1) | constructor(e){super(),
Condensed preview — 231 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,919K chars).
[
{
"path": ".editorconfig",
"chars": 186,
"preview": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\nindent_style = tab\nindent_size = 4\ntrim_tr"
},
{
"path": ".gitignore",
"chars": 95,
"preview": ".buildpath\n.settings/\n.project\n.idea/\n.git/\nvendor/\n.phpintel/\n.DS_Store\n/vendor\n.env\n/runtime\n"
},
{
"path": ".php_cs",
"chars": 2429,
"preview": "<?php\n\n/**\n * 使用说明\n *\n * 基于 php-cs-fixer 插件,请先使用composer安装此插件\n *\n * 1、Preferences -> Tools -> External Tools 添加工具\n * 2、添"
},
{
"path": "LICENSE",
"chars": 10249,
"preview": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AN"
},
{
"path": "README.md",
"chars": 816,
"preview": "### 简介\n\n一款基于软擎框架([https://www.rangine.com/](https://www.rangine.com/))的开源Markdown文档系统。\n\n常驻内存,不依赖传统的 Nginx/Apache 和 PHP-F"
},
{
"path": "app/Command/Document/CleanUpRecordsCommand.php",
"chars": 873,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Command/Install/InitCommand.php",
"chars": 9147,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Command/Install/SyncDataCommand.php",
"chars": 10560,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Command/Todo/CustomCommand.php",
"chars": 479,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Command/index.html",
"chars": 0,
"preview": ""
},
{
"path": "app/Controller/Admin/ChapterController.php",
"chars": 31146,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Admin/Document/ChapterApiController.php",
"chars": 2460,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Admin/Document/ChapterApiDataController.php",
"chars": 2340,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Admin/DocumentController.php",
"chars": 17214,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Admin/DocumentHomeController.php",
"chars": 5430,
"preview": "<?php\n\n\nnamespace W7\\App\\Controller\\Admin;\n\nuse W7\\App\\Controller\\BaseController;\nuse W7\\App\\Exception\\ErrorHttpExceptio"
},
{
"path": "app/Controller/Admin/FeedbackController.php",
"chars": 3556,
"preview": "<?php\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2021 <https://www.w7.cc>\n *\n * This is not a free software\n * Us"
},
{
"path": "app/Controller/Admin/HomepageSettingController.php",
"chars": 2373,
"preview": "<?php\n\n\nnamespace W7\\App\\Controller\\Admin;\n\nuse W7\\App\\Controller\\BaseController;\nuse W7\\App\\Exception\\ErrorHttpExceptio"
},
{
"path": "app/Controller/Admin/MenuSettingController.php",
"chars": 2190,
"preview": "<?php\n\n\nnamespace W7\\App\\Controller\\Admin;\n\nuse W7\\App\\Controller\\BaseController;\nuse W7\\App\\Exception\\ErrorHttpExceptio"
},
{
"path": "app/Controller/Admin/SettingController.php",
"chars": 3787,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Admin/StarController.php",
"chars": 3214,
"preview": "<?php\n\nnamespace W7\\App\\Controller\\Admin;\n\nuse W7\\App\\Controller\\BaseController;\nuse W7\\App\\Exception\\ErrorHttpException"
},
{
"path": "app/Controller/Admin/ThirdPartyLoginController.php",
"chars": 4645,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Admin/UploadController.php",
"chars": 1294,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Admin/UserController.php",
"chars": 7902,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Admin/UserOperateLogController.php",
"chars": 4505,
"preview": "<?php\n\nnamespace W7\\App\\Controller\\Admin;\n\nuse Illuminate\\Support\\Facades\\DB;\nuse W7\\App\\Controller\\BaseController;\nuse "
},
{
"path": "app/Controller/Admin/UserShareController.php",
"chars": 548,
"preview": "<?php\n\nnamespace W7\\App\\Controller\\Admin;\n\nuse W7\\App\\Controller\\BaseController;\nuse W7\\App\\Model\\Logic\\UserShareLogic;\n"
},
{
"path": "app/Controller/Admin/index.html",
"chars": 0,
"preview": ""
},
{
"path": "app/Controller/BaseController.php",
"chars": 358,
"preview": "<?php\n/**\n * @author donknap\n * @date 19-10-10 下午2:07\n */\n\nnamespace W7\\App\\Controller;\n\n\nuse W7\\Core\\Controller\\Control"
},
{
"path": "app/Controller/Common/AuthController.php",
"chars": 17823,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Common/MenuController.php",
"chars": 578,
"preview": "<?php\n\nnamespace W7\\App\\Controller\\Common;\n\nuse W7\\App\\Controller\\BaseController;\nuse W7\\App\\Model\\Logic\\MenuSettingLogi"
},
{
"path": "app/Controller/Common/UserController.php",
"chars": 1651,
"preview": "<?php\n\nnamespace W7\\App\\Controller\\Common;\n\nuse W7\\App\\Controller\\BaseController;\nuse W7\\App\\Model\\Entity\\UserOperateLog"
},
{
"path": "app/Controller/Common/VerifyCodeController.php",
"chars": 1266,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Document/ChapterController.php",
"chars": 10521,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Document/DocumentController.php",
"chars": 1379,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Document/DocumentHomeController.php",
"chars": 2631,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Document/FeedbackController.php",
"chars": 1605,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Document/MockApiReponseController.php",
"chars": 664,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Controller/Install/IndexController.php",
"chars": 6685,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Exception/ErrorHttpException.php",
"chars": 685,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Exception/InternalException.php",
"chars": 483,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Handler/Cache/DbHandler.php",
"chars": 1223,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Handler/Exception/ExceptionHandler.php",
"chars": 3844,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Handler/Session/CacheHandler.php",
"chars": 950,
"preview": "<?php\n\n/**\n * This file is part of Rangine\n *\n * (c) We7Team 2019 <https://www.rangine.com/>\n *\n * document http://s.w7."
},
{
"path": "app/Handler/Session/DbHandler.php",
"chars": 1353,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Helper/Functions.php",
"chars": 2891,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Listener/index.html",
"chars": 0,
"preview": ""
},
{
"path": "app/Message/index.html",
"chars": 0,
"preview": ""
},
{
"path": "app/Middleware/AppAuthMiddleware.php",
"chars": 1650,
"preview": "<?php\n\nnamespace W7\\App\\Middleware;\n\nuse Psr\\Http\\Message\\ResponseInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface"
},
{
"path": "app/Middleware/BackendDocumentPermissionMiddleware.php",
"chars": 1413,
"preview": "<?php\n\nnamespace W7\\App\\Middleware;\n\nuse Psr\\Http\\Message\\ResponseInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface"
},
{
"path": "app/Middleware/CheckAuthMiddleware.php",
"chars": 1211,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Middleware/CheckFounderMiddleware.php",
"chars": 646,
"preview": "<?php\n/**\n * @author donknap\n * @date 19-12-16 上午10:56\n */\n\nnamespace W7\\App\\Middleware;\n\nuse Psr\\Http\\Message\\ResponseI"
},
{
"path": "app/Middleware/CorsApiMiddleware.php",
"chars": 1629,
"preview": "<?php\n\n/**\n * WeEngine Team\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * Using it und"
},
{
"path": "app/Middleware/FrontendDocumentPermissionMiddleware.php",
"chars": 2122,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/App.php",
"chars": 221,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Entity;\n\nclass App extends BaseModel\n{\n\tpublic $timestamps = false;\n\tprotected $connection"
},
{
"path": "app/Model/Entity/BaseModel.php",
"chars": 678,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Cache.php",
"chars": 327,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Document/Chapter.php",
"chars": 1046,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Document/ChapterApi.php",
"chars": 1414,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Document/ChapterApiData.php",
"chars": 451,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Document/ChapterApiExtend.php",
"chars": 454,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Document/ChapterApiParam.php",
"chars": 1521,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Document/ChapterApiReponse.php",
"chars": 461,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Document/ChapterContent.php",
"chars": 521,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Document.php",
"chars": 1199,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/DocumentFeedback.php",
"chars": 1602,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/DocumentHome.php",
"chars": 837,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/DocumentPermission.php",
"chars": 1899,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/DocumentSearch.php",
"chars": 456,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Session.php",
"chars": 333,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Setting.php",
"chars": 642,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/Star.php",
"chars": 435,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Entity;\n\nuse W7\\App\\Model\\Entity\\Document\\Chapter;\n\nclass Star extends BaseModel\n{\n\tprotec"
},
{
"path": "app/Model/Entity/User.php",
"chars": 676,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Entity/UserOperateLog.php",
"chars": 1143,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Entity;\n\nclass UserOperateLog extends BaseModel\n{\n\tconst CREATE = 1; //创建\n\tconst PREVIEW ="
},
{
"path": "app/Model/Entity/UserThirdParty.php",
"chars": 462,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/AppLogic.php",
"chars": 472,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Logic;\n\nuse W7\\App\\Model\\Entity\\App;\n\nclass AppLogic extends BaseLogic\n{\n\tpublic function "
},
{
"path": "app/Model/Logic/BaseLogic.php",
"chars": 1407,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/ChapterLogic.php",
"chars": 7609,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterApi/ChapterCommonLogic.php",
"chars": 1921,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterApi/ChapterDemoLogic.php",
"chars": 3853,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterApi/ChapterImportLogic.php",
"chars": 10664,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterApi/ChapterRecordLogic.php",
"chars": 21974,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterApi/ChapterRuleLogic.php",
"chars": 5606,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterApiDataLogic.php",
"chars": 1018,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterApiLogic.php",
"chars": 1645,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterApiParamLogic.php",
"chars": 1951,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/ChapterContentLogic.php",
"chars": 589,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/Document/MockApi/MockApiReponseLogic.php",
"chars": 4360,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/DocumentFeedbackLogic.php",
"chars": 967,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/DocumentHomeLogic.php",
"chars": 11524,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/DocumentLogic.php",
"chars": 1380,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/DocumentPermissionLogic.php",
"chars": 2644,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/DocumentSearchLogic.php",
"chars": 996,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/HomepageSettingLogic.php",
"chars": 1731,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Logic;\n\nuse W7\\App;\nuse W7\\Core\\Helper\\Traiter\\InstanceTraiter;\nuse W7\\Http\\Message\\Server"
},
{
"path": "app/Model/Logic/Install/InstallLogic.php",
"chars": 6652,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/MenuSettingLogic.php",
"chars": 1822,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Logic;\n\nuse W7\\Core\\Helper\\Traiter\\InstanceTraiter;\n\nclass MenuSettingLogic extends BaseLo"
},
{
"path": "app/Model/Logic/OauthLogic.php",
"chars": 558,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/SettingLogic.php",
"chars": 2831,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/StarLogic.php",
"chars": 515,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Logic;\n\nuse W7\\App\\Model\\Entity\\Star;\nuse W7\\Core\\Helper\\Traiter\\InstanceTraiter;\n\nclass S"
},
{
"path": "app/Model/Logic/ThirdPartyLoginLogic.php",
"chars": 3769,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/UserLogic.php",
"chars": 2883,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Logic/UserOperateLogic.php",
"chars": 1554,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Logic;\n\nuse phpDocumentor\\Reflection\\DocBlock\\Tags\\Uses;\nuse W7\\App\\Model\\Entity\\UserOpera"
},
{
"path": "app/Model/Logic/UserShareLogic.php",
"chars": 716,
"preview": "<?php\n\nnamespace W7\\App\\Model\\Logic;\n\nuse W7\\Core\\Helper\\Traiter\\InstanceTraiter;\n\nclass UserShareLogic extends BaseLogi"
},
{
"path": "app/Model/Service/AES.php",
"chars": 1202,
"preview": "<?php\n\n\nnamespace W7\\App\\Model\\Service;\n\n\nclass AES\n{\n\t/**\n\t * @desc:php aes加密解密类\n\t * @author gl\n\t * @date 2019/08/31\n\t "
},
{
"path": "app/Model/Service/CdnLogic.php",
"chars": 6512,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Service/DbCacheLogic.php",
"chars": 1792,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Service/SessionLogic.php",
"chars": 671,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Model/Validate/index.html",
"chars": 0,
"preview": ""
},
{
"path": "app/Process/index.html",
"chars": 0,
"preview": ""
},
{
"path": "app/Provider/Socialite/ServiceProvider.php",
"chars": 1548,
"preview": "<?php\n\nnamespace W7\\App\\Provider\\Socialite;\n\nuse Overtrue\\Socialite\\SocialiteManager;\nuse Symfony\\Component\\Finder\\Finde"
},
{
"path": "app/Provider/Socialite/ThirdPartyLogin/OauthTrait.php",
"chars": 1508,
"preview": "<?php\n\nnamespace W7\\App\\Provider\\Socialite\\ThirdPartyLogin;\n\nuse W7\\App\\Model\\Logic\\ThirdPartyLoginLogic;\nuse Overtrue\\S"
},
{
"path": "app/Provider/Socialite/ThirdPartyLogin/QQOauth.php",
"chars": 1216,
"preview": "<?php\n\nnamespace W7\\App\\Provider\\Socialite\\ThirdPartyLogin;\n\nuse Overtrue\\Socialite\\Providers\\QQProvider;\nuse Overtrue\\S"
},
{
"path": "app/Provider/Socialite/ThirdPartyLogin/We7Oauth.php",
"chars": 3939,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "app/Provider/Socialite/ThirdPartyLogin/WechatOauth.php",
"chars": 367,
"preview": "<?php\n\nnamespace W7\\App\\Provider\\Socialite\\ThirdPartyLogin;\n\nuse Overtrue\\Socialite\\Providers\\WeChatProvider;\n\nclass Wec"
},
{
"path": "app/Task/index.html",
"chars": 0,
"preview": ""
},
{
"path": "app/View/index.html",
"chars": 0,
"preview": ""
},
{
"path": "bin/gerent",
"chars": 383,
"preview": "#!/usr/bin/env sh\n\ndir=$(cd \"${0%[/\\\\]*}\" > /dev/null; cd '../vendor/bin' && pwd)\ncur_dir=$(cd \"${0%[/\\\\]*}\" > /dev/null"
},
{
"path": "bin/server",
"chars": 383,
"preview": "#!/usr/bin/env sh\n\ndir=$(cd \"${0%[/\\\\]*}\" > /dev/null; cd '../vendor/bin' && pwd)\ncur_dir=$(cd \"${0%[/\\\\]*}\" > /dev/null"
},
{
"path": "composer.json",
"chars": 975,
"preview": "{\n\t\"name\": \"w7/document-api\",\n\t\"type\": \"project\",\n\t\"description\": \"基于软擎框架的开源文档系统\",\n\t\"license\": \"Apache-2.0\",\n\t\"keywords\""
},
{
"path": "config/app.php",
"chars": 2136,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "config/crontab.php",
"chars": 86,
"preview": "<?php\n/**\n * 最多1024个定时任务\n * @author donknap\n * @date 18-11-10 上午11:13\n */\nreturn [\n\n];"
},
{
"path": "config/define.php",
"chars": 722,
"preview": "<?php\n/**\n * 自定义一些常量,可以项目中使用\n */\n\n// Constants\n! defined('DS') && define('DS', DIRECTORY_SEPARATOR);\n\n// App name\n! defi"
},
{
"path": "config/log.php",
"chars": 791,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "config/server.php",
"chars": 675,
"preview": "<?php\n/**\n * @author donknap\n * @date 18-7-18 下午5:41\n */\n\n$serverSetting = [\n\t'common' => [\n\t\t'pname' => 'document_open'"
},
{
"path": "database/index.html",
"chars": 0,
"preview": ""
},
{
"path": "database/migrations/2020_01_02_194246_create_user_third_party.php",
"chars": 606,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass CreateUserThirdParty exte"
},
{
"path": "database/migrations/2020_02_17_121335_alter_setting.php",
"chars": 549,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass AlterSetting extends Migr"
},
{
"path": "database/migrations/2020_03_02_153429_create_app.php",
"chars": 628,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass CreateApp extends Migrati"
},
{
"path": "database/migrations/2020_03_03_152902_alter_star.php",
"chars": 785,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass AlterStar extends Migrati"
},
{
"path": "database/migrations/2020_03_03_154818_alter_document.php",
"chars": 572,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass AlterDocument extends Mig"
},
{
"path": "database/migrations/2020_03_23_114510_table_operate_log.php",
"chars": 619,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass TableOperateLog extends M"
},
{
"path": "database/migrations/2020_04_07_145338_create_document_chapter_api.php",
"chars": 1146,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "database/migrations/2020_04_07_145420_create_document_chapter_api_param.php",
"chars": 1488,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "database/migrations/2020_04_07_151451_create_document_chapter_api_extend.php",
"chars": 865,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "database/migrations/2020_05_27_092518_create_document_chapter_api_reponse_table.php",
"chars": 1190,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "database/migrations/2020_06_11_145556_add_rule_to_document_chapter_api_param_table.php",
"chars": 832,
"preview": "<?php\n\n/**\n * WeEngine Document System\n *\n * (c) We7Team 2019 <https://www.w7.cc>\n *\n * This is not a free software\n * U"
},
{
"path": "database/migrations/2021_03_03_170511_create_document_feedback_table.php",
"chars": 919,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass CreateDocumentFeedbackTab"
},
{
"path": "database/migrations/2021_03_05_142937_create_document_chapter_api_data_table.php",
"chars": 680,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass CreateDocumentChapterApiD"
},
{
"path": "database/migrations/2021_03_08_164459_alter_respond_to_document_chapter_api_data_table.php",
"chars": 601,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass AlterRespondToDocumentCha"
},
{
"path": "database/migrations/2021_03_16_104941_create_document_home_table.php",
"chars": 1075,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass CreateDocumentHomeTable20"
},
{
"path": "database/migrations/2021_03_29_110505_create_document_search_hot_table.php",
"chars": 720,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass CreateDocumentSearchHotTa"
},
{
"path": "database/migrations/2021_04_09_100433_alter_user_table.php",
"chars": 913,
"preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse W7\\DatabaseTool\\Migrate\\Migration;\n\nclass AlterUserTable2021_04_09_"
},
{
"path": "database/migrations/index.html",
"chars": 0,
"preview": ""
},
{
"path": "database/seeds/DatabaseSeeder.php",
"chars": 173,
"preview": "<?php\n\nuse W7\\DatabaseTool\\Seed\\Seeder;\n\nclass DatabaseSeeder extends Seeder {\n\t/**\n\t * Run the database seeds.\n\t *\n\t * "
},
{
"path": "database/seeds/index.html",
"chars": 0,
"preview": ""
},
{
"path": "docs/.gitignore",
"chars": 38,
"preview": "apidoc\nnode_modules\npackage-lock.json\n"
},
{
"path": "docs/build-dev.sh",
"chars": 187,
"preview": "#!/bin/sh\n\n# set these paths to match your environment\nrm -rf ../public/docs/*\nnode_modules/apidoc/bin/apidoc -c \"./fron"
},
{
"path": "docs/build.sh",
"chars": 176,
"preview": "#!/bin/sh\n\n# set these paths to match your environment\nrm -rf ./apidoc/*\nnode_modules/apidoc/bin/apidoc -c \"./frontend\" "
},
{
"path": "docs/frontend/apidoc.json",
"chars": 87,
"preview": "{\n\t\"name\": \"文档-前端接口\",\n\t\"version\": \"0.1.0\",\n\t\"description\": \"前端接口相关接口文档\",\n\t\"url\": \"/\"\n}\n"
},
{
"path": "docs/package.json",
"chars": 211,
"preview": "{\n \"name\": \"document-docs\",\n \"version\": \"1.0.0\",\n \"description\": \"A api docs project!\",\n \"dependencies\": {\n \"apid"
},
{
"path": "install/document.sql",
"chars": 12962,
"preview": "/*\nNavicat MySQL Data Transfer\n\nSource Server : test\nSource Server Version : 50562\nSource Host : 212.6"
},
{
"path": "mockApi/.gitignore",
"chars": 143,
"preview": "logs/\nnpm-debug.log\nyarn-error.log\nnode_modules/\npackage-lock.json\nyarn.lock\ncoverage/\n.idea/\nrun/\n.DS_Store\n*.sw*\n*.un~"
},
{
"path": "mockApi/app.js",
"chars": 4556,
"preview": "const express = require('express')\nconst app = express()\nconst port = 9529\n\n//mock数据转化\nconst makeMockData = (data) => {\n"
},
{
"path": "mockApi/package.json",
"chars": 401,
"preview": "{\n\t\"name\": \"mokeserver\",\n\t\"version\": \"1.0.0\",\n\t\"description\": \"\",\n\t\"main\": \"app.js\",\n\t\"scripts\": {\n\t\t\"server\": \"node app"
},
{
"path": "public/css/app.45a4fd9d.css",
"chars": 8880,
"preview": "body{color:#4d4d4d}body,body p{padding:0;margin:0}body a{color:inherit;text-decoration:none}html,html body{height:100%}*"
},
{
"path": "public/css/chunk-06ade0a7.d9d343de.css",
"chars": 18791,
"preview": ".editors .v-note-wrapper[data-v-7d82a91c]{margin:30px 0;z-index:10}.editors .v-note-wrapper .v-note-panel .v-note-show[d"
},
{
"path": "public/css/chunk-079f5797.5ffb7ccc.css",
"chars": 125,
"preview": ".w7-table .oper .wi{margin-left:25px}.w7-table .oper .wq{margin-left:25px;font-size:16px;cursor:pointer;color:#666;outli"
},
{
"path": "public/css/chunk-07e6273c.8f6be2eb.css",
"chars": 248,
"preview": ".setting-nav .page-head{padding-bottom:20px}.setting-nav .we7-panel-form__header{margin-top:5px}.setting-nav .demo-input"
},
{
"path": "public/css/chunk-10615ad3.8f32f691.css",
"chars": 2003,
"preview": "li[data-v-cc65867e],ul[data-v-cc65867e]{list-style:none;margin:0;padding:0}.install .i-header[data-v-cc65867e]{font-size"
},
{
"path": "public/css/chunk-1e630799.23444e38.css",
"chars": 242,
"preview": ".container[data-v-1598ee81]{padding:0 40px}.el-input__icon[data-v-1598ee81]{color:#3296fa}.btns[data-v-1598ee81]{margin-"
},
{
"path": "public/css/chunk-20afbe1d.9cfc489e.css",
"chars": 121,
"preview": ".account-info .el-main[data-v-25228318]{padding:0 25px 0 15px}.account-info .page-head[data-v-25228318]{padding-bottom:0"
},
{
"path": "public/css/chunk-211c6b12.9850dd89.css",
"chars": 15442,
"preview": "[data-v-ca45b106]::-webkit-scrollbar{width:7px;height:7px;background-color:#f5f5f5}[data-v-ca45b106]::-webkit-scrollbar-"
},
{
"path": "public/css/chunk-22e40c8e.2d7343f0.css",
"chars": 82,
"preview": ".setting-login .page-head{padding-bottom:0}.setting-login .textBtn{padding-left:0}"
},
{
"path": "public/css/chunk-25f82f1a.3e053f1b.css",
"chars": 3284,
"preview": ".install .i-header[data-v-39e9c0e4]{font-size:32px;color:#333;display:-webkit-box;display:-ms-flexbox;display:flex;-webk"
},
{
"path": "public/css/chunk-3337dd8f.3c05d3bd.css",
"chars": 48,
"preview": ".setting-thirdParty .page-head{padding-bottom:0}"
},
{
"path": "public/css/chunk-3bcf66f7.0b7a87d8.css",
"chars": 463,
"preview": ".setting-store .page-head[data-v-65f326c0]{padding-bottom:0}.we7-topLine[data-v-65f326c0]{height:10px;border-top:2px sol"
},
{
"path": "public/css/chunk-416ef35e.8e4636b1.css",
"chars": 1310,
"preview": ".user-permission .el-aside{padding-left:20px}.user-permission .el-main{padding:0}.user-permission .el-table,.user-permis"
},
{
"path": "public/css/chunk-457e440b.d1b08c94.css",
"chars": 2927,
"preview": "li[data-v-0d4061d4],ul[data-v-0d4061d4]{margin:0;padding:0;list-style-type:none}.home-search[data-v-0d4061d4]{background"
},
{
"path": "public/css/chunk-564fade6.0e433876.css",
"chars": 0,
"preview": ""
},
{
"path": "public/css/chunk-56652b45.339826ab.css",
"chars": 1442,
"preview": ".admin-login[data-v-2a74da90]{background:url(../img/login_bg.cfc5367a.png) no-repeat 50%}.admin-login[data-v-2a74da90] ."
},
{
"path": "public/css/chunk-57425795.c9955d2b.css",
"chars": 51,
"preview": ".el-main[data-v-70c2a92a]{padding:0 25px 20px 15px}"
},
{
"path": "public/css/chunk-5b1f82de.316d8ff0.css",
"chars": 2535,
"preview": ".setting[data-v-4599d29e]{padding:30px 0}.setting .title[data-v-4599d29e]{font-size:16px;font-weight:600;margin-bottom:3"
},
{
"path": "public/css/chunk-654f0b98.193fcd50.css",
"chars": 4032,
"preview": ".pagination-wrap .el-pagination[data-v-749b2369]{float:none;text-align:center}.card-box[data-v-749b2369]{margin-top:30px"
},
{
"path": "public/css/chunk-65eafec3.169b0d4d.css",
"chars": 13658,
"preview": ".w7-aside-home-content[data-v-731e09c6] .el-scrollbar__view{border-radius:5px}.w7-aside-home-content[data-v-731e09c6] .e"
},
{
"path": "public/css/chunk-6a2c3c1a.356edd1a.css",
"chars": 3920,
"preview": ".admin-view>.el-header[data-v-19a9d71c]{position:fixed;left:0;top:0;right:0;display:-webkit-box;display:-ms-flexbox;disp"
},
{
"path": "public/css/chunk-7060d2be.ba342d3f.css",
"chars": 1436,
"preview": ".install .success[data-v-4052ffba]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-fle"
},
{
"path": "public/css/chunk-71aaa888.b923ac67.css",
"chars": 43,
"preview": ".setting-store .page-head{padding-bottom:0}"
},
{
"path": "public/css/chunk-73af5400.9b10b85b.css",
"chars": 849,
"preview": ".install-wrap[data-v-af400938]{position:relative;width:100%;min-height:100vh;background:#fff url(../img/login-bg.5a9966f"
},
{
"path": "public/css/chunk-775b8fab.d326fcb8.css",
"chars": 256,
"preview": ".setting-nav .page-head{padding-bottom:20px}.setting-nav .we7-panel-form__header{margin-top:5px}.setting-nav .demo-input"
},
{
"path": "public/css/chunk-a3879d6c.ffbb8d99.css",
"chars": 6033,
"preview": ".admin-login{min-height:100vh;background-color:#fff;background-image:url(../img/login_bg.cfc5367a.png);background-positi"
},
{
"path": "public/css/chunk-ab7deece.39a1833e.css",
"chars": 175,
"preview": ".we7-document-history .search-box{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.we7-document-hi"
},
{
"path": "public/css/chunk-b09d1c24.5230f4f0.css",
"chars": 7223,
"preview": ".home ul[data-v-688d267c]{list-style-type:none;margin:0;padding:0}.home .w1200[data-v-688d267c]{width:1200px;margin:0 au"
},
{
"path": "public/css/chunk-b9b22232.3c05d3bd.css",
"chars": 48,
"preview": ".setting-thirdParty .page-head{padding-bottom:0}"
},
{
"path": "public/css/chunk-bd264252.3d26cc4c.css",
"chars": 5254,
"preview": ".document-setting .edit-role-change[data-v-63bdab51]{width:120px}.document-setting[data-v-63bdab51] .delete-doc{-webkit-"
},
{
"path": "public/css/chunk-d779deb8.207190f3.css",
"chars": 181,
"preview": ".admin-setting .el-menu-item .menu-name{display:inline-block;max-width:130px;white-space:nowrap;overflow:hidden;text-ove"
},
{
"path": "public/css/chunk-f66a53c0.e0f01506.css",
"chars": 7304,
"preview": ".pagination-wrap[data-v-5afe36eb]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pac"
},
{
"path": "public/css/chunk-vendors.1603aa5b.css",
"chars": 236100,
"preview": ".el-pagination--small .arrow.disabled,.el-table--hidden,.el-table .hidden-columns,.el-table td.is-hidden>*,.el-table th."
},
{
"path": "public/index.html",
"chars": 1543,
"preview": "<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content=\"IE=edge\"><meta name=vie"
},
{
"path": "public/js/app.9dc9e499.js",
"chars": 18209,
"preview": "(function(n){function e(e){for(var a,c,o=e[0],d=e[1],i=e[2],h=0,f=[];h<o.length;h++)c=o[h],Object.prototype.hasOwnProper"
},
{
"path": "public/js/chunk-06ade0a7.a7e4c7a7.js",
"chars": 276292,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-06ade0a7\"],{\"0a49\":function(e,t,r){var n=r(\"9b43\"),i=r"
},
{
"path": "public/js/chunk-079f5797.19ae5348.js",
"chars": 3897,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-079f5797\"],{\"0be6\":function(t,e,a){\"use strict\";a(\"d73"
},
{
"path": "public/js/chunk-07e6273c.1984b9b7.js",
"chars": 8327,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-07e6273c\"],{\"11e9\":function(t,e,a){var n=a(\"52a7\"),l=a"
},
{
"path": "public/js/chunk-10615ad3.5901db24.js",
"chars": 20934,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-10615ad3\"],{\"02f4\":function(t,n,e){var i=e(\"4588\"),r=e"
},
{
"path": "public/js/chunk-168777de.cb8bf66b.js",
"chars": 13622,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-168777de\"],{\"02f4\":function(e,t,r){var a=r(\"4588\"),n=r"
},
{
"path": "public/js/chunk-1e630799.897fa4c7.js",
"chars": 7587,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-1e630799\"],{\"11e9\":function(t,e,r){var n=r(\"52a7\"),a=r"
},
{
"path": "public/js/chunk-20afbe1d.bcdaad46.js",
"chars": 7826,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-20afbe1d\"],{\"11e9\":function(e,t,s){var a=s(\"52a7\"),r=s"
},
{
"path": "public/js/chunk-211c6b12.01b14833.js",
"chars": 61980,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-211c6b12\"],{\"02f4\":function(e,t,n){var r=n(\"4588\"),i=n"
},
{
"path": "public/js/chunk-22e40c8e.f3e7130f.js",
"chars": 4343,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-22e40c8e\"],{b49c:function(t,e,i){\"use strict\";i.r(e);v"
},
{
"path": "public/js/chunk-25f82f1a.e3262c66.js",
"chars": 21693,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-25f82f1a\"],{\"02f4\":function(t,e,r){var n=r(\"4588\"),o=r"
},
{
"path": "public/js/chunk-2d0ba2e6.ba43e34b.js",
"chars": 4702,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-2d0ba2e6\"],{\"35b0\":function(t,e,n){\"use strict\";n.r(e)"
},
{
"path": "public/js/chunk-2d22276a.90e5dc78.js",
"chars": 2886,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-2d22276a\"],{cf5f:function(t,e,a){\"use strict\";a.r(e);v"
},
{
"path": "public/js/chunk-3337dd8f.e12552ed.js",
"chars": 8847,
"preview": "(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-3337dd8f\"],{\"091d\":function(t,e,a){\"use strict\";a.r(e)"
}
]
// ... and 31 more files (download for full content)
About this extraction
This page contains the full source code of the we7coreteam/w7-rangine-project-document GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 231 files (3.5 MB), approximately 923.6k tokens, and a symbol index with 2535 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.