├── .gitignore ├── LICENSE ├── README.md ├── api ├── __init__.py ├── file.py ├── folder.py └── schemas.py ├── bucket └── test.txt ├── core ├── __init__.py └── sys_resource.py ├── dockerfile ├── main.py ├── requirements.txt └── static ├── assets ├── index-legacy.f0196b61.js ├── index.47f6323d.css ├── index.befc7fe7.js ├── polyfills-legacy.4af1746d.js ├── vendor-legacy.8e2c4a8d.js └── vendor.5e481b06.js ├── favicon.ico ├── index.html └── screenshot ├── ffserver.png └── ipadmini.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | # local static 132 | bucket/ 133 | 134 | # local IDE settings 135 | /.idea 136 | /.vscode 137 | */.idea 138 | */.vscode 139 | 140 | # local style source 141 | *.scss 142 | *.css.map -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FFServer 2 | 3 | ![](https://github.com/nanarino/ffserver/blob/main/static/screenshot/ffserver.png) 4 | 5 | Fastapi-based file service management (Python3.8+) 6 | 7 | 8 | ## Frontend 9 | 10 | [https://github.com/mowtwo/ffserver_frontend](https://github.com/mowtwo/ffserver_frontend) 11 | 12 | ## Screenshots 13 | 14 | - ipadmini 15 | 16 | ![ipadmini](https://github.com/nanarino/ffserver/blob/main/static/screenshot/ipadmini.png) 17 | 18 | ## Features 19 | 20 | - Imitation win10 explorer 21 | 22 | ## Installation 23 | 24 | ### Installed by using source code 25 | 26 | 1. Install dependences via pip 27 | ``` 28 | pip install -r requirements.txt 29 | ``` 30 | 31 | 2. Excute `main.py` 32 | ``` 33 | python -m main 34 | ``` 35 | 36 | 3. API document: [FFServer API](http://127.0.0.1:8010/docs) 37 | 38 | 4. Open Browser With URL: [http://127.0.0.1:8010/](http://127.0.0.1:8010/) 39 | 40 | ### Installed by docker pull 41 | 42 | 1. Pull image via `docker pull` 43 | ``` 44 | docker pull simonwdc/ffserver:0.1 45 | ``` 46 | 2. Create container 47 | ``` 48 | docker run -itd -p 8010:8010 --name=ffserver simonwdc/ffserver:0.1 49 | ``` 50 | > Or mount `bucket` to a local path 51 | ``` 52 | docker run -itd -p 8010:8010 -v :/ffserver/bucket --name=ffserver simonwdc/ffserver:0.1 53 | ``` 54 | 3. API document: [FFServer API](http://127.0.0.1:8010/docs) 55 | 56 | 4. Open Browser With URL: [http://127.0.0.1:8010/](http://127.0.0.1:8010/) 57 | 58 | ## TODO 59 | 60 | 1. [x] move and rename 61 | 62 | 2. [ ] Support QRCode 63 | 64 | 3. [x] Create folder 65 | 66 | 4. [ ] Support copy link 67 | 68 | 5. [x] Support Docker 69 | 70 | ## Special thanks 71 | 72 | [mowtwo](https://github.com/mowtwo) 73 | 74 | -------------------------------------------------------------------------------- /api/__init__.py: -------------------------------------------------------------------------------- 1 | """API 2 | 3 | - file: RESTful api 4 | - folder: RESTful api 5 | 6 | """ 7 | 8 | __all__ = ['file', 'folder'] 9 | 10 | 11 | from .file import file 12 | from .folder import folder 13 | -------------------------------------------------------------------------------- /api/file.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter, Depends, Form, UploadFile, File, HTTPException 2 | from fastapi.responses import FileResponse 3 | from core import sys_resource 4 | import pathlib 5 | from . import schemas 6 | from datetime import datetime 7 | 8 | file = APIRouter(tags=["file"]) 9 | 10 | 11 | @file.get("{url_path:path}", response_class=FileResponse, summary="download") 12 | async def download_file(path: pathlib.Path = Depends(sys_resource.syspath)): 13 | """download file""" 14 | if path.is_file(): 15 | return FileResponse(path, filename=path.name) 16 | raise HTTPException(status_code=404) 17 | 18 | 19 | @file.post("{url_path:path}", response_model=schemas.sys_file, summary="upload") 20 | async def upload_file(path: pathlib.Path = Depends(sys_resource.syspath), file: UploadFile = File(...)): 21 | """upload file to specified folder""" 22 | if not path.is_dir(): 23 | raise HTTPException(status_code=404) 24 | if not file.filename: 25 | raise HTTPException(status_code=422, detail="Name cannot be empty") 26 | new_file = path / pathlib.Path(file.filename) 27 | if new_file.is_file(): 28 | raise HTTPException(status_code=412, detail="File already exists") 29 | if not sys_resource.check_name(file.filename): 30 | raise HTTPException(status_code=422, detail=r"Name cannot contain \/:*?<>|") 31 | content = await file.read() 32 | await sys_resource.write(content, new_file) 33 | return schemas.sys_file( 34 | name=new_file.name, 35 | mime=sys_resource.get_mime(new_file), 36 | mtime=datetime.fromtimestamp( 37 | pathlib.Path.stat(new_file).st_mtime), 38 | ctime=datetime.fromtimestamp( 39 | pathlib.Path.stat(new_file).st_ctime), 40 | size=sys_resource.format_bytes_size(new_file) 41 | ) 42 | 43 | 44 | @file.put("{url_path:path}", summary="mv") 45 | def move_file(path: pathlib.Path = Depends(sys_resource.syspath), new_path: str = Form(...)): 46 | """set new path(new name)""" 47 | if not path.is_file(): 48 | raise HTTPException(status_code=404) 49 | try: 50 | path.rename(sys_resource.bucket_path / pathlib.Path("." + new_path)) 51 | except FileExistsError: 52 | raise HTTPException(status_code=412, detail="Name already exists") 53 | except OSError as e: 54 | raise HTTPException(status_code=412, detail=f"{e}") 55 | 56 | 57 | @file.delete("{url_path:path}", summary="rm -f") 58 | def remove_file(path: pathlib.Path = Depends(sys_resource.syspath)): 59 | """remove file""" 60 | if not path.is_file(): 61 | raise HTTPException(status_code=404) 62 | try: 63 | pathlib.Path.unlink(path) 64 | except FileNotFoundError: 65 | raise HTTPException(status_code=404) 66 | except OSError as e: 67 | raise HTTPException(status_code=412, detail=f"{e}") 68 | -------------------------------------------------------------------------------- /api/folder.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter, Depends, Form, HTTPException 2 | import shutil 3 | from . import schemas 4 | from core import sys_resource 5 | import pathlib 6 | from datetime import datetime 7 | from typing import Union, List 8 | 9 | folder = APIRouter(tags=["folder"]) 10 | 11 | LS = List[Union[schemas.sys_file, schemas.sys_folder]] 12 | 13 | 14 | @folder.get("{url_path:path}", response_model=LS, summary="ls") 15 | def get_folder_dir(path: pathlib.Path = Depends(sys_resource.syspath)): 16 | """get all file_stat_info in specified folder""" 17 | if not path.is_dir(): 18 | raise HTTPException(status_code=404) 19 | ls :LS = [] 20 | for _ in path.iterdir(): 21 | if _.is_dir(): 22 | ls.append(schemas.sys_folder( 23 | name=_.name, 24 | mtime=datetime.fromtimestamp(pathlib.Path.stat(_).st_mtime), 25 | ctime=datetime.fromtimestamp(pathlib.Path.stat(_).st_ctime)) 26 | ) 27 | else: 28 | ls.append(schemas.sys_file( 29 | name=_.name, 30 | mime=sys_resource.get_mime(_), 31 | mtime=datetime.fromtimestamp(pathlib.Path.stat(_).st_mtime), 32 | ctime=datetime.fromtimestamp(pathlib.Path.stat(_).st_ctime), 33 | size=sys_resource.format_bytes_size(_)) 34 | ) 35 | return ls 36 | 37 | 38 | @folder.post("{url_path:path}", response_model=schemas.sys_folder, summary="mkdir") 39 | def create_folder(path: pathlib.Path = Depends(sys_resource.syspath), dirname: str = Form(...)): 40 | """create a folder in specified folder""" 41 | if not path.is_dir(): 42 | raise HTTPException(status_code=404) 43 | dirname = dirname.strip() 44 | if not dirname: 45 | raise HTTPException(status_code=422, detail="Name cannot be a blank string") 46 | if not sys_resource.check_name(dirname): 47 | raise HTTPException(status_code=422, detail=r"Name cannot contain \/:*?<>|") 48 | try: 49 | new_dir = path / pathlib.Path(dirname) 50 | new_dir.mkdir(parents=False, exist_ok=False) 51 | return schemas.sys_folder( 52 | name=dirname, 53 | mtime=datetime.fromtimestamp(pathlib.Path.stat(new_dir).st_mtime), 54 | ctime=datetime.fromtimestamp(pathlib.Path.stat(new_dir).st_ctime)) 55 | except FileNotFoundError: 56 | raise HTTPException(status_code=404) 57 | except FileExistsError: 58 | raise HTTPException(status_code=412, detail="Name already exists") 59 | except OSError as e: 60 | raise HTTPException(status_code=412, detail=f"{e}") 61 | 62 | 63 | @folder.put("{url_path:path}", summary="mv") 64 | def move_folder(path: pathlib.Path = Depends(sys_resource.syspath), new_path: str = Form(...)): 65 | """set new path(new name)""" 66 | if not path.is_dir(): 67 | raise HTTPException(status_code=404) 68 | try: 69 | path.rename(sys_resource.bucket_path / pathlib.Path("." + new_path)) 70 | except FileExistsError: 71 | raise HTTPException(status_code=412, detail="Name already exists") 72 | except OSError as e: 73 | raise HTTPException(status_code=412, detail=f"{e}") 74 | 75 | 76 | @folder.delete("{url_path:path}", summary="rm -rf") 77 | def remove_folder(path: pathlib.Path = Depends(sys_resource.syspath)): 78 | """remove empty folder and non-empty folder""" 79 | if path == sys_resource.bucket_path: 80 | raise HTTPException(status_code=422, detail="Cannot remove root folder") 81 | """ 82 | try: 83 | pathlib.Path.rmdir(path) # rm -f 84 | except FileNotFoundError: 85 | raise HTTPException(status_code=404) 86 | except OSError: 87 | raise HTTPException(status_code=412, detail="The folder is not empty") 88 | """ 89 | try: 90 | shutil.rmtree(path) # rm -rf 91 | except FileNotFoundError: 92 | raise HTTPException(status_code=404) 93 | except OSError as e: 94 | raise HTTPException(status_code=412, detail=f"{e}") 95 | -------------------------------------------------------------------------------- /api/schemas.py: -------------------------------------------------------------------------------- 1 | """fastapi docs schema""" 2 | from datetime import datetime 3 | from typing import Optional 4 | from pydantic import BaseModel 5 | from enum import Enum 6 | 7 | 8 | class sys_node_type(Enum): 9 | folder = "folder" 10 | file = "file" 11 | 12 | 13 | class sys_node(BaseModel): 14 | name: str 15 | type: sys_node_type 16 | mtime: datetime 17 | ctime: datetime 18 | 19 | 20 | class sys_folder(sys_node): 21 | type: sys_node_type = sys_node_type.folder 22 | 23 | 24 | class sys_file(sys_node): 25 | type: sys_node_type = sys_node_type.file 26 | size: str 27 | mime: Optional[str] 28 | -------------------------------------------------------------------------------- /bucket/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimCyan/ffserver/36108dd8964464a67c64b0acc491b4eb40d34872/bucket/test.txt -------------------------------------------------------------------------------- /core/__init__.py: -------------------------------------------------------------------------------- 1 | """core method""" 2 | 3 | __all__ = ['sys_resource'] 4 | 5 | from . import sys_resource 6 | -------------------------------------------------------------------------------- /core/sys_resource.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | import fastapi 3 | import aiofiles 4 | import re 5 | import filetype 6 | import mimetypes 7 | from typing import Optional, Union 8 | from functools import singledispatch 9 | 10 | bucket_path = Path("__file__").parent.joinpath("bucket") 11 | 12 | 13 | def syspath(url_path: str = fastapi.Path(...)) -> Path: 14 | return bucket_path / Path('.' + url_path) 15 | 16 | 17 | def format_bytes_size(file: Path) -> str: 18 | bytes_size = Path.stat(file).st_size 19 | series = ['B', 'KB', 'MB', 'GB', 'TB'] 20 | for _ in series: 21 | if bytes_size < 1024: 22 | return f"{bytes_size:.4g}{_}" # reserve 4 significant digits 23 | bytes_size /= 1024 24 | return f'{bytes_size:.4g}PB' 25 | 26 | 27 | def check_name(name: str) -> bool: 28 | return not re.search(r'[\\\/\:\*\?\"\<\>\|]', name) 29 | 30 | 31 | def get_mime(file: Path) -> Optional[str]: 32 | if (type := filetype.guess(file)) is None: 33 | return mimetypes.guess_type(file.name)[0] 34 | return type.mime 35 | 36 | 37 | async def read(file: Path) -> bytes: 38 | async with aiofiles.open(file, 'rb') as f: 39 | return await f.read() 40 | 41 | 42 | @singledispatch 43 | async def write(data: Union[str, bytes], file: Path): 44 | pass 45 | 46 | 47 | @write.register(bytes) 48 | async def _(data: bytes, file: Path): 49 | async with aiofiles.open(file, "wb+") as f: 50 | await f.write(data) 51 | 52 | 53 | @write.register(str) 54 | async def _(data: str, file: Path): 55 | async with aiofiles.open(file, "w+", encoding='utf-8') as f: 56 | await f.write(data) 57 | -------------------------------------------------------------------------------- /dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.8-slim 2 | LABEL org.opencontainers.image.authors="DimCyan" 3 | RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 4 | RUN mkdir /ffserver \ 5 | /ffserver/bucket 6 | WORKDIR /ffserver 7 | ADD . /ffserver/ 8 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 9 | CMD ["python", "-u", "main.py"] -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI # , HTTPException 2 | from fastapi.staticfiles import StaticFiles 3 | # from fastapi.responses import FileResponse, Response, HTMLResponse 4 | from pathlib import Path 5 | import api 6 | # import core 7 | 8 | 9 | app = FastAPI(title='FFServer API', description=""" 10 | It's not safe at all. Use it on your home WLAN. 11 | """) 12 | 13 | 14 | app.include_router(api.file, prefix="/api/file") 15 | app.include_router(api.folder, prefix="/api/folder") 16 | 17 | ''' 18 | @app.get('/{static_file:path}',response_class=Response(headers={"Content-Disposition" :"inline"}), tags=["static"]) 19 | async def static(static_file:str): 20 | """ 21 | parse `/` to `/index.html` 22 | 23 | """ 24 | path = Path(__file__).parent.joinpath("static", static_file) 25 | if path.is_file(): 26 | return FileResponse(path) 27 | path /= Path('index.html') 28 | if path.is_file(): 29 | html = await core.sys_resource.read(path) 30 | return HTMLResponse(html.decode('utf-8')) 31 | raise HTTPException(status_code=404) 32 | ''' 33 | app.mount("/", StaticFiles(directory=Path(__file__).parent.joinpath("static"), html=True)) 34 | 35 | 36 | if __name__ == '__main__': 37 | import os 38 | os.system('') 39 | import uvicorn 40 | uvicorn.run(app="main:app", host="0.0.0.0", port=8010, reload=True) 41 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | aiofiles 2 | fastapi 3 | pydantic 4 | python-multipart 5 | uvicorn 6 | filetype -------------------------------------------------------------------------------- /static/assets/index.47f6323d.css: -------------------------------------------------------------------------------- 1 | @import"//at.alicdn.com/t/font_3259001_61xs3h2d92l.css";@keyframes svelte-1oyazkt-run{0%{transform:translate(-100%)}to{transform:translate(200%)}}.bar.svelte-1oyazkt.svelte-1oyazkt.svelte-1oyazkt{display:flex;height:40px;align-items:center;user-select:none;background-color:#fff}.bar.svelte-1oyazkt>.steps.svelte-1oyazkt.svelte-1oyazkt{display:flex;align-items:center;height:100%;margin-left:10px}.bar.svelte-1oyazkt>.steps .step.svelte-1oyazkt.svelte-1oyazkt{display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:all .2s ease-out;margin-right:10px;color:gray}.bar.svelte-1oyazkt>.steps .step.svelte-1oyazkt.svelte-1oyazkt:not(.back):hover{color:#3298fe}.bar.svelte-1oyazkt>.steps .step .iconfont.svelte-1oyazkt.svelte-1oyazkt{font-size:12px;font-weight:700}.bar.svelte-1oyazkt>.steps .back.svelte-1oyazkt.svelte-1oyazkt{border:transparent 1px solid}.bar.svelte-1oyazkt>.steps .back .iconfont.svelte-1oyazkt.svelte-1oyazkt{font-weight:400;font-size:18px}.bar.svelte-1oyazkt>.steps .back.svelte-1oyazkt.svelte-1oyazkt:hover{background-color:#edf4fc;border-color:#a8d2fd}.bar.svelte-1oyazkt>.steps .back.svelte-1oyazkt.svelte-1oyazkt:active{background-color:#cae0fa}.bar.svelte-1oyazkt .path-nav.svelte-1oyazkt.svelte-1oyazkt{flex:1;overflow:hidden;height:30px;border:#ddd 1px solid;border-right:none;transition:all .2s ease-out;position:relative}.bar.svelte-1oyazkt .path-nav .loading.svelte-1oyazkt.svelte-1oyazkt{position:absolute;z-index:2;width:100%;height:100%;top:0;left:0}.bar.svelte-1oyazkt .path-nav .loading.svelte-1oyazkt.svelte-1oyazkt:after{width:100%;height:100%;content:"";display:block;transform:translate(-100%);background-image:linear-gradient(to right,rgba(0,0,0,0),rgba(7,190,7,.37));animation:svelte-1oyazkt-run 2s -1s linear infinite}.bar.svelte-1oyazkt .path-nav.active.svelte-1oyazkt.svelte-1oyazkt{cursor:text;border:#0078d7 solid 1px}.bar.svelte-1oyazkt .path-nav .steps.svelte-1oyazkt.svelte-1oyazkt{display:flex;align-items:center;height:100%;position:relative;z-index:1;overflow:hidden}.bar.svelte-1oyazkt .path-nav .steps .icon-step.svelte-1oyazkt.svelte-1oyazkt{font-size:20px;font-weight:700;color:#696969}.bar.svelte-1oyazkt .path-nav .steps .step.svelte-1oyazkt.svelte-1oyazkt{text-decoration:none;font-size:14px;color:#333;height:100%;display:flex;align-items:center;cursor:default;transition:all .2s ease-out;box-sizing:border-box;border:transparent 1px solid;padding:0 4px;max-width:100px}.bar.svelte-1oyazkt .path-nav .steps .step.svelte-1oyazkt>div.svelte-1oyazkt{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.bar.svelte-1oyazkt .path-nav .steps .step.svelte-1oyazkt.svelte-1oyazkt:hover{background-color:#edf4fc;border-color:#a8d2fd}.bar.svelte-1oyazkt .path-nav .steps .step.main.svelte-1oyazkt.svelte-1oyazkt{font-size:12px}.bar.svelte-1oyazkt .path-nav .steps .step.main .iconfont.svelte-1oyazkt.svelte-1oyazkt{font-size:20px}.bar.svelte-1oyazkt .path-nav .steps .step.main .iconfont.icon-folder-fill.svelte-1oyazkt.svelte-1oyazkt{color:#ffe896}.bar.svelte-1oyazkt .path-nav .steps .step.main .iconfont.icon-server.svelte-1oyazkt.svelte-1oyazkt{color:#6dc7ff;margin-right:6px}.bar.svelte-1oyazkt .path-nav .steps .step.main .iconfont.icon-download.svelte-1oyazkt.svelte-1oyazkt{margin-right:6px}.bar.svelte-1oyazkt .refresh.svelte-1oyazkt.svelte-1oyazkt{width:30px;height:30px;display:flex;align-items:center;justify-content:center;transition:all .2s ease-out;margin-right:10px;border:#ddd 1px solid}.bar.svelte-1oyazkt .refresh.svelte-1oyazkt.svelte-1oyazkt:hover{background-color:#edf4fc;border-color:#a8d2fd}.bar.svelte-1oyazkt .refresh.svelte-1oyazkt.svelte-1oyazkt:active{background-color:#cae0fa}.bar.svelte-1oyazkt .refresh .iconfont.svelte-1oyazkt.svelte-1oyazkt{font-weight:700;font-size:16px;color:gray}.layout.svelte-19r45i3.svelte-19r45i3{position:fixed;width:100vw;height:100vh;background-color:#fff;top:0;left:0;overflow:hidden}.layout.svelte-19r45i3 .header.svelte-19r45i3{height:28px;font-size:12px;display:flex;align-items:center;color:#333;user-select:none}.layout.svelte-19r45i3 .header-divider.svelte-19r45i3{font-size:12px;color:#999}.layout.svelte-19r45i3 .header-icon.svelte-19r45i3{font-size:18px;color:#ffe896}.layout.svelte-19r45i3 .tools.svelte-19r45i3{position:relative;height:26px}.layout.svelte-19r45i3 .tools .tabs.svelte-19r45i3{height:26px;display:flex;align-items:center;background-color:#fff;user-select:none;position:relative}.layout.svelte-19r45i3 .tools .tabs.svelte-19r45i3:after{content:"";width:100%;position:absolute;bottom:0px;height:1px;background-color:#ddd;z-index:0}.layout.svelte-19r45i3 .tools .tabs .tab.svelte-19r45i3{height:26px;line-height:24px;font-size:12px;margin:0 1px;padding:0 12px;z-index:1;transition:all .2s ease-out;box-sizing:border-box}.layout.svelte-19r45i3 .tools .tabs .tab.svelte-19r45i3:first-child{margin-left:0}.layout.svelte-19r45i3 .tools .tabs .tab.svelte-19r45i3:last-child{margin-right:0}.layout.svelte-19r45i3 .tools .tabs .tab.svelte-19r45i3:not(.extra){position:relative;border:transparent solid 1px;border-bottom-color:#ddd;background-color:#fff}.layout.svelte-19r45i3 .tools .tabs .tab.svelte-19r45i3:not(.extra):hover{border-color:#ddd}.layout.svelte-19r45i3 .tools .tabs .tab:not(.extra).active.svelte-19r45i3{border-color:#ddd;background-color:#f5f6f7}.layout.svelte-19r45i3 .tools .tabs .tab.extra.svelte-19r45i3{background-color:#0066b4;color:#fff}.layout.svelte-19r45i3 .tools .tabs .tab.extra.svelte-19r45i3:hover{background-color:#067fdb}.layout.svelte-19r45i3 .tools .tabs .tab.extra.active.svelte-19r45i3{background-color:#005494}.layout.svelte-19r45i3 .tools .eject.svelte-19r45i3{position:relative;z-index:99}.layout.svelte-19r45i3 .tools .eject .panel.svelte-19r45i3,.layout.svelte-19r45i3 .tools .eject .menu.svelte-19r45i3{position:absolute}.layout.svelte-19r45i3 .tools .eject .menu.svelte-19r45i3{background-color:#ddd;width:268px;min-height:300px;border:#aaa solid 1px;border-radius:2px;overflow:hidden;display:flex;flex-direction:column;user-select:none}.layout.svelte-19r45i3 .tools .eject .menu.svelte-19r45i3:after{content:"";display:block;width:100%;min-height:16px;border-top:#aaa solid 1px;background-color:#fefeff}.layout.svelte-19r45i3 .tools .eject .menu-wrapper.svelte-19r45i3{flex:1;background-color:#fbfcfd}.layout.svelte-19r45i3 .tools .eject .menu-item.svelte-19r45i3{cursor:default;height:38px;font-size:12px;display:flex;align-items:center;box-sizing:border-box;border:transparent solid 1px}.layout.svelte-19r45i3 .tools .eject .menu-item.disabled.svelte-19r45i3{color:#999}.layout.svelte-19r45i3 .tools .eject .menu-item.svelte-19r45i3:not(.disabled):hover{background-color:#edf4fc;border-color:#a8d2fd}.layout.svelte-19r45i3 .tools .eject .menu-item .iconfont.svelte-19r45i3{font-size:30px;margin-right:4px}.layout.svelte-19r45i3 .tools .eject .menu-item .iconfont.icon-upload.svelte-19r45i3{color:#4478d2}.layout.svelte-19r45i3 .tools .eject .menu-item .iconfont.icon-new-folder.svelte-19r45i3{color:#f0d05f}.layout.svelte-19r45i3 .tools .eject .menu-item .iconfont.icon-paste.svelte-19r45i3{color:#8698b5}.layout.svelte-19r45i3 .tools .eject .panel.svelte-19r45i3{width:100%;top:0;left:0;background-color:#f5f6f7;height:112px;box-shadow:#ccc 0 1px 3px;display:flex;align-items:center}.layout.svelte-19r45i3 .slot-wrapper.svelte-19r45i3{height:calc(100vh - 94px)}.menu.svelte-15tg8wh{position:fixed;width:262px;background-color:#f1f1f1;box-shadow:#aaa 3px 3px 4px;border:#aaa solid 1px;user-select:none}.item.svelte-6s0tr2.svelte-6s0tr2{display:flex;align-items:center;height:28px;margin:1px 2px}.item.disabled.svelte-6s0tr2 .text.svelte-6s0tr2{color:#999}.item.svelte-6s0tr2.svelte-6s0tr2:not(.disabled):hover{background-color:#fff}.item.svelte-6s0tr2 .icon.svelte-6s0tr2{width:28px;text-align:center}.item.svelte-6s0tr2 .text.svelte-6s0tr2{font-size:12px;color:#333}.group.svelte-9j64vd{position:relative;padding:1px 0}.group.svelte-9j64vd:not(:last-child):after{content:"";position:absolute;bottom:-1px;left:50%;transform:translate(-50%);width:calc(100% - 20px);background-color:#aaa;height:1px}.container.svelte-1yk83nc.svelte-1yk83nc{height:100%;display:flex;flex-direction:column;user-select:none}.container.svelte-1yk83nc .content.svelte-1yk83nc{flex:1;overflow:hidden;display:flex}.container.svelte-1yk83nc .content .file-list.svelte-1yk83nc{flex:1;overflow:auto;height:100%}.container.svelte-1yk83nc .content .file-list table.svelte-1yk83nc{width:100%;min-width:820px;border:none;border-collapse:unset;border-spacing:0}.container.svelte-1yk83nc .content .file-list table thead.svelte-1yk83nc{position:sticky;top:0;background-color:#fff}.container.svelte-1yk83nc .content .file-list table th.svelte-1yk83nc{font-size:12px;font-weight:400;color:#666;height:36px;text-align:left;vertical-align:middle;padding-left:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition:all .2s ease-out;border:none}.container.svelte-1yk83nc .content .file-list table th.svelte-1yk83nc:hover{background-color:#d9ebf9}.container.svelte-1yk83nc .content .file-list table th.svelte-1yk83nc:nth-child(1){min-height:300px}.container.svelte-1yk83nc .content .file-list table th.svelte-1yk83nc:nth-child(2){width:160px}.container.svelte-1yk83nc .content .file-list table th.svelte-1yk83nc:nth-child(3){width:200px}.container.svelte-1yk83nc .content .file-list table th.svelte-1yk83nc:nth-child(4){width:200px}.container.svelte-1yk83nc .content .file-list table tbody tr.svelte-1yk83nc{transition:all .2s ease-out}.container.svelte-1yk83nc .content .file-list table tbody tr.active.svelte-1yk83nc{background-color:#cce8ff}.container.svelte-1yk83nc .content .file-list table tbody tr.cutting .iconfont.svelte-1yk83nc{opacity:.5}.container.svelte-1yk83nc .content .file-list table tbody tr.svelte-1yk83nc:not(.active):hover{background-color:#d9ebf9}.container.svelte-1yk83nc .content .file-list table tbody tr:not(.active):hover td.svelte-1yk83nc{border:none}.container.svelte-1yk83nc .content .file-list table td.svelte-1yk83nc{font-size:12px;text-align:left;vertical-align:middle;height:24px;color:#333;padding-left:20px;border:none}.container.svelte-1yk83nc .content .file-list table td .iconfont.svelte-1yk83nc{font-size:16px}.container.svelte-1yk83nc .content .file-list table td .iconfont.icon-folder-fill.svelte-1yk83nc{color:#ffe896}.container.svelte-1yk83nc .content .file-info.svelte-1yk83nc{min-width:278px;border-left:1px #eee solid;position:relative;height:100%}@media screen and (max-width: 1023px){.container.svelte-1yk83nc .content .file-info.svelte-1yk83nc{display:none}}.container.svelte-1yk83nc .content .file-info .data.svelte-1yk83nc{color:#333}.container.svelte-1yk83nc .content .file-info .data .title.svelte-1yk83nc{font-size:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 20px}.container.svelte-1yk83nc .content .file-info .data .type.svelte-1yk83nc{font-size:14px;color:#444;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:10px 20px 0}.container.svelte-1yk83nc .content .file-info .data .icon.svelte-1yk83nc{margin-left:20px;margin-top:10px}.container.svelte-1yk83nc .content .file-info .data .icon .iconfont.svelte-1yk83nc{font-size:80px}.container.svelte-1yk83nc .content .file-info .data .icon .iconfont.icon-file.svelte-1yk83nc{color:#aaa}.container.svelte-1yk83nc .content .file-info .data .icon .iconfont.icon-folder-fill.svelte-1yk83nc,.container.svelte-1yk83nc .content .file-info .data .icon .iconfont.icon-folder.svelte-1yk83nc{color:#ffe896}.container.svelte-1yk83nc .content .file-info .data .others.svelte-1yk83nc{font-size:12px;margin-top:10px}.container.svelte-1yk83nc .content .file-info .data .others .item.svelte-1yk83nc{height:20px;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 20px}.container.svelte-1yk83nc .content .file-info .moveable.svelte-1yk83nc{position:absolute;top:0;left:-5px;height:100%;width:5px;cursor:e-resize}.container.svelte-1yk83nc .content .file-info .moveable.active.svelte-1yk83nc{position:fixed;width:100vw;height:100vh;top:0;left:0}.container.svelte-1yk83nc .footer.svelte-1yk83nc{height:24px;display:flex;align-items:center}.container.svelte-1yk83nc .footer .info.svelte-1yk83nc{font-size:12px;margin:0 10px}.contentmenu.svelte-1yk83nc.svelte-1yk83nc{position:fixed;z-index:999999}html,body{margin:0;padding:0}body{background-color:#fff;font-family:\5fae\8f6f\96c5\9ed1,Microsoft YaHei,Helvetica,Tahoma,sans-serif} 2 | -------------------------------------------------------------------------------- /static/assets/index.befc7fe7.js: -------------------------------------------------------------------------------- 1 | import{S as ve,i as $e,s as ge,e as w,a as m,b,d as y,l as Z,n as Me,c as j,t as le,f as p,g as tt,p as Ct,h as Ee,j as G,k as be,m as Nt,o as zt,q as ne,r as Xe,u as Le,w as Ie,v as je,x as kn,y as Se,z as We,A as I,B as T,C as Ce,D as Ae,E as He,F as Ve,G as H,H as Dt,I as O,J as jt,K as Be,L as R,M as ae,N as At,O as De,P as Q,Q as wn,R as bn,T as yn,U as nt,V as Sn,W as Mn,X as Ge,Y as Cn,Z as Nn}from"./vendor.5e481b06.js";function lo(){import("data:text/javascript,")}const zn=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&l(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerpolicy&&(o.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?o.credentials="include":s.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}};zn();const Dn="/api";function Ze(t){return`${Dn}/${t}`}function ye(t,e){return`api:${t}/${e}`}function jn(t,e){return t.status===200}function An(t,e){return t.status===404}function Hn(t,e){return t.status===422}async function Ye(t){const e=await t.json();if(jn(t))return e;throw An(t)?new Error(e.detail):Hn(t)?new Error(JSON.stringify(e.detail)):new Error(JSON.stringify(e))}async function Vn(t,e){const n=await fetch(Ze(t)+"/"+e,{method:"GET"});return await Ye(n)}async function Ht(t,e,n){const l=new FormData;for(const o in n)l.append(o,n[o]);const s=await fetch(Ze(t)+"/"+e,{method:"POST",body:l});return await Ye(s)}async function Vt(t,e){const n=await fetch(Ze(t)+"/"+e,{method:"DELETE"});return await Ye(n)}async function Xt(t,e,n){const l=new FormData;for(const o in n)l.append(o,n[o]);const s=await fetch(Ze(t)+"/"+e,{method:"PUT",body:l});return await Ye(s)}async function Xn(t){try{return await Vn("folder",t)}catch(e){throw new Error(ye("ls",e))}}async function Gn(t,e){try{return confirm(`You want to delete file ${e||t}?`)?(await Vt("file",t),!0):!1}catch(n){throw new Error(ye("rm -f",n))}}async function On(t,e){try{return confirm(`You want to delete folder ${e||t}?`)?(await Vt("folder",t),!0):!1}catch(n){throw new Error(ye("rm -rf",n))}}async function Ue(t,e){const n=document.createElement("a");n.href=Ze("file")+"/"+t,n.download=e,n.click()}async function Jn(t){const e=prompt("new folder name","new folder");if(!e)return!1;try{return await Ht("folder",t,{dirname:e}),!0}catch(n){throw new Error(ye("mkdir",n))}}function Wn(t){return new Promise((e,n)=>{const l=document.createElement("input");l.type="file",l.addEventListener("change",async()=>{const s=l.files[0];if(!s)return n("file select error");if(confirm(`Do you want to upload ${s.name}`))try{await Ht("file",t,{file:s}),e(!0)}catch(o){n(ye("upload",o))}else e(!1)}),l.click()})}async function Bn(t,e,n="file"){const l=prompt(`replace ${n} name`,e);if(!l)throw new Error(ye("rename","new name connot be empty"));if(e===l)return!0;try{return await Xt(n,t,{new_path:t.replace(e,l)}),!0}catch(s){throw new Error(ye("rename",s))}}async function qn(t,e,n="file"){if(confirm(`you want to move ${n} ${t} to ${e}`))try{return await Xt(n,t,{new_path:e}),!0}catch(l){throw new Error(ye("rename",l))}else return!1}function ot(t,e,n){const l=t.slice();return l[16]=e[n],l}function st(t){let e;return{c(){e=w("div"),m(e,"class","loading svelte-1oyazkt")},m(n,l){b(n,e,l)},d(n){n&&y(e)}}}function Zn(t){var k,W;let e,n,l,s,o,i,c=(t[8].length===0?(k=t[2])!=null?k:"FFServer":(W=t[2])!=null?W:"")+"",f,r,a,g,_,v=t[8],d=[];for(let S=0;S',m(e,"class","refresh svelte-1oyazkt")},m(s,o){b(s,e,o),n||(l=Z(e,"click",t[15]),n=!0)},p:Me,d(s){s&&y(e),n=!1,l()}}}function Kn(t){let e,n,l,s,o,i,c,f,r,a=t[0]&&st();function g(k,W){return Zn}let v=g()(t),d=t[1]&&ct(t);return{c(){e=w("div"),n=w("div"),l=w("div"),l.innerHTML='',s=j(),o=w("div"),a&&a.c(),i=j(),v.c(),c=j(),d&&d.c(),m(l,"class","step back svelte-1oyazkt"),m(n,"class","steps svelte-1oyazkt"),m(o,"class","path-nav svelte-1oyazkt"),le(o,"active",Qn),m(e,"class","bar svelte-1oyazkt")},m(k,W){b(k,e,W),p(e,n),p(n,l),p(e,s),p(e,o),a&&a.m(o,null),p(o,i),v.m(o,null),p(e,c),d&&d.m(e,null),f||(r=Z(l,"click",t[11]),f=!0)},p(k,[W]){k[0]?a||(a=st(),a.c(),a.m(o,i)):a&&(a.d(1),a=null),v.p(k,W),k[1]?d?d.p(k,W):(d=ct(k),d.c(),d.m(e,null)):d&&(d.d(1),d=null)},i:Me,o:Me,d(k){k&&y(e),a&&a.d(),v.d(),d&&d.d(),f=!1,r()}}}let Qn=!1;function In(t,e,n){let{pathSteps:l=[]}=e,{loading:s=!1}=e,{showTools:o=!0}=e,{rootPath:i=null}=e,{rootIcon:c=null}=e,{rootSimpleIcon:f=null}=e,{rootIconColor:r=null}=e,{rootSimpleIconColor:a=null}=e,g="",_=[];const v=tt(),d=()=>Ct();function k(){g=this.value,n(7,g)}const W=()=>{Ee("/folder").then(()=>{v("changeNav")})},S=N=>{Ee(N.href).then(()=>{v("changeNav")})},z=()=>v("refresh");return t.$$set=N=>{"pathSteps"in N&&n(10,l=N.pathSteps),"loading"in N&&n(0,s=N.loading),"showTools"in N&&n(1,o=N.showTools),"rootPath"in N&&n(2,i=N.rootPath),"rootIcon"in N&&n(3,c=N.rootIcon),"rootSimpleIcon"in N&&n(4,f=N.rootSimpleIcon),"rootIconColor"in N&&n(5,r=N.rootIconColor),"rootSimpleIconColor"in N&&n(6,a=N.rootSimpleIconColor)},t.$$.update=()=>{if(t.$$.dirty&1028){const N=[];for(let A=0;A({}),rt=t=>({});function Ln(t){let e,n,l,s;return{c(){e=w("div"),n=w("div"),n.textContent="File",m(n,"class","tab extra svelte-19r45i3"),le(n,"active",t[8]),m(e,"class","tabs svelte-19r45i3")},m(o,i){b(o,e,i),p(e,n),l||(s=Z(n,"click",Ce(t[15])),l=!0)},p(o,i){i&256&&le(n,"active",o[8])},d(o){o&&y(e),l=!1,s()}}}function at(t){let e,n,l,s,o=t[11],i=[];for(let c=0;cWe(f,"loading",N)),f.$on("refresh",t[18]),f.$on("changeNav",t[19]);const V=t[13].default,X=je(V,t,t[12],null);return{c(){e=w("div"),n=w("div"),n.innerHTML=` 2 | 3 | FFServer`,l=j(),s=w("div"),S&&S.c(),o=j(),i=w("div"),z&&z.c(),c=j(),I(f.$$.fragment),a=j(),g=w("div"),X&&X.c(),m(n,"class","header svelte-19r45i3"),m(i,"class","eject svelte-19r45i3"),m(s,"class","tools svelte-19r45i3"),m(g,"class","slot-wrapper svelte-19r45i3"),m(e,"class","layout svelte-19r45i3")},m(C,$){b(C,e,$),p(e,n),p(e,l),p(e,s),S&&S.m(s,null),p(s,o),p(s,i),z&&z.m(i,null),p(e,c),T(f,e,null),p(e,a),p(e,g),X&&X.m(g,null),_=!0,v||(d=Z(i,"click",Ce(t[14])),v=!0)},p(C,[$]){W?W.p&&(!_||$&4096)&&Ae(W,k,C,C[12],_?Ve(k,C[12],$,Rn):He(C[12]),rt):S&&S.p&&(!_||$&256)&&S.p(C,_?$:-1),C[8]?z?(z.p(C,$),$&256&&H(z,1)):(z=at(C),z.c(),H(z,1),z.m(i,null)):z&&(Dt(),O(z,1,1,()=>{z=null}),jt());const h={};$&2&&(h.pathSteps=C[1]),$&4&&(h.showTools=C[2]),$&16&&(h.rootIcon=C[4]),$&8&&(h.rootPath=C[3]),$&32&&(h.rootSimpleIcon=C[5]),$&64&&(h.rootIconColor=C[6]),$&128&&(h.rootSimpleIconColor=C[7]),!r&&$&1&&(r=!0,h.loading=C[0],Be(()=>r=!1)),f.$set(h),X&&X.p&&(!_||$&4096)&&Ae(X,V,C,C[12],_?Ve(V,C[12],$,null):He(C[12]),null)},i(C){_||(H(S,C),H(z),H(f.$$.fragment,C),H(X,C),_=!0)},o(C){O(S,C),O(z),O(f.$$.fragment,C),O(X,C),_=!1},d(C){C&&y(e),S&&S.d(C),z&&z.d(),R(f),X&&X.d(C),v=!1,d()}}}const Yn="__layout$tab-";function Un(t,e,n){let l,s;ae(t,he,$=>n(20,l=$));let{$$slots:o={},$$scope:i}=e,{pathSteps:c=[]}=e,{pathNavLoading:f=!1}=e,{showNavRefresh:r=!0}=e,{navRootPath:a=null}=e,{navRootIcon:g=null}=e,{navRootSimpleIcon:_=null}=e,{navRootIconColor:v=null}=e,{navRootSimpleIconColor:d=null}=e;const k=tt(),[,,W]=Te(Yn+"File");ae(t,W,$=>n(8,s=$));const S=[{text:"Upload File",type:"upload",icon:"upload"},{text:"New Folder",type:"mkdir",icon:"new-folder"},{text:"Paste Item",type:"paste",icon:"paste",get disabled(){return l===null}}];function z($){De.call(this,t,$)}const N=()=>{s?_e():(_e(),Q(W,s=!0,s))},A=$=>{$.disabled||(k("FileMenuClick",{type:$.type}),wn().then(()=>{Q(W,s=!1,s)}))};function V($){f=$,n(0,f)}function X($){De.call(this,t,$)}function C($){De.call(this,t,$)}return t.$$set=$=>{"pathSteps"in $&&n(1,c=$.pathSteps),"pathNavLoading"in $&&n(0,f=$.pathNavLoading),"showNavRefresh"in $&&n(2,r=$.showNavRefresh),"navRootPath"in $&&n(3,a=$.navRootPath),"navRootIcon"in $&&n(4,g=$.navRootIcon),"navRootSimpleIcon"in $&&n(5,_=$.navRootSimpleIcon),"navRootIconColor"in $&&n(6,v=$.navRootIconColor),"navRootSimpleIconColor"in $&&n(7,d=$.navRootSimpleIconColor),"$$scope"in $&&n(12,i=$.$$scope)},[f,c,r,a,g,_,v,d,s,k,W,S,i,o,z,N,A,V,X,C]}class Gt extends ve{constructor(e){super();$e(this,e,Un,Fn,ge,{pathSteps:1,pathNavLoading:0,showNavRefresh:2,navRootPath:3,navRootIcon:4,navRootSimpleIcon:5,navRootIconColor:6,navRootSimpleIconColor:7})}}var qe=(t=>(t[t.Unknown=0]="Unknown",t[t["7-Zip"]=1]="7-Zip",t[t.AVI=2]="AVI",t[t.BAT=3]="BAT",t[t["Adobe Illustrator"]=4]="Adobe Illustrator",t[t.BMP=5]="BMP",t[t.CSS=6]="CSS",t[t.Conf=7]="Conf",t[t.EOT=8]="EOT",t[t["MS-Word 2007"]=9]="MS-Word 2007",t[t["MS-Word 2003"]=10]="MS-Word 2003",t[t["MS-Excel 2007"]=11]="MS-Excel 2007",t[t["MS-PPT 2003"]=12]="MS-PPT 2003",t[t.HTM=13]="HTM",t[t.HTML=14]="HTML",t[t.ICO=15]="ICO",t[t.INI=16]="INI",t[t.Jar=17]="Jar",t[t.Java=18]="Java",t[t.JPEG=19]="JPEG",t[t.JPG=20]="JPG",t[t.JavaScript=21]="JavaScript",t[t.MarkDown=22]="MarkDown",t[t.MP3=23]="MP3",t[t.MP4=24]="MP4",t[t.MP5=25]="MP5",t[t.MPGE=26]="MPGE",t[t.PDF=27]="PDF",t[t.PL=28]="PL",t[t.PNG=29]="PNG",t[t.PPT=30]="PPT",t[t["Adobe Photoshop"]=31]="Adobe Photoshop",t[t.Python=32]="Python",t[t.RAR=33]="RAR",t[t.RM=34]="RM",t[t.Shell=35]="Shell",t[t.SVG=36]="SVG",t[t.TTF=37]="TTF",t[t.TAR=38]="TAR",t[t.Text=39]="Text",t[t.WOFF=40]="WOFF",t[t.XML=41]="XML",t[t.YML=42]="YML",t[t.YAML=43]="YAML",t[t.ZIP=44]="ZIP",t[t.Binary=45]="Binary",t))(qe||{});const Pe={"":"","7z":1,avi:2,bat:3,ai:4,bmp:5,css:6,jss:6,wxss:6,scss:6,sass:6,less:6,stylus:6,styl:6,conf:7,config:7,eot:8,docx:9,doc:10,htm:13,html:14,xhtml:14,pug:14,ejs:14,hbs:14,php:14,asp:14,jsp:14,ico:15,icon:15,jar:17,war:17,java:18,class:18,jpeg:19,jpg:20,js:21,jsx:21,coffee:21,ts:21,tsx:21,res:21,md:22,mdx:22,markdown:22,mp3:23,mp4:24,mp5:25,mpge:26,mp2:26,pdf:27,pl:28,png:29,pngx:29,ppt:12,pptx:12,psd:31,psb:31,py:32,pyd:32,pyc:32,rar:33,rm:34,sh:35,ps1:35,svg:36,ttf:37,tar:38,txt:39,text:39,xls:11,xlsx:11,woff:40,xml:41,xaml:41,yml:42,yaml:43,zip:44,bin:45,exe:45,dll:45,msi:45,so:45,msix:45},q={[0]:{icon:"file-unknown"},[1]:{icon:"file-7z"},[2]:{icon:"file-avi"},[3]:{icon:"file-bat"},[4]:{icon:"file-ai"},[5]:{icon:"file-bmp",color:"rgb(47,166,154)"},[6]:{icon:"file-css",color:"rgb(72,166,242)"},[7]:{icon:"file-conf"},[8]:{icon:"file-eot"},[9]:{icon:"file-docx",color:"rgb(11,88,153)"},[10]:{icon:"file-doc",color:"rgb(11,88,153)"},[11]:{icon:"file-xlsx",color:"rgb(11,88,153)"},[12]:{icon:"file-ppt",color:"rgb(11,88,153)"},[13]:{icon:"file-htm"},[14]:{icon:"file-html"},[15]:{icon:"file-ico"},[16]:{icon:"file-ini"},[17]:{icon:"file-jar"},[18]:{icon:"file-java",color:"rgb(241,63,60)"},[19]:{icon:"file-jepg",color:"rgb(47,166,154)"},[20]:{icon:"file-jpg",color:"rgb(47,166,154)"},[21]:{icon:"file-javascript",color:"rgb(22,137,206)"},[22]:{icon:"file-markdown"},[23]:{icon:"file-mp3"},[24]:{icon:"file-mp4"},[25]:{icon:"file-mp5"},[26]:{icon:"file-mpge"},[27]:{icon:"file-pdf"},[28]:{icon:"file-pl"},[29]:{icon:"file-png",color:"rgb(47,166,154)"},[30]:{icon:"file-ppt"},[31]:{icon:"file-psd",color:"rgb(47,166,154)"},[32]:{icon:"file-python",color:"rgb(252,215,71)"},[33]:{icon:"file-rar"},[34]:{icon:"file-rm"},[35]:{icon:"file-sh"},[36]:{icon:"file-svg"},[37]:{icon:"file-ttf"},[38]:{icon:"file-tar"},[39]:{icon:"file-text"},[40]:{icon:"file-woff"},[41]:{icon:"file-xml"},[42]:{icon:"file-yml"},[43]:{icon:"file-yaml"},[44]:{icon:"file-zip"},[45]:{icon:"file-bin"}},Fe={icon:"file-unknown"},Pn=0;async function ze(t){try{return[await t,null]}catch(e){return[null,e]}}function mt(t){let e,n,l,s,o,i;const c=t[7].default,f=je(c,t,t[6],null);return{c(){e=w("div"),f&&f.c(),m(e,"class","menu svelte-15tg8wh"),m(e,"style",n=`left:${t[3]}px;top:${t[2]}px;`)},m(r,a){b(r,e,a),f&&f.m(e,null),t[10](e),s=!0,o||(i=Z(e,"click",Ce(t[8])),o=!0)},p(r,a){f&&f.p&&(!s||a&64)&&Ae(f,c,r,r[6],s?Ve(c,r[6],a,null):He(r[6]),null),(!s||a&12&&n!==(n=`left:${r[3]}px;top:${r[2]}px;`))&&m(e,"style",n)},i(r){s||(H(f,r),l||bn(()=>{l=yn(e,At,{duration:200}),l.start()}),s=!0)},o(r){O(f,r),s=!1},d(r){r&&y(e),f&&f.d(r),t[10](null),o=!1,i()}}}function xn(t){let e,n,l,s,o,i=t[0]&&mt(t);return{c(){e=j(),i&&i.c(),n=nt()},m(c,f){b(c,e,f),i&&i.m(c,f),b(c,n,f),l=!0,s||(o=Z(document.body,"click",t[9]),s=!0)},p(c,[f]){c[0]?i?(i.p(c,f),f&1&&H(i,1)):(i=mt(c),i.c(),H(i,1),i.m(n.parentNode,n)):i&&(Dt(),O(i,1,1,()=>{i=null}),jt())},i(c){l||(H(i),l=!0)},o(c){O(i),l=!1},d(c){c&&y(e),i&&i.d(c),c&&y(n),s=!1,o()}}}function En(t,e,n){let l,s,{$$slots:o={},$$scope:i}=e,{show:c=!0}=e,{x:f=0}=e,{y:r=0}=e,a;function g(d){De.call(this,t,d)}const _=()=>n(0,c=!1);function v(d){Se[d?"unshift":"push"](()=>{a=d,n(1,a)})}return t.$$set=d=>{"show"in d&&n(0,c=d.show),"x"in d&&n(4,f=d.x),"y"in d&&n(5,r=d.y),"$$scope"in d&&n(6,i=d.$$scope)},t.$$.update=()=>{t.$$.dirty&16&&n(3,l=f>window.innerWidth-262-10?f-262-10:f),t.$$.dirty&34&&n(2,s=r>window.innerHeight-(a==null?void 0:a.clientHeight)?r-(a==null?void 0:a.clientHeight):r)},[c,a,s,l,f,r,i,o,g,_,v]}class xe extends ve{constructor(e){super();$e(this,e,En,xn,ge,{show:0,x:4,y:5})}}const el=t=>({}),dt=t=>({});function tl(t){let e,n,l,s,o,i,c;const f=t[3].icon,r=je(f,t,t[2],dt),a=t[3].default,g=je(a,t,t[2],null);return{c(){e=w("div"),n=w("div"),r&&r.c(),l=j(),s=w("div"),g&&g.c(),m(n,"class","icon svelte-6s0tr2"),m(s,"class","text svelte-6s0tr2"),m(e,"class","item svelte-6s0tr2"),le(e,"disabled",t[0])},m(_,v){b(_,e,v),p(e,n),r&&r.m(n,null),p(e,l),p(e,s),g&&g.m(s,null),o=!0,i||(c=Z(e,"click",t[4]),i=!0)},p(_,[v]){r&&r.p&&(!o||v&4)&&Ae(r,f,_,_[2],o?Ve(f,_[2],v,el):He(_[2]),dt),g&&g.p&&(!o||v&4)&&Ae(g,a,_,_[2],o?Ve(a,_[2],v,null):He(_[2]),null),v&1&&le(e,"disabled",_[0])},i(_){o||(H(r,_),H(g,_),o=!0)},o(_){O(r,_),O(g,_),o=!1},d(_){_&&y(e),r&&r.d(_),g&&g.d(_),i=!1,c()}}}function nl(t,e,n){let{$$slots:l={},$$scope:s}=e,{disabled:o=!1}=e;const i=tt(),c=()=>{o||i("click")};return t.$$set=f=>{"disabled"in f&&n(0,o=f.disabled),"$$scope"in f&&n(2,s=f.$$scope)},[o,i,s,l,c]}class fe extends ve{constructor(e){super();$e(this,e,nl,tl,ge,{disabled:0})}}var Re=(t=>(t.Delete="Delete",t.X="x",t.V="v",t))(Re||{});function Oe(t,e,n){if(!e&&t)n();else if(t)alert(e);else return}function ll(t){let e,n;const l=t[1].default,s=je(l,t,t[0],null);return{c(){e=w("div"),s&&s.c(),m(e,"class","group svelte-9j64vd")},m(o,i){b(o,e,i),s&&s.m(e,null),n=!0},p(o,[i]){s&&s.p&&(!n||i&1)&&Ae(s,l,o,o[0],n?Ve(l,o[0],i,null):He(o[0]),null)},i(o){n||(H(s,o),n=!0)},o(o){O(s,o),n=!1},d(o){o&&y(e),s&&s.d(o)}}}function ol(t,e,n){let{$$slots:l={},$$scope:s}=e;return t.$$set=o=>{"$$scope"in o&&n(0,s=o.$$scope)},[s,l]}class ue extends ve{constructor(e){super();$e(this,e,ol,ll,ge,{})}}function lt(){alert("Functions not completed yet")}function Je(t){return t.replaceAll(/\/+/g,"/")}function pt(t,e,n){const l=t.slice();return l[84]=e[n],l}function ht(t,e,n){const l=t.slice();return l[84]=e[n],l}function _t(t){let e,n,l,s,o=t[84].name+"",i,c,f,r=t[84].modify+"",a,g,_,v,d,k,W;function S(){return t[46](t[84])}function z(...V){return t[47](t[84],...V)}function N(){return t[49](t[84])}function A(){return t[50](t[84])}return{c(){var V,X;e=w("tr"),n=w("td"),l=w("i"),s=j(),i=G(o),c=j(),f=w("td"),a=G(r),g=j(),_=w("td"),_.textContent="Folder",v=j(),d=w("td"),m(l,"class","iconfont icon-folder-fill svelte-1yk83nc"),m(n,"class","svelte-1yk83nc"),m(f,"class","svelte-1yk83nc"),m(_,"class","svelte-1yk83nc"),m(d,"class","svelte-1yk83nc"),m(e,"class","svelte-1yk83nc"),le(e,"active",t[5]===t[84]),le(e,"cutting",t[24]()===((V=t[10])==null?void 0:V.fromPath)&&t[84].name===((X=t[10])==null?void 0:X.itemValue.name))},m(V,X){b(V,e,X),p(e,n),p(n,l),p(n,s),p(n,i),p(e,c),p(e,f),p(f,a),p(e,g),p(e,_),p(e,v),p(e,d),k||(W=[Z(e,"touchend",S,{passive:!0}),Z(e,"contextmenu",z),Z(e,"contextmenu",t[48]),Z(e,"click",Ce(N)),Z(e,"dblclick",A)],k=!0)},p(V,X){var C,$;t=V,X[0]&256&&o!==(o=t[84].name+"")&&ne(i,o),X[0]&256&&r!==(r=t[84].modify+"")&&ne(a,r),X[0]&288&&le(e,"active",t[5]===t[84]),X[0]&16778496&&le(e,"cutting",t[24]()===((C=t[10])==null?void 0:C.fromPath)&&t[84].name===(($=t[10])==null?void 0:$.itemValue.name))},d(V){V&&y(e),k=!1,Xe(W)}}}function vt(t){let e,n,l,s,o,i,c=t[84].name+"",f,r,a,g=t[84].modify+"",_,v,d,k=qe[t[84].fileType]+"",W,S,z,N,A=t[84].size+"",V,X,C,$;function h(){return t[51](t[84])}function D(...K){return t[52](t[84],...K)}function E(){return t[54](t[84])}function Y(){return t[55](t[84])}return{c(){var K,F,se,ie,P,oe;e=w("tr"),n=w("td"),l=w("i"),i=j(),f=G(c),r=j(),a=w("td"),_=G(g),v=j(),d=w("td"),W=G(k),S=G(" File"),z=j(),N=w("td"),V=G(A),X=j(),m(l,"class",s="iconfont icon-"+((F=(K=q==null?void 0:q[t[84].fileType])==null?void 0:K.icon)!=null?F:Fe.icon)+" svelte-1yk83nc"),m(l,"style",o=(se=q==null?void 0:q[t[84].fileType])!=null&&se.color?`color:${(ie=q==null?void 0:q[t[84].fileType])==null?void 0:ie.color}`:""),m(n,"class","svelte-1yk83nc"),m(a,"class","svelte-1yk83nc"),m(d,"class","svelte-1yk83nc"),m(N,"class","svelte-1yk83nc"),m(e,"class","svelte-1yk83nc"),le(e,"active",t[5]===t[84]),le(e,"cutting",t[24]()===((P=t[10])==null?void 0:P.fromPath)&&t[84].name===((oe=t[10])==null?void 0:oe.itemValue.name))},m(K,F){b(K,e,F),p(e,n),p(n,l),p(n,i),p(n,f),p(e,r),p(e,a),p(a,_),p(e,v),p(e,d),p(d,W),p(d,S),p(e,z),p(e,N),p(N,V),p(e,X),C||($=[Z(e,"touchend",h,{passive:!0}),Z(e,"contextmenu",D),Z(e,"contextmenu",t[53]),Z(e,"click",Ce(E)),Z(e,"dblclick",Y)],C=!0)},p(K,F){var se,ie,P,oe,x,ke;t=K,F[0]&128&&s!==(s="iconfont icon-"+((ie=(se=q==null?void 0:q[t[84].fileType])==null?void 0:se.icon)!=null?ie:Fe.icon)+" svelte-1yk83nc")&&m(l,"class",s),F[0]&128&&o!==(o=(P=q==null?void 0:q[t[84].fileType])!=null&&P.color?`color:${(oe=q==null?void 0:q[t[84].fileType])==null?void 0:oe.color}`:"")&&m(l,"style",o),F[0]&128&&c!==(c=t[84].name+"")&&ne(f,c),F[0]&128&&g!==(g=t[84].modify+"")&&ne(_,g),F[0]&128&&k!==(k=qe[t[84].fileType]+"")&&ne(W,k),F[0]&128&&A!==(A=t[84].size+"")&&ne(V,A),F[0]&160&&le(e,"active",t[5]===t[84]),F[0]&16778368&&le(e,"cutting",t[24]()===((x=t[10])==null?void 0:x.fromPath)&&t[84].name===((ke=t[10])==null?void 0:ke.itemValue.name))},d(K){K&&y(e),C=!1,Xe($)}}}function sl(t){let e=t[0].length+"",n,l;return{c(){n=G(e),l=G(" Items")},m(s,o){b(s,n,o),b(s,l,o)},p(s,o){o[0]&1&&e!==(e=s[0].length+"")&&ne(n,e)},d(s){s&&y(n),s&&y(l)}}}function il(t){let e=t[5].name+"",n;return{c(){n=G(e)},m(l,s){b(l,n,s)},p(l,s){s[0]&32&&e!==(e=l[5].name+"")&&ne(n,e)},d(l){l&&y(n)}}}function $t(t){let e=qe[t[5].fileType]+"",n,l;return{c(){n=G(e),l=G(" File")},m(s,o){b(s,n,o),b(s,l,o)},p(s,o){o[0]&32&&e!==(e=qe[s[5].fileType]+"")&&ne(n,e)},d(s){s&&y(n),s&&y(l)}}}function cl(t){let e;return{c(){e=w("i"),m(e,"class","iconfont icon-folder svelte-1yk83nc")},m(n,l){b(n,e,l)},p:Me,d(n){n&&y(e)}}}function fl(t){let e;function n(o,i){return o[5].type==="folder"?al:rl}let l=n(t),s=l(t);return{c(){s.c(),e=nt()},m(o,i){s.m(o,i),b(o,e,i)},p(o,i){l===(l=n(o))&&s?s.p(o,i):(s.d(1),s=l(o),s&&(s.c(),s.m(e.parentNode,e)))},d(o){s.d(o),o&&y(e)}}}function rl(t){let e,n,l;return{c(){var s,o,i,c;e=w("i"),m(e,"class",n="iconfont icon-"+((o=(s=q==null?void 0:q[t[5].fileType])==null?void 0:s.icon)!=null?o:Fe.icon)+" svelte-1yk83nc"),m(e,"style",l=(i=q==null?void 0:q[t[5].fileType])!=null&&i.color?`color:${(c=q==null?void 0:q[t[5].fileType])==null?void 0:c.color}`:"")},m(s,o){b(s,e,o)},p(s,o){var i,c,f,r;o[0]&32&&n!==(n="iconfont icon-"+((c=(i=q==null?void 0:q[s[5].fileType])==null?void 0:i.icon)!=null?c:Fe.icon)+" svelte-1yk83nc")&&m(e,"class",n),o[0]&32&&l!==(l=(f=q==null?void 0:q[s[5].fileType])!=null&&f.color?`color:${(r=q==null?void 0:q[s[5].fileType])==null?void 0:r.color}`:"")&&m(e,"style",l)},d(s){s&&y(e)}}}function al(t){let e;return{c(){e=w("i"),m(e,"class","iconfont icon-folder-fill svelte-1yk83nc")},m(n,l){b(n,e,l)},p:Me,d(n){n&&y(e)}}}function gt(t){let e,n,l,s=t[5].modify+"",o,i,c,f,r,a=t[5].created+"",g,_,v=t[5].type==="file"&&kt(t);return{c(){e=w("div"),n=w("class"),l=G("Modififaction Time:"),o=G(s),i=j(),v&&v.c(),c=j(),f=w("div"),r=G("Created Time:"),g=G(a),m(n,"class","item svelte-1yk83nc"),m(f,"class","item svelte-1yk83nc"),m(e,"class","others svelte-1yk83nc"),m(e,"style",_=`width:${t[1]-40}px`)},m(d,k){b(d,e,k),p(e,n),p(n,l),p(n,o),p(e,i),v&&v.m(e,null),p(e,c),p(e,f),p(f,r),p(f,g)},p(d,k){k[0]&32&&s!==(s=d[5].modify+"")&&ne(o,s),d[5].type==="file"?v?v.p(d,k):(v=kt(d),v.c(),v.m(e,c)):v&&(v.d(1),v=null),k[0]&32&&a!==(a=d[5].created+"")&&ne(g,a),k[0]&2&&_!==(_=`width:${d[1]-40}px`)&&m(e,"style",_)},d(d){d&&y(e),v&&v.d()}}}function kt(t){let e,n,l=t[5].size+"",s;return{c(){e=w("div"),n=G("Size:"),s=G(l),m(e,"class","item svelte-1yk83nc")},m(o,i){b(o,e,i),p(e,n),p(e,s)},p(o,i){i[0]&32&&l!==(l=o[5].size+"")&&ne(s,l)},d(o){o&&y(e)}}}function wt(t){let e,n,l=t[5].type+"",s,o,i,c=t[5].type==="file"&&bt(t);return{c(){e=w("div"),n=G("Selected 1 "),s=G(l),o=j(),c&&c.c(),i=nt(),m(e,"class","info svelte-1yk83nc")},m(f,r){b(f,e,r),p(e,n),p(e,s),b(f,o,r),c&&c.m(f,r),b(f,i,r)},p(f,r){r[0]&32&&l!==(l=f[5].type+"")&&ne(s,l),f[5].type==="file"?c?c.p(f,r):(c=bt(f),c.c(),c.m(i.parentNode,i)):c&&(c.d(1),c=null)},d(f){f&&y(e),f&&y(o),c&&c.d(f),f&&y(i)}}}function bt(t){let e,n=t[5].size+"",l;return{c(){e=w("div"),l=G(n),m(e,"class","info svelte-1yk83nc")},m(s,o){b(s,e,o),p(e,l)},p(s,o){o[0]&32&&n!==(n=s[5].size+"")&&ne(l,n)},d(s){s&&y(e)}}}function ul(t){let e,n,l,s,o,i,c,f,r,a,g,_,v,d,k,W,S,z,N,A,V,X,C,$,h,D=t[0].length+"",E,Y,K,F,se,ie=t[8],P=[];for(let M=0;MName 4 | Modififaction Time 5 | Type 6 | Size`,i=j(),c=w("tbody");for(let M=0;MWe(n,"pathNavLoading",S)),n.$on("refresh",t[62]),n.$on("changeNav",t[23]),n.$on("FileMenuClick",t[26]);function N(h){t[69](h)}let A={x:t[17],y:t[18],$$slots:{default:[bl]},$$scope:{ctx:t}};t[19]!==void 0&&(A.show=t[19]),i=new xe({props:A}),Se.push(()=>We(i,"show",N));function V(h){t[74](h)}let X={x:t[14],y:t[15],$$slots:{default:[Al]},$$scope:{ctx:t}};t[16]!==void 0&&(X.show=t[16]),r=new xe({props:X}),Se.push(()=>We(r,"show",V));function C(h){t[80](h)}let $={x:t[12],y:t[13],$$slots:{default:[Il]},$$scope:{ctx:t}};return t[11]!==void 0&&($.show=t[11]),_=new xe({props:$}),Se.push(()=>We(_,"show",C)),{c(){e=j(),I(n.$$.fragment),s=j(),o=w("div"),I(i.$$.fragment),f=j(),I(r.$$.fragment),g=j(),I(_.$$.fragment),m(o,"class","contentmenus")},m(h,D){b(h,e,D),T(n,h,D),b(h,s,D),b(h,o,D),T(i,o,null),p(o,f),T(r,o,null),p(o,g),T(_,o,null),d=!0,k||(W=[Z(window,"hashchange",t[27]),Z(document.body,"contextmenu",be(t[45])),Z(document.body,"keyup",be(t[30])),Z(document.body,"keyup",be(t[33])),Z(document.body,"blur",t[21]),Z(document.body,"mouseup",t[21]),Z(document.body,"mousemove",t[20])],k=!0)},p(h,D){const E={};D[0]&512&&(E.pathSteps=h[9]),D[0]&1047999|D[2]&134217728&&(E.$$scope={dirty:D,ctx:h}),!l&&D[0]&64&&(l=!0,E.pathNavLoading=h[6],Be(()=>l=!1)),n.$set(E);const Y={};D[0]&131072&&(Y.x=h[17]),D[0]&262144&&(Y.y=h[18]),D[0]&524320|D[2]&134217728&&(Y.$$scope={dirty:D,ctx:h}),!c&&D[0]&524288&&(c=!0,Y.show=h[19],Be(()=>c=!1)),i.$set(Y);const K={};D[0]&16384&&(K.x=h[14]),D[0]&32768&&(K.y=h[15]),D[0]&65536|D[2]&134217728&&(K.$$scope={dirty:D,ctx:h}),!a&&D[0]&65536&&(a=!0,K.show=h[16],Be(()=>a=!1)),r.$set(K);const F={};D[0]&4096&&(F.x=h[12]),D[0]&8192&&(F.y=h[13]),D[0]&3072|D[2]&134217728&&(F.$$scope={dirty:D,ctx:h}),!v&&D[0]&2048&&(v=!0,F.show=h[11],Be(()=>v=!1)),_.$set(F)},i(h){d||(H(n.$$.fragment,h),H(i.$$.fragment,h),H(r.$$.fragment,h),H(_.$$.fragment,h),d=!0)},o(h){O(n.$$.fragment,h),O(i.$$.fragment,h),O(r.$$.fragment,h),O(_.$$.fragment,h),d=!1},d(h){h&&y(e),R(n,h),h&&y(s),h&&y(o),R(i),R(r),R(_),k=!1,Xe(W)}}}let yt,St;function Rl(t,e,n){let l,s,o,i,c,f,r,a,g,_,v,d,k;ae(t,he,u=>n(10,i=u));let{params:W={wild:""}}=e;const S=u=>Mn(u).format("YYYY/MM/DD HH:mm");let z=278,N=0,A=!1,V;const X=u=>{if(A){const J=u.pageX-N;n(4,V.style.width=`${z-J}px`,V)}},C=()=>{var u;n(3,A=!1),n(1,z=(u=V.clientWidth)!=null?u:278)};let $=[],h=null;const D=u=>{let J=location.hash.replace("#/","/");u.name[0]==="/"?J+=u.name:J+="/"+u.name,Ee(J).then(()=>{Y()})};let E=!1;const Y=()=>{clearTimeout(yt),clearTimeout(St),n(6,E=!0),yt=setTimeout(()=>{n(0,$=[]),Xn(K()).then(u=>{n(0,$=u.map(J=>{var pe;if(J.type==="folder")return{type:"folder",name:J.name,modify:S(J.mtime),created:S(J.ctime)};{const Qe=J.name.split(".");return{type:"file",name:J.name,modify:S(J.mtime),created:S(J.ctime),size:J.size,fileType:(pe=Pe==null?void 0:Pe[Qe.at(-1).toLowerCase()])!=null?pe:Pn,download:`${K()}/${J.name}`}}}))}).catch(u=>{console.log(u),Ct()}).finally(()=>{St=setTimeout(()=>{n(6,E=!1)},2e3)})},300)};Sn(()=>{Y()});const K=(u=!1)=>{const J=location.hash.replace("#/folder","/");return(u?decodeURIComponent(J):J).replace("//","/")},F=async()=>{if(i.fromPath===K()){Q(he,i=null,i),Y();return}const u=Je(i.fromPath+"/"+i.itemValue.name),J=Je(K(!0)+"/"+i.itemValue.name),[pe,Qe]=await ze(qn(u,J,i.itemValue.type));if(!Qe&&pe)Q(he,i=null,i),Y();else if(pe)alert(Qe);else return},se=async u=>{if(u==="mkdir"){const[J,pe]=await ze(Jn(K()));Oe(J,pe,Y)}else if(u==="upload"){const[J,pe]=await ze(Wn(K()));Oe(J,pe,Y)}else u==="paste"&&await F()},ie=async u=>{const{type:J}=u.detail;await se(J)},P=async()=>{Y()},oe=u=>K()===(i==null?void 0:i.fromPath)&&(i==null?void 0:i.itemValue.name)===u.name,x=async()=>{if(h.type==="file"){const[u,J]=await ze(Gn(Je(K()+"/"+h.name),h.name));oe(h)&&Q(he,i=null,i),Oe(u,J,Y)}},ke=async()=>{if(h.type==="folder"){const[u,J]=await ze(On(Je(K()+"/"+h.name),h.name));oe(h)&&Q(he,i=null,i),Oe(u,J,Y)}},Ne=async u=>{u.shiftKey&&u.key===Re.Delete&&h&&(await x(),await ke())},re=async()=>{if(h){const[u,J]=await ze(Bn(Je(K()+"/"+h.name),h.name,h.type));Oe(u,J,Y)}},te=()=>h&&he.set({fromPath:K(),itemValue:h}),Ke=async u=>{if(u.ctrlKey){if(u.key===Re.X)return te();if(u.key===Re.V)return await F()}},[we,ce,U]=Te("file");ae(t,we,u=>n(17,v=u)),ae(t,ce,u=>n(18,d=u)),ae(t,U,u=>n(19,k=u));const[ee,M,L]=Te("folder");ae(t,ee,u=>n(14,a=u)),ae(t,M,u=>n(15,g=u)),ae(t,L,u=>n(16,_=u));const[B,me,de]=Te("system");ae(t,B,u=>n(12,f=u)),ae(t,me,u=>n(13,r=u)),ae(t,de,u=>n(11,c=u));function Ot(u){De.call(this,t,u)}function Jt(u){De.call(this,t,u)}const Wt=u=>{h===u&&D(u)},Bt=(u,J)=>{n(5,h=u),Q(ee,a=J.clientX,a),Q(M,g=J.clientY,g)},qt=()=>{_e(),Q(L,_=!0,_)},Zt=u=>{n(5,h=u),_e()},Kt=u=>D(u),Qt=u=>{h===u&&Ue(u.download,u.name)},It=(u,J)=>{n(5,h=u),Q(we,v=J.clientX,v),Q(ce,d=J.clientY,d)},Tt=()=>{_e(),Q(U,k=!0,k)},Rt=u=>{n(5,h=u),_e()},Lt=u=>Ue(u.download,u.name),Ft=()=>{_e(),n(5,h=null)},Yt=u=>{_e(),n(5,h=null),Q(de,c=!0,c),Q(B,f=u.clientX,f),Q(me,r=u.clientY,r)},Ut=u=>{n(1,z=V.clientWidth),n(3,A=!0),n(2,N=u.pageX)};function Pt(u){Se[u?"unshift":"push"](()=>{V=u,n(4,V)})}const xt=()=>{_e()};function Et(u){E=u,n(6,E)}const en=()=>{Q(he,i=null,i),Y()},tn=()=>Q(U,k=!1,k),nn=()=>Q(U,k=!1,k),ln=()=>Q(U,k=!1,k),on=()=>{h&&h.type==="file"&&Ue(h.download,h.name)},sn=()=>Q(U,k=!1,k),cn=()=>Q(U,k=!1,k);function fn(u){k=u,U.set(k)}const rn=()=>Q(L,_=!1,_),an=()=>Q(L,_=!1,_),un=()=>Q(L,_=!1,_),mn=()=>Q(L,_=!1,_);function dn(u){_=u,L.set(_)}const pn=()=>se("upload").then(()=>Q(de,c=!1,c)),hn=()=>se("mkdir").then(()=>Q(de,c=!1,c)),_n=async()=>{await se("paste"),Q(de,c=!1,c)},vn=()=>{Y(),Q(he,i=null,i),Q(de,c=!1,c)},$n=()=>{Q(de,c=!1,c)};function gn(u){c=u,de.set(c)}return t.$$set=u=>{"params"in u&&n(43,W=u.params)},t.$$.update=()=>{t.$$.dirty[1]&4096&&n(9,l=W.wild.split("/").filter(u=>!!u)),t.$$.dirty[0]&1&&n(8,s=$.filter(u=>u.type==="folder")),t.$$.dirty[0]&1&&n(7,o=$.filter(u=>u.type==="file"))},[$,z,N,A,V,h,E,o,s,l,i,c,f,r,a,g,_,v,d,k,X,C,D,Y,K,se,ie,P,x,ke,Ne,re,te,Ke,we,ce,U,ee,M,L,B,me,de,W,Ot,Jt,Wt,Bt,qt,Zt,Kt,Qt,It,Tt,Rt,Lt,Ft,Yt,Ut,Pt,xt,Et,en,tn,nn,ln,on,sn,cn,fn,rn,an,un,mn,dn,pn,hn,_n,vn,$n,gn]}class Mt extends ve{constructor(e){super();$e(this,e,Rl,Tl,ge,{params:43},null,[-1,-1,-1])}}function Ll(t){return Cn("/folder"),[]}class Fl extends ve{constructor(e){super();$e(this,e,Ll,null,ge,{})}}function Yl(t){let e=t[1]()+"",n;return{c(){n=G(e)},m(l,s){b(l,n,s)},p:Me,d(l){l&&y(n)}}}function Ul(t){let e;return{c(){e=w("div"),m(e,"slot","tabs"),m(e,"class","tabs")},m(n,l){b(n,e,l)},d(n){n&&y(e)}}}function Pl(t){let e,n;return e=new Gt({props:{showNavRefresh:!1,pathSteps:t[0],navRootIcon:"icon-download",navRootIconColor:"#4478d2",navRootPath:"download",$$slots:{tabs:[Ul],default:[Yl]},$$scope:{ctx:t}}}),{c(){I(e.$$.fragment)},m(l,s){T(e,l,s),n=!0},p(l,[s]){const o={};s&1&&(o.pathSteps=l[0]),s&8&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){n||(H(e.$$.fragment,l),n=!0)},o(l){O(e.$$.fragment,l),n=!1},d(l){R(e,l)}}}function xl(t,e,n){let l;const s=()=>location.hash.replace("#/download",""),o=()=>s().slice(1);return n(0,l=s().replace("#/","/").split("/").filter(i=>!!i)),[l,o]}class El extends ve{constructor(e){super();$e(this,e,xl,Pl,ge,{})}}var eo={"/Download/*":El,"/folder":Mt,"/folder/*":Mt,"*":Fl};function to(t){let e,n;return e=new Nn({props:{routes:eo}}),{c(){I(e.$$.fragment)},m(l,s){T(e,l,s),n=!0},p:Me,i(l){n||(H(e.$$.fragment,l),n=!0)},o(l){O(e.$$.fragment,l),n=!1},d(l){R(e,l)}}}class no extends ve{constructor(e){super();$e(this,e,null,to,ge,{})}}new no({target:document.getElementById("app")});export{lo as __vite_legacy_guard}; 7 | -------------------------------------------------------------------------------- /static/assets/polyfills-legacy.4af1746d.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},r=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),n={},o=function(t){try{return!!t()}catch(e){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=a,c=Function.prototype.call,f=u?c.bind(c):function(){return c.apply(c,arguments)},s={},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p=h&&!l.call({1:2},1);s.f=p?function(t){var e=h(this,t);return!!e&&e.enumerable}:l;var v,d,g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},y=a,m=Function.prototype,b=m.bind,w=m.call,x=y&&b.bind(w,w),E=y?function(t){return t&&x(t)}:function(t){return t&&function(){return w.apply(t,arguments)}},S=E,O=S({}.toString),j=S("".slice),I=function(t){return j(O(t),8,-1)},P=E,T=o,L=I,A=r.Object,R=P("".split),k=T((function(){return!A("z").propertyIsEnumerable(0)}))?function(t){return"String"==L(t)?R(t,""):A(t)}:A,_=r.TypeError,N=function(t){if(null==t)throw _("Can't call method on "+t);return t},M=k,F=N,C=function(t){return M(F(t))},D=function(t){return"function"==typeof t},G=D,z=function(t){return"object"==typeof t?null!==t:G(t)},U=r,$=D,W=function(t){return $(t)?t:void 0},B=function(t,e){return arguments.length<2?W(U[t]):U[t]&&U[t][e]},V=E({}.isPrototypeOf),Y=B("navigator","userAgent")||"",q=r,K=Y,J=q.process,H=q.Deno,X=J&&J.versions||H&&H.version,Q=X&&X.v8;Q&&(d=(v=Q.split("."))[0]>0&&v[0]<4?1:+(v[0]+v[1])),!d&&K&&(!(v=K.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=K.match(/Chrome\/(\d+)/))&&(d=+v[1]);var Z=d,tt=Z,et=o,rt=!!Object.getOwnPropertySymbols&&!et((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&tt&&tt<41})),nt=rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ot=B,it=D,at=V,ut=nt,ct=r.Object,ft=ut?function(t){return"symbol"==typeof t}:function(t){var e=ot("Symbol");return it(e)&&at(e.prototype,ct(t))},st=r.String,lt=function(t){try{return st(t)}catch(e){return"Object"}},ht=D,pt=lt,vt=r.TypeError,dt=function(t){if(ht(t))return t;throw vt(pt(t)+" is not a function")},gt=dt,yt=function(t,e){var r=t[e];return null==r?void 0:gt(r)},mt=f,bt=D,wt=z,xt=r.TypeError,Et={exports:{}},St=r,Ot=Object.defineProperty,jt=function(t,e){try{Ot(St,t,{value:e,configurable:!0,writable:!0})}catch(r){St[t]=e}return e},It=jt,Pt="__core-js_shared__",Tt=r[Pt]||It(Pt,{}),Lt=Tt;(Et.exports=function(t,e){return Lt[t]||(Lt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.21.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var At=N,Rt=r.Object,kt=function(t){return Rt(At(t))},_t=kt,Nt=E({}.hasOwnProperty),Mt=Object.hasOwn||function(t,e){return Nt(_t(t),e)},Ft=E,Ct=0,Dt=Math.random(),Gt=Ft(1..toString),zt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Gt(++Ct+Dt,36)},Ut=r,$t=Et.exports,Wt=Mt,Bt=zt,Vt=rt,Yt=nt,qt=$t("wks"),Kt=Ut.Symbol,Jt=Kt&&Kt.for,Ht=Yt?Kt:Kt&&Kt.withoutSetter||Bt,Xt=function(t){if(!Wt(qt,t)||!Vt&&"string"!=typeof qt[t]){var e="Symbol."+t;Vt&&Wt(Kt,t)?qt[t]=Kt[t]:qt[t]=Yt&&Jt?Jt(e):Ht(e)}return qt[t]},Qt=f,Zt=z,te=ft,ee=yt,re=function(t,e){var r,n;if("string"===e&&bt(r=t.toString)&&!wt(n=mt(r,t)))return n;if(bt(r=t.valueOf)&&!wt(n=mt(r,t)))return n;if("string"!==e&&bt(r=t.toString)&&!wt(n=mt(r,t)))return n;throw xt("Can't convert object to primitive value")},ne=Xt,oe=r.TypeError,ie=ne("toPrimitive"),ae=function(t,e){if(!Zt(t)||te(t))return t;var r,n=ee(t,ie);if(n){if(void 0===e&&(e="default"),r=Qt(n,t,e),!Zt(r)||te(r))return r;throw oe("Can't convert object to primitive value")}return void 0===e&&(e="number"),re(t,e)},ue=ae,ce=ft,fe=function(t){var e=ue(t,"string");return ce(e)?e:e+""},se=z,le=r.document,he=se(le)&&se(le.createElement),pe=function(t){return he?le.createElement(t):{}},ve=pe,de=!i&&!o((function(){return 7!=Object.defineProperty(ve("div"),"a",{get:function(){return 7}}).a})),ge=i,ye=f,me=s,be=g,we=C,xe=fe,Ee=Mt,Se=de,Oe=Object.getOwnPropertyDescriptor;n.f=ge?Oe:function(t,e){if(t=we(t),e=xe(e),Se)try{return Oe(t,e)}catch(r){}if(Ee(t,e))return be(!ye(me.f,t,e),t[e])};var je={},Ie=i&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pe=r,Te=z,Le=Pe.String,Ae=Pe.TypeError,Re=function(t){if(Te(t))return t;throw Ae(Le(t)+" is not an object")},ke=i,_e=de,Ne=Ie,Me=Re,Fe=fe,Ce=r.TypeError,De=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,ze="enumerable",Ue="configurable",$e="writable";je.f=ke?Ne?function(t,e,r){if(Me(t),e=Fe(e),Me(r),"function"==typeof t&&"prototype"===e&&"value"in r&&$e in r&&!r.writable){var n=Ge(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:Ue in r?r.configurable:n.configurable,enumerable:ze in r?r.enumerable:n.enumerable,writable:!1})}return De(t,e,r)}:De:function(t,e,r){if(Me(t),e=Fe(e),Me(r),_e)try{return De(t,e,r)}catch(n){}if("get"in r||"set"in r)throw Ce("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var We=je,Be=g,Ve=i?function(t,e,r){return We.f(t,e,Be(1,r))}:function(t,e,r){return t[e]=r,t},Ye={exports:{}},qe=D,Ke=Tt,Je=E(Function.toString);qe(Ke.inspectSource)||(Ke.inspectSource=function(t){return Je(t)});var He,Xe,Qe,Ze=Ke.inspectSource,tr=D,er=Ze,rr=r.WeakMap,nr=tr(rr)&&/native code/.test(er(rr)),or=Et.exports,ir=zt,ar=or("keys"),ur=function(t){return ar[t]||(ar[t]=ir(t))},cr={},fr=nr,sr=r,lr=E,hr=z,pr=Ve,vr=Mt,dr=Tt,gr=ur,yr=cr,mr="Object already initialized",br=sr.TypeError,wr=sr.WeakMap;if(fr||dr.state){var xr=dr.state||(dr.state=new wr),Er=lr(xr.get),Sr=lr(xr.has),Or=lr(xr.set);He=function(t,e){if(Sr(xr,t))throw new br(mr);return e.facade=t,Or(xr,t,e),e},Xe=function(t){return Er(xr,t)||{}},Qe=function(t){return Sr(xr,t)}}else{var jr=gr("state");yr[jr]=!0,He=function(t,e){if(vr(t,jr))throw new br(mr);return e.facade=t,pr(t,jr,e),e},Xe=function(t){return vr(t,jr)?t[jr]:{}},Qe=function(t){return vr(t,jr)}}var Ir={set:He,get:Xe,has:Qe,enforce:function(t){return Qe(t)?Xe(t):He(t,{})},getterFor:function(t){return function(e){var r;if(!hr(e)||(r=Xe(e)).type!==t)throw br("Incompatible receiver, "+t+" required");return r}}},Pr=i,Tr=Mt,Lr=Function.prototype,Ar=Pr&&Object.getOwnPropertyDescriptor,Rr=Tr(Lr,"name"),kr={EXISTS:Rr,PROPER:Rr&&"something"===function(){}.name,CONFIGURABLE:Rr&&(!Pr||Pr&&Ar(Lr,"name").configurable)},_r=r,Nr=D,Mr=Mt,Fr=Ve,Cr=jt,Dr=Ze,Gr=kr.CONFIGURABLE,zr=Ir.get,Ur=Ir.enforce,$r=String(String).split("String");(Ye.exports=function(t,e,r,n){var o,i=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet,c=n&&void 0!==n.name?n.name:e;Nr(r)&&("Symbol("===String(c).slice(0,7)&&(c="["+String(c).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Mr(r,"name")||Gr&&r.name!==c)&&Fr(r,"name",c),(o=Ur(r)).source||(o.source=$r.join("string"==typeof c?c:""))),t!==_r?(i?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=r:Fr(t,e,r)):a?t[e]=r:Cr(e,r)})(Function.prototype,"toString",(function(){return Nr(this)&&zr(this).source||Dr(this)}));var Wr={},Br=Math.ceil,Vr=Math.floor,Yr=function(t){var e=+t;return e!=e||0===e?0:(e>0?Vr:Br)(e)},qr=Yr,Kr=Math.max,Jr=Math.min,Hr=function(t,e){var r=qr(t);return r<0?Kr(r+e,0):Jr(r,e)},Xr=Yr,Qr=Math.min,Zr=function(t){return t>0?Qr(Xr(t),9007199254740991):0},tn=Zr,en=function(t){return tn(t.length)},rn=C,nn=Hr,on=en,an=function(t){return function(e,r,n){var o,i=rn(e),a=on(i),u=nn(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},un={includes:an(!0),indexOf:an(!1)},cn=Mt,fn=C,sn=un.indexOf,ln=cr,hn=E([].push),pn=function(t,e){var r,n=fn(t),o=0,i=[];for(r in n)!cn(ln,r)&&cn(n,r)&&hn(i,r);for(;e.length>o;)cn(n,r=e[o++])&&(~sn(i,r)||hn(i,r));return i},vn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dn=pn,gn=vn.concat("length","prototype");Wr.f=Object.getOwnPropertyNames||function(t){return dn(t,gn)};var yn={};yn.f=Object.getOwnPropertySymbols;var mn=B,bn=Wr,wn=yn,xn=Re,En=E([].concat),Sn=mn("Reflect","ownKeys")||function(t){var e=bn.f(xn(t)),r=wn.f;return r?En(e,r(t)):e},On=Mt,jn=Sn,In=n,Pn=je,Tn=function(t,e,r){for(var n=jn(e),o=Pn.f,i=In.f,a=0;ai;i++)if((u=g(t[i]))&&ni(fi,u))return u;return new ci(!1)}n=oi(t,o)}for(c=n.next;!(f=Qo(c,n)).done;){try{u=g(f.value)}catch(y){ai(n,"throw",y)}if("object"==typeof u&&u&&ni(fi,u))return u}return new ci(!1)},li=Xt("iterator"),hi=!1;try{var pi=0,vi={next:function(){return{done:!!pi++}},return:function(){hi=!0}};vi[li]=function(){return this},Array.from(vi,(function(){throw 2}))}catch(Hx){}var di=function(t,e){if(!e&&!hi)return!1;var r=!1;try{var n={};n[li]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(Hx){}return r},gi=E,yi=o,mi=D,bi=No,wi=Ze,xi=function(){},Ei=[],Si=B("Reflect","construct"),Oi=/^\s*(?:class|function)\b/,ji=gi(Oi.exec),Ii=!Oi.exec(xi),Pi=function(t){if(!mi(t))return!1;try{return Si(xi,Ei,t),!0}catch(Hx){return!1}},Ti=function(t){if(!mi(t))return!1;switch(bi(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ii||!!ji(Oi,wi(t))}catch(Hx){return!0}};Ti.sham=!0;var Li,Ai,Ri,ki,_i=!Si||yi((function(){var t;return Pi(Pi.call)||!Pi(Object)||!Pi((function(){t=!0}))||t}))?Ti:Pi,Ni=_i,Mi=lt,Fi=r.TypeError,Ci=function(t){if(Ni(t))return t;throw Fi(Mi(t)+" is not a constructor")},Di=Re,Gi=Ci,zi=Xt("species"),Ui=function(t,e){var r,n=Di(t).constructor;return void 0===n||null==(r=Di(n)[zi])?e:Gi(r)},$i=a,Wi=Function.prototype,Bi=Wi.apply,Vi=Wi.call,Yi="object"==typeof Reflect&&Reflect.apply||($i?Vi.bind(Bi):function(){return Vi.apply(Bi,arguments)}),qi=B("document","documentElement"),Ki=E([].slice),Ji=r.TypeError,Hi=/(?:ipad|iphone|ipod).*applewebkit/i.test(Y),Xi="process"==I(r.process),Qi=r,Zi=Yi,ta=bo,ea=D,ra=Mt,na=o,oa=qi,ia=Ki,aa=pe,ua=function(t,e){if(t=51&&/native code/.test(t))return!1;var r=new Ku((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[$u]=n,!(oc=r.then((function(){}))instanceof n)||!e&&Gu&&!rc})),ac=ic||!Tu((function(t){Ku.all(t).catch((function(){}))})),uc=function(t){var e;return!(!Ou(t)||!Su(e=t.then))&&e},cc=function(t,e){var r,n,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,c=t.resolve,f=t.reject,s=t.domain;try{u?(a||(2===e.rejection&&pc(e),e.rejection=1),!0===u?r=i:(s&&s.enter(),r=u(i),s&&(s.exit(),o=!0)),r===t.promise?f(Hu("Promise-chain cycle")):(n=uc(r))?du(n,r,c,f):c(r)):f(i)}catch(Hx){s&&!o&&s.exit(),f(Hx)}},fc=function(t,e){t.notified||(t.notified=!0,Ru((function(){for(var r,n=t.reactions;r=n.get();)cc(r,t);t.notified=!1,e&&!t.rejection&&lc(t)})))},sc=function(t,e,r){var n,o;ec?((n=Xu.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),pu.dispatchEvent(n)):n={promise:e,reason:r},!rc&&(o=pu["on"+t])?o(n):t===nc&&_u("Unhandled promise rejection",r)},lc=function(t){du(Au,pu,(function(){var e,r=t.facade,n=t.value;if(hc(t)&&(e=Mu((function(){zu?Qu.emit("unhandledRejection",n,r):sc(nc,r,n)})),t.rejection=zu||hc(t)?2:1,e.error))throw e.value}))},hc=function(t){return 1!==t.rejection&&!t.parent},pc=function(t){du(Au,pu,(function(){var e=t.facade;zu?Qu.emit("rejectionHandled",e):sc("rejectionhandled",e,t.value)}))},vc=function(t,e,r){return function(n){t(e,n,r)}},dc=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,fc(t,!0))},gc=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw Hu("Promise can't be resolved itself");var n=uc(e);n?Ru((function(){var r={done:!1};try{du(n,e,vc(gc,r,t),vc(dc,r,t))}catch(Hx){dc(r,Hx,t)}})):(t.value=e,t.state=1,fc(t,!1))}catch(Hx){dc({done:!1},Hx,t)}}};if(ic&&(Ju=(Ku=function(t){ju(this,Ju),Eu(t),du(au,this);var e=Bu(this);try{t(vc(gc,e),vc(dc,e))}catch(Hx){dc(e,Hx)}}).prototype,(au=function(t){Vu(this,{type:Wu,done:!1,notified:!1,parent:!1,reactions:new Fu,rejection:!1,state:0,value:void 0})}).prototype=mu(Ju,{then:function(t,e){var r=Yu(this),n=Zu(Lu(this,Ku));return r.parent=!0,n.ok=!Su(t)||t,n.fail=Su(e)&&e,n.domain=zu?Qu.domain:void 0,0==r.state?r.reactions.add(n):Ru((function(){cc(n,r)})),n.promise},catch:function(t){return this.then(void 0,t)}}),uu=function(){var t=new au,e=Bu(t);this.promise=t,this.resolve=vc(gc,e),this.reject=vc(dc,e)},Nu.f=Zu=function(t){return t===Ku||t===cu?new uu(t):tc(t)},Su(gu)&&qu!==Object.prototype)){fu=qu.then,oc||(yu(qu,"then",(function(t,e){var r=this;return new Ku((function(t,e){du(fu,r,t,e)})).then(t,e)}),{unsafe:!0}),yu(qu,"catch",Ju.catch,{unsafe:!0}));try{delete qu.constructor}catch(Hx){}bu&&bu(qu,Ju)}hu({global:!0,wrap:!0,forced:ic},{Promise:Ku}),wu(Ku,Wu,!1),xu(Wu),cu=vu(Wu),hu({target:Wu,stat:!0,forced:ic},{reject:function(t){var e=Zu(this);return du(e.reject,void 0,t),e.promise}}),hu({target:Wu,stat:!0,forced:ic},{resolve:function(t){return ku(this,t)}}),hu({target:Wu,stat:!0,forced:ac},{all:function(t){var e=this,r=Zu(e),n=r.resolve,o=r.reject,i=Mu((function(){var r=Eu(e.resolve),i=[],a=0,u=1;Pu(t,(function(t){var c=a++,f=!1;u++,du(r,e,t).then((function(t){f||(f=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=Zu(e),n=r.reject,o=Mu((function(){var o=Eu(e.resolve);Pu(t,(function(t){du(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var yc={},mc=pn,bc=vn,wc=Object.keys||function(t){return mc(t,bc)},xc=i,Ec=Ie,Sc=je,Oc=Re,jc=C,Ic=wc;yc.f=xc&&!Ec?Object.defineProperties:function(t,e){Oc(t);for(var r,n=jc(e),o=Ic(e),i=o.length,a=0;i>a;)Sc.f(t,r=o[a++],n[r]);return t};var Pc,Tc=Re,Lc=yc,Ac=vn,Rc=cr,kc=qi,_c=pe,Nc=ur("IE_PROTO"),Mc=function(){},Fc=function(t){return" 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /static/screenshot/ffserver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimCyan/ffserver/36108dd8964464a67c64b0acc491b4eb40d34872/static/screenshot/ffserver.png -------------------------------------------------------------------------------- /static/screenshot/ipadmini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DimCyan/ffserver/36108dd8964464a67c64b0acc491b4eb40d34872/static/screenshot/ipadmini.png --------------------------------------------------------------------------------