diff --git a/.gitignore b/.gitignore index 9777e68..0dbc9a9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ dist/ downloads/ eggs/ .eggs/ -lib/ +#lib/ lib64/ parts/ sdist/ @@ -159,5 +159,5 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ -reference/ +#reference/ test-ext/ diff --git a/.vscode/launch.json b/.vscode/launch.json index f3d4627..06e76d6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "program": "${file}", "console": "integratedTerminal", - "args": "${command:pickArgs} ./test-files/nopw/thecreepingvine-com-20240303-205009-d0gapb.wpress ./test-ext" + "args": "${command:pickArgs} ./test-files/nopw/angieandbryson-com-20240306-012631-47km43.wpress ./test-ext" } ] } \ No newline at end of file diff --git a/encryption b/encryption new file mode 100644 index 0000000..c1caf07 --- /dev/null +++ b/encryption @@ -0,0 +1,136 @@ +/** + * Determines if the server can encrypt backups + * + * @return boolean + */ +function ai1wm_can_encrypt() { + if ( ! function_exists( 'openssl_encrypt' ) ) { + return false; + } + + if ( ! function_exists( 'openssl_random_pseudo_bytes' ) ) { + return false; + } + + if ( ! function_exists( 'openssl_cipher_iv_length' ) ) { + return false; + } + + if ( ! function_exists( 'sha1' ) ) { + return false; + } + + if ( ! in_array( AI1WM_CIPHER_NAME, array_map( 'strtoupper', openssl_get_cipher_methods() ) ) ) { + return false; + } + + return true; +} + +/** + * Determines if the server can decrypt backups + * + * @return boolean + */ +function ai1wm_can_decrypt() { + if ( ! function_exists( 'openssl_decrypt' ) ) { + return false; + } + + if ( ! function_exists( 'openssl_random_pseudo_bytes' ) ) { + return false; + } + + if ( ! function_exists( 'openssl_cipher_iv_length' ) ) { + return false; + } + + if ( ! function_exists( 'sha1' ) ) { + return false; + } + + if ( ! in_array( AI1WM_CIPHER_NAME, array_map( 'strtoupper', openssl_get_cipher_methods() ) ) ) { + return false; + } + + return true; +} + +/** + * Encrypts a string with a key + * + * @param string $string String to encrypt + * @param string $key Key to encrypt the string with + * @return string + * @throws Ai1wm_Not_Encryptable_Exception + */ +function ai1wm_encrypt_string( $string, $key ) { + $iv_length = ai1wm_crypt_iv_length(); + $key = substr( sha1( $key, true ), 0, $iv_length ); + + $iv = openssl_random_pseudo_bytes( $iv_length ); + if ( $iv === false ) { + throw new Ai1wm_Not_Encryptable_Exception( __( 'Unable to generate random bytes.', AI1WM_PLUGIN_NAME ) ); + } + + $encrypted_string = openssl_encrypt( $string, AI1WM_CIPHER_NAME, $key, OPENSSL_RAW_DATA, $iv ); + if ( $encrypted_string === false ) { + throw new Ai1wm_Not_Encryptable_Exception( __( 'Unable to encrypt data.', AI1WM_PLUGIN_NAME ) ); + } + + return sprintf( '%s%s', $iv, $encrypted_string ); +} + +/** + * Returns encrypt/decrypt iv length + * + * @return int + * @throws Ai1wm_Not_Encryptable_Exception + */ +function ai1wm_crypt_iv_length() { + $iv_length = openssl_cipher_iv_length( AI1WM_CIPHER_NAME ); + if ( $iv_length === false ) { + throw new Ai1wm_Not_Encryptable_Exception( __( 'Unable to obtain cipher length.', AI1WM_PLUGIN_NAME ) ); + } + + return $iv_length; +} + +/** + * Decrypts a string with a eky + * + * @param string $encrypted_string String to decrypt + * @param string $key Key to decrypt the string with + * @return string + * @throws Ai1wm_Not_Encryptable_Exception + * @throws Ai1wm_Not_Decryptable_Exception + */ +function ai1wm_decrypt_string( $encrypted_string, $key ) { + $iv_length = ai1wm_crypt_iv_length(); + $key = substr( sha1( $key, true ), 0, $iv_length ); + $iv = substr( $encrypted_string, 0, $iv_length ); + + $decrypted_string = openssl_decrypt( substr( $encrypted_string, $iv_length ), AI1WM_CIPHER_NAME, $key, OPENSSL_RAW_DATA, $iv ); + if ( $decrypted_string === false ) { + throw new Ai1wm_Not_Decryptable_Exception( __( 'Unable to decrypt data.', AI1WM_PLUGIN_NAME ) ); + } + + return $decrypted_string; +} + +/** + * Checks if decryption password is valid + * + * @param string $encrypted_signature + * @param string $password + * @return bool + */ +function ai1wm_is_decryption_password_valid( $encrypted_signature, $password ) { + try { + $encrypted_signature = base64_decode( $encrypted_signature ); + + return ai1wm_decrypt_string( $encrypted_signature, $password ) === AI1WM_SIGN_TEXT; + } catch ( Ai1wm_Not_Decryptable_Exception $exception ) { + return false; + } +} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration.zip b/plugin-file/all-in-one-wp-migration.zip new file mode 100644 index 0000000..7489d22 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration.zip differ diff --git a/plugin-file/all-in-one-wp-migration/LICENSE b/plugin-file/all-in-one-wp-migration/LICENSE new file mode 100644 index 0000000..dcbe5e6 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/LICENSE @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + + Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/all-in-one-wp-migration.php b/plugin-file/all-in-one-wp-migration/all-in-one-wp-migration.php new file mode 100644 index 0000000..973953e --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/all-in-one-wp-migration.php @@ -0,0 +1,75 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +// Check SSL Mode +if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && ( $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) ) { + $_SERVER['HTTPS'] = 'on'; +} + +// Plugin Basename +define( 'AI1WM_PLUGIN_BASENAME', basename( dirname( __FILE__ ) ) . '/' . basename( __FILE__ ) ); + +// Plugin Path +define( 'AI1WM_PATH', dirname( __FILE__ ) ); + +// Plugin URL +define( 'AI1WM_URL', plugins_url( '', AI1WM_PLUGIN_BASENAME ) ); + +// Plugin Storage URL +define( 'AI1WM_STORAGE_URL', plugins_url( 'storage', AI1WM_PLUGIN_BASENAME ) ); + +// Include constants +require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'constants.php'; + +// Include deprecated +require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'deprecated.php'; + +// Include functions +require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'functions.php'; + +// Include exceptions +require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'exceptions.php'; + +// Include loader +require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'loader.php'; + +// ========================================================================= +// = All app initialization is done in Ai1wm_Main_Controller __constructor = +// ========================================================================= +$main_controller = new Ai1wm_Main_Controller(); diff --git a/plugin-file/all-in-one-wp-migration/changelog.txt b/plugin-file/all-in-one-wp-migration/changelog.txt new file mode 100644 index 0000000..aa1f95a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/changelog.txt @@ -0,0 +1,442 @@ += 7.75 = +* Custom backups path on database import step + += 7.74 = +* Resolved an ongoing issue with the compatibility of the plugin with servers running Imunify360. The file "wp-content/plugins/all-in-one-wp-migration/functions.php" was being falsely flagged and deleted due to a detection error. This update includes small changes to the "functions.php" file to modify its checksum and prevent the false flag by Imunify360 +* Imunify360 has updated its signatures, which should prevent this issue from occurring on servers running the updated version. However, this plugin update serves as an additional measure to ensure that the issue is resolved for all users + += 7.73 = +* Better support for PHP 8.1 + += 7.72 = +* Backups time based on selected WordPress time zone + += 7.71 = +* Removed the AI1WM_MAX_FILE_SIZE constant. This constant is no longer necessary + += 7.70 = +* Hooks that allow excluding specific database tables on export + += 7.69 = +* Improved support for custom backups location + += 7.68 = +* Better support for PHP 8.1 + += 7.67 = +* Backups with a modified wp-content path cannot be downloaded + += 7.66 = +* Better support for WordPress v6.0.2 + += 7.65 = +* Improved support for single-letter prefixed databases + += 7.64 = +* Better support for database binary fields + += 7.63 = +* CSRF and XSS issue in the plugin. Thank you, WPScan, for reporting it + += 7.62 = +* Password-protect and encrypt backups + += 7.61 = +* Issue with 7.60 release + += 7.60 = +* What's new page - easy way to get up to speed with the newest features +* List of all the items in a backup file, then select and download archived files +* Support for WordPress v6 + += 7.59 = +* Fix a flaw in which the admin user has the ability to remove files other than backups + += 7.58 = +* Hide the backups count if there are no backups + += 7.57 = +* Improved UX on backups page + += 7.56 = +* Better support for PHP 8.1 + += 7.55 = +* When importing or restoring across various PHP versions, the notice has been improved + += 7.54 = +* Improved YouTube and Twitter buttons + += 7.53 = +* Total number of backups in the plugin menu + += 7.52 = +* Out of disk space when exporting database.sql + += 7.51 = +* Link to YouTube Channel + += 7.50 = +* Improved reliability for scheduling events + += 7.49 = +* Better error handling when making HTTP requests +* Store a list of site files as CSV +* Filter to change the request method + += 7.48 = +* Support for BuddyPress plugin + += 7.47 = +* Improved database migration + += 7.46 = +* Support custom themes directory + += 7.45 = +* Support custom plugins directory + += 7.44 = +* Better support for MySQL <= 5.5 +* Support for BuddyBoss plugin +* Report issue button + += 7.43 = +* Improved reliability + += 7.42 = +* Better support for WooCommerce plugin + += 7.41 = +* Improved free disk space checking +* Improved backup validation +* Improved path replacement on import +* Horizontal scrollbar on MacOS (Backups Page) + += 7.40 = +* Better support for WP Cerber plugin +* Backup page style issues on narrow screens + += 7.39 = +* Remove deprecated jQuery methods + += 5.56 = +* Fix an issue with WP_Hook class introcuded in WP 4.7 + += 5.55 = +* Fix an issue with resolving URL on export/import when using non-blocking streams client + += 5.54 = +* Fix an issue with resolving URL on export/import + += 5.53 = +* Send HTTP basic authorization header on upload (fetch method) +* Add Accept-Encoding, Accept-Charset and Accept-Language on export/import +* Do not replace already replaced values on database import/export +* Set silent mode when activating sidewide plugins +* Replace old media style URLs with the new media style URLs on database import +* Replace user_level and capabilities user meta keys if tables have empty prefix on export +* Create separate action for extracting must-use plugins +* Add option "Do not export must-use plugins" in advanced settings +* Fix an issue with SSL that produces "Unable to resolve URL..." + += 5.52 = +* Simplify the text on import page +* Fix an issue with special characters on export and import +* Fix an issue with export and import of large files + += 5.51 = +* Add support for utf8mb4_unicode_520_ci database collation + += 5.50 = +* Improve database export process +* Simplify export and import cron +* Fix an issue with export and import progress status + += 5.49 = +* Test plugin up to WordPress 4.6 + += 5.48 = +* Improve support for large databases on export +* Add support for Box cloud storage +* Fix an issue with status on export/import +* Fix an issue with asynchronous requests on export/import + += 5.47 = +* Fix an issue with incorrect file size on export + += 5.46 = +* Add "Restore from Backups" video in readme file +* Display message if backups are inaccessible + += 5.45 = +* Fix an issue with blogs.dir path replacement + += 5.44 = +* Add "Do not replace email domain" option in advanced settings +* Add "ai1wm_exclude_content_from_export" WordPress hook on export +* Add HTML5 uploader + += 5.43 = +* Fix an issue when archiving dynamic files on export +* Support custom upload path for multisites +* Add support for various cache plugins + += 5.42 = +* Catch E_PARSE error on mu-plugins import +* Fix an issue with stop export that doesn't clean up the storage directory +* Initialize new cache instead of flushing the existing one on import/export + += 5.41 = +* Fix an issue when replacing serialized values on import +* List files in chunks +* Convert svg images to png +* Check if backups are readable before displaying them on "Backups" page +* Display version incompatibility notification on export/import/restore screen +* Fix double port issue on Bitnami +* Fix an issue on multisite export with cloud extensions + += 5.40 = +* Test plugin up to WordPress 4.5 + += 5.39 = +* Fix a bug in uploads path replacement + += 5.38 = +* Deactivate mu-plugins if fatal error appears on import + += 5.37 = +* Validate the archive before import + += 5.36 = +* Add OneDrive to readme.txt +* Fix a typo on import + += 5.35 = +* Add OneDrive to export/import pages +* Fix a bug when WordPress was used without a db prefix +* Fix a problem when downloading wpress files +* Improve the log system + += 4.19 = +* Fixed an issue with options cache + += 4.18 = +* Fixed an issue with large media files +* Fixed an issue with status file being cached + += 4.17 = +* Set "Tested up to" WordPress 4.4 + += 4.16 = +* Fix an issue with the transport layer on export/import + += 4.15 = +* Fix an issue with resovling mechanism on export/import + += 4.14 = +* Fix an issue with database import + += 4.13 = +* Add new mechanism for resolving HTTP requests + += 4.12 = +* Fix an issue with Google Drive extension + += 4.11 = +* Fix content filters on export + += 4.10 = +* Add HTTPS URL replacement +* Fix an issue when PDO is not available + += 4.6 = +* Fix an issue when the plugin was getting stuck on "Done creating an empty archive" +* Fix an issue when the plugin was getting stuck during import + += 4.3 = +* Add URL extension support +* Filter "mu-plugins" directory if "Do not export plugins (files)" is checked +* Fix utf8mb4 issue +* Fix translation issue + += 4.2 = +* Fix .wpress.bin format + += 4.1 = +* Add port to the host header on export/import +* Rename .wpress file to .wpress.bin file + += 4.0 = +* Fix file permission checks + += 3.9 = +* Fix could not resolve domain name on export/import + += 3.8 = +* Fix undefined method on Backups page if PHP version is < 5.3.6 + += 3.7 = +* Add IPv6 support on export/import + += 3.6 = +* Fixed undefined constant warnings + += 3.5 = +* Exclude core plugin and extensions on export if they have custom names + += 3.4 = +* Made export/import processes more reliable +* Allow the plugin to work with non-default name +* Preserve backups during plugin updates +* Improved find & replace functionality on the serialized data +* Removed backup file name restrictions + += 3.3 = +* Fixed a bug when retrieving export/import status progress +* Fixed a bug when database encoding utf8mb4_unicode_ci is not available + += 3.2.2 = +* Fixed plugin incompatibility during export/import that was reporting that the process could not be started + += 3.2.1 = +* Added username/password settings for WordPress sites behind HTTP basic authentication +* Fixed a bug when exporting/importing without public DNS record +* Fixed a bug when exporting/importing media files + += 3.2.0 = +* Added advanced settings on export page + += 3.1.1 = +* Fixed secret key issue on upgrade of the plugin + += 3.0.0 = +* Added export to File, [Dropbox](https://servmask.com/products/dropbox-extension), [Amazon S3](https://servmask.com/products/amazon-s3-extension), [Google Drive](https://servmask.com/products/google-drive-extension) +* Added import from File, [Dropbox](https://servmask.com/products/dropbox-extension), [Amazon S3](https://servmask.com/products/amazon-s3-extension), [Google Drive](https://servmask.com/products/google-drive-extension) +* Implemented our own archiving format that reduces export and import by a factor of 10 +* One-click export with the new simplified export page +* Improved upload functionality with auto-recognizing chunk size on import +* New **Backups** page for storing all WordPress site exports +* Easy restore WordPress site from **Backups** page +* Monitoring availability of the disk space on the server +* Both export and import happen in time chunks of 3 seconds +* Plugin works behind HTTP basic authentication + += 2.0.4 = +* Updated readme to reflect that the plugin is not multisite compatible + += 2.0.3 = +* Fixed a security issue while importing site using regular users + += 2.0.2 = +* Added support for WordPress v4.0 + += 2.0.1 = +* Fixed a bug when all user permissions are lost on import + += 2.0.0 = +* Added support for migration of WordPress in Network Mode (Multi Site) +* New improved UI and UX +* New improved language translations on the menu items and help texts +* Better error handling and notifications +* Fixed a bug while exporting comments and associated comments meta data +* Fixed a bug while using find/replace functionality +* Fixed a bug with storage directory permissions and search indexation + += 1.9.2 = +* Added PHP <= v5.2.7 compatibility + += 1.9.1 = +* Fixed an issue with earlier versions of PHP + += 1.9.0 = +* New improved design on the export/import page +* Added an option for gathering user experience statistics +* Added a message box with important notifications about the plugin +* Fixed a bug while exporting database with multiple WordPress sites +* Fixed a bug while exporting database with table constraints +* Fixed a bug with auto recognizing zip archiver + += 1.8.1 = +* Added "Get Support" link in the plugin list page +* Removed "All-in-One WP Migration Beta" link from the readme file + += 1.8.0 = +* Added support for dynamically recognizing Site URL and Home URL on the import page +* Fixed a bug when maximum uploaded size is exceeded +* Fixed a bug while exporting big database tables + += 1.7.2 = +* Added support for automatically switching database adapters for better performance and optimization +* Fixed a bug while using host:port syntax with MySQL PDO +* Fixed a bug while using find/replace functionality + += 1.7.1 = +* Fixed a bug while exporting WordPress plugins directory + += 1.7.0 = +* Added storage layer to avoid permission issues with OS's directory used for temporary storage +* Added additional checks to verify the consistency of the imported archive +* Fixed a bug that caused the database to be exported without data +* Removed unused variables from package.json file + += 1.6.0 = +* Added additional check for directory's permissions +* Added additional check for output buffering when exporting a file +* Fixed a bug when the archive was exported or imported with old version of Zlib library +* Fixed a bug with permalinks and flushing the rules + += 1.5.0 = +* Added support for additional errors and exceptions handling +* Added support for reporting a problem in better and easier way +* Improved support process in ZenDesk system for faster response time +* Fixed typos on the import page. Thanks to Terry Heenan + += 1.4.0 = +* Added a Twitter and Facebook share buttons to the sidebar on import and export pages + += 1.3.1 = +* Fixed a bug when the user was unable to import site archive +* Optimized and speeded up import process + += 1.3.0 = +* Added support for mysql connection to happen over sockets or TCP +* Added support for Windows OS and fully tested the plugin on IIS +* Added support for limited memory_limit - 1MB - The plugin now requires only 1MB to operate properly +* Added support for multisite +* Used mysql_unbuffered_query instead of mysql_query to overcome any memory problems +* Fixed a deprecated warning for mysql_pconnect when php 5.5 and above is used +* Fixed memory_limit problem with PCLZIP library +* Fixed a bug when the archive is exported with zero size when using PCLZIP +* Fixed a bug when the archive was exported broken on some servers +* Fixed a deprecated usage of preg_replace \e in php v5.5 and above + += 1.2.1 = +* Fixed an issue when HTTP Error was shown on some hosts after import, credit to Michael Simon +* Fixed an issue when exporting databases with different prefix than wp_, credit to najtrox +* Fixed an issue when PDO is avalable but mysql driver for PDO is not, credit to Jaydesain69 +* Deleted a plugin specific option when uninstalling the plugin (clean after itself) +* Support is done via Zendesk +* Included WP Version and Plugin version in the feedback form + += 1.2.0 = +* Increased upload limit of files from 128MB to 512MB +* Used ZipArchive with fallback to PclZip (a few users notified us that they don't have ZipArchive enabled on their servers) +* Used PDO with fallback to mysql (a few users notified us that they dont have PDO enabled on their servers, mysql is deprecated as of PHP v5.5 but we are supporting PHP v5.2.17) +* Supported PHP v5.2.17 and WordPress v3.3 and above +* Fixed a bug during export that causes plugins to not be exported on some hosts (the problem that you are experiencing) + += 1.1.0 = +* Importing files using chunks to overcome any webserver upload size restriction +* Fixed a bug where HTTP code error was shown to some users + += 1.0.0 = +* Export database as SQL file +* Export media files +* Export themes files +* Export installed plugins +* Unlimited find/replace actions +* Option to exclude spam comments +* Option to apply find/replace to GUIDs +* Option to exclude post revisions +* Option to exclude tables data diff --git a/plugin-file/all-in-one-wp-migration/constants.php b/plugin-file/all-in-one-wp-migration/constants.php new file mode 100644 index 0000000..8ab5886 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/constants.php @@ -0,0 +1,1505 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +// ================ +// = Plugin Debug = +// ================ +define( 'AI1WM_DEBUG', false ); + +// ================== +// = Plugin Version = +// ================== +define( 'AI1WM_VERSION', '7.81' ); + +// =============== +// = Plugin Name = +// =============== +define( 'AI1WM_PLUGIN_NAME', 'all-in-one-wp-migration' ); + +// ================ +// = Storage Path = +// ================ +define( 'AI1WM_STORAGE_PATH', AI1WM_PATH . DIRECTORY_SEPARATOR . 'storage' ); + +// ================== +// = Error Log Path = +// ================== +define( 'AI1WM_ERROR_FILE', AI1WM_STORAGE_PATH . DIRECTORY_SEPARATOR . 'error.log' ); + +// =============== +// = Status Path = +// =============== +define( 'AI1WM_STATUS_FILE', AI1WM_STORAGE_PATH . DIRECTORY_SEPARATOR . 'status.js' ); + +// ============ +// = Lib Path = +// ============ +define( 'AI1WM_LIB_PATH', AI1WM_PATH . DIRECTORY_SEPARATOR . 'lib' ); + +// =================== +// = Controller Path = +// =================== +define( 'AI1WM_CONTROLLER_PATH', AI1WM_LIB_PATH . DIRECTORY_SEPARATOR . 'controller' ); + +// ============== +// = Model Path = +// ============== +define( 'AI1WM_MODEL_PATH', AI1WM_LIB_PATH . DIRECTORY_SEPARATOR . 'model' ); + +// =============== +// = Export Path = +// =============== +define( 'AI1WM_EXPORT_PATH', AI1WM_MODEL_PATH . DIRECTORY_SEPARATOR . 'export' ); + +// =============== +// = Import Path = +// =============== +define( 'AI1WM_IMPORT_PATH', AI1WM_MODEL_PATH . DIRECTORY_SEPARATOR . 'import' ); + +// ============= +// = View Path = +// ============= +define( 'AI1WM_TEMPLATES_PATH', AI1WM_LIB_PATH . DIRECTORY_SEPARATOR . 'view' ); + +// =================== +// = Set Bandar Path = +// =================== +define( 'BANDAR_TEMPLATES_PATH', AI1WM_TEMPLATES_PATH ); + +// =============== +// = Vendor Path = +// =============== +define( 'AI1WM_VENDOR_PATH', AI1WM_LIB_PATH . DIRECTORY_SEPARATOR . 'vendor' ); + +// ========================= +// = ServMask Feedback URL = +// ========================= +define( 'AI1WM_FEEDBACK_URL', 'https://servmask.com/ai1wm/feedback/create' ); + +// ============================== +// = ServMask Archive Tools URL = +// ============================== +define( 'AI1WM_ARCHIVE_TOOLS_URL', 'https://servmask.com/archive/tools' ); + +// ========================= +// = ServMask Table Prefix = +// ========================= +define( 'AI1WM_TABLE_PREFIX', 'SERVMASK_PREFIX_' ); + +// ======================== +// = Archive Backups Name = +// ======================== +define( 'AI1WM_BACKUPS_NAME', 'ai1wm-backups' ); + +// ========================= +// = Archive Database Name = +// ========================= +define( 'AI1WM_DATABASE_NAME', 'database.sql' ); + +// ======================== +// = Archive Package Name = +// ======================== +define( 'AI1WM_PACKAGE_NAME', 'package.json' ); + +// ========================== +// = Archive Multisite Name = +// ========================== +define( 'AI1WM_MULTISITE_NAME', 'multisite.json' ); + +// ====================== +// = Archive Blogs Name = +// ====================== +define( 'AI1WM_BLOGS_NAME', 'blogs.json' ); + +// ========================= +// = Archive Settings Name = +// ========================= +define( 'AI1WM_SETTINGS_NAME', 'settings.json' ); + +// ========================== +// = Archive Multipart Name = +// ========================== +define( 'AI1WM_MULTIPART_NAME', 'multipart.list' ); + +// ============================= +// = Archive Content List Name = +// ============================= +define( 'AI1WM_CONTENT_LIST_NAME', 'content.list' ); + +// =========================== +// = Archive Media List Name = +// =========================== +define( 'AI1WM_MEDIA_LIST_NAME', 'media.list' ); + +// ============================= +// = Archive Plugins List Name = +// ============================= +define( 'AI1WM_PLUGINS_LIST_NAME', 'plugins.list' ); + +// ============================ +// = Archive Themes List Name = +// ============================ +define( 'AI1WM_THEMES_LIST_NAME', 'themes.list' ); + +// ============================ +// = Archive Tables List Name = +// ============================ +define( 'AI1WM_TABLES_LIST_NAME', 'tables.list' ); + +// ================================= +// = Incremental Content List Name = +// ================================= +define( 'AI1WM_INCREMENTAL_CONTENT_LIST_NAME', 'incremental.content.list' ); + +// =============================== +// = Incremental Media List Name = +// =============================== +define( 'AI1WM_INCREMENTAL_MEDIA_LIST_NAME', 'incremental.media.list' ); + +// ================================= +// = Incremental Plugins List Name = +// ================================= +define( 'AI1WM_INCREMENTAL_PLUGINS_LIST_NAME', 'incremental.plugins.list' ); + +// ================================ +// = Incremental Themes List Name = +// ================================ +define( 'AI1WM_INCREMENTAL_THEMES_LIST_NAME', 'incremental.themes.list' ); + +// ================================= +// = Incremental Backups List Name = +// ================================= +define( 'AI1WM_INCREMENTAL_BACKUPS_LIST_NAME', 'incremental.backups.list' ); + +// ============================= +// = Archive Cookies Text Name = +// ============================= +define( 'AI1WM_COOKIES_NAME', 'cookies.txt' ); + +// ================================= +// = Archive Must-Use Plugins Name = +// ================================= +define( 'AI1WM_MUPLUGINS_NAME', 'mu-plugins' ); + +// ============================= +// = Less Cache Extension Name = +// ============================= +define( 'AI1WM_LESS_CACHE_NAME', '.less.cache' ); + +// ============================ +// = Elementor CSS Cache Name = +// ============================ +define( 'AI1WM_ELEMENTOR_CSS_NAME', 'uploads' . DIRECTORY_SEPARATOR . 'elementor' . DIRECTORY_SEPARATOR . 'css' ); + +// ========================= +// = Themes Functions Name = +// ========================= +define( 'AI1WM_THEMES_FUNCTIONS_NAME', 'themes' . DIRECTORY_SEPARATOR . 'functions.php' ); + +// ============================= +// = Endurance Page Cache Name = +// ============================= +define( 'AI1WM_ENDURANCE_PAGE_CACHE_NAME', 'endurance-page-cache.php' ); + +// =========================== +// = Endurance PHP Edge Name = +// =========================== +define( 'AI1WM_ENDURANCE_PHP_EDGE_NAME', 'endurance-php-edge.php' ); + +// ================================ +// = Endurance Browser Cache Name = +// ================================ +define( 'AI1WM_ENDURANCE_BROWSER_CACHE_NAME', 'endurance-browser-cache.php' ); + +// ========================= +// = GD System Plugin Name = +// ========================= +define( 'AI1WM_GD_SYSTEM_PLUGIN_NAME', 'gd-system-plugin.php' ); + +// ======================= +// = WP Stack Cache Name = +// ======================= +define( 'AI1WM_WP_STACK_CACHE_NAME', 'wp-stack-cache.php' ); + +// =========================== +// = WP.com Site Loader Name = +// =========================== +define( 'AI1WM_WP_COMSH_LOADER_NAME', 'wpcomsh-loader.php' ); + +// =========================== +// = WP.com Site Helper Name = +// =========================== +define( 'AI1WM_WP_COMSH_HELPER_NAME', 'wpcomsh' ); + +// ================================ +// = WP Engine System Plugin Name = +// ================================ +define( 'AI1WM_WP_ENGINE_SYSTEM_PLUGIN_NAME', 'mu-plugin.php' ); + +// =========================== +// = WPE Sign On Plugin Name = +// =========================== +define( 'AI1WM_WPE_SIGN_ON_PLUGIN_NAME', 'wpe-wp-sign-on-plugin.php' ); + +// =================================== +// = WP Engine Security Auditor Name = +// =================================== +define( 'AI1WM_WP_ENGINE_SECURITY_AUDITOR_NAME', 'wpengine-security-auditor.php' ); + +// =========================== +// = WP Cerber Security Name = +// =========================== +define( 'AI1WM_WP_CERBER_SECURITY_NAME', 'aaa-wp-cerber.php' ); + +// =============================== +// = W3TC config file to exclude = +// =============================== +define( 'AI1WM_W3TC_CONFIG_FILE', 'w3tc-config' . DIRECTORY_SEPARATOR . 'master.php' ); + +// ================== +// = Error Log Name = +// ================== +define( 'AI1WM_ERROR_NAME', 'error.log' ); + +// ============== +// = Secret Key = +// ============== +define( 'AI1WM_SECRET_KEY', 'ai1wm_secret_key' ); + +// ============= +// = Auth User = +// ============= +define( 'AI1WM_AUTH_USER', 'ai1wm_auth_user' ); + +// ================= +// = Auth Password = +// ================= +define( 'AI1WM_AUTH_PASSWORD', 'ai1wm_auth_password' ); + +// =============== +// = Auth Header = +// =============== +define( 'AI1WM_AUTH_HEADER', 'ai1wm_auth_header' ); + +// ============ +// = Site URL = +// ============ +define( 'AI1WM_SITE_URL', 'siteurl' ); + +// ============ +// = Home URL = +// ============ +define( 'AI1WM_HOME_URL', 'home' ); + +// ================ +// = Uploads Path = +// ================ +define( 'AI1WM_UPLOADS_PATH', 'upload_path' ); + +// ==================== +// = Uploads URL Path = +// ==================== +define( 'AI1WM_UPLOADS_URL_PATH', 'upload_url_path' ); + +// ================== +// = Active Plugins = +// ================== +define( 'AI1WM_ACTIVE_PLUGINS', 'active_plugins' ); + +// =========================== +// = Active Sitewide Plugins = +// =========================== +define( 'AI1WM_ACTIVE_SITEWIDE_PLUGINS', 'active_sitewide_plugins' ); + +// ========================== +// = Jetpack Active Modules = +// ========================== +define( 'AI1WM_JETPACK_ACTIVE_MODULES', 'jetpack_active_modules' ); + +// ==================================== +// = Swift Optimizer Plugin Organizer = +// ==================================== +define( 'AI1WM_SWIFT_OPTIMIZER_PLUGIN_ORGANIZER', 'swift_performance_plugin_organizer' ); + +// ====================== +// = MS Files Rewriting = +// ====================== +define( 'AI1WM_MS_FILES_REWRITING', 'ms_files_rewriting' ); + +// =================== +// = Active Template = +// =================== +define( 'AI1WM_ACTIVE_TEMPLATE', 'template' ); + +// ===================== +// = Active Stylesheet = +// ===================== +define( 'AI1WM_ACTIVE_STYLESHEET', 'stylesheet' ); + +// ============== +// = DB Version = +// ============== +define( 'AI1WM_DB_VERSION', 'db_version' ); + +// ====================== +// = Initial DB Version = +// ====================== +define( 'AI1WM_INITIAL_DB_VERSION', 'initial_db_version' ); + +// ============ +// = Cron Key = +// ============ +define( 'AI1WM_CRON', 'cron' ); + +// ======================= +// = Backups Path Option = +// ======================= +define( 'AI1WM_BACKUPS_PATH_OPTION', 'ai1wm_backups_path' ); + +// =================== +// = Backups Labels = +// =================== +define( 'AI1WM_BACKUPS_LABELS', 'ai1wm_backups_labels' ); + +// =============== +// = Sites Links = +// =============== +define( 'AI1WM_SITES_LINKS', 'ai1wm_sites_links' ); + +// ============================== +// = Last Check For Updates Key = +// ============================== +define( 'AI1WM_LAST_CHECK_FOR_UPDATES', 'ai1wm_last_check_for_updates' ); + +// =============== +// = Updater Key = +// =============== +define( 'AI1WM_UPDATER', 'ai1wm_updater' ); + +// ============== +// = Status Key = +// ============== +define( 'AI1WM_STATUS', 'ai1wm_status' ); + +// ================ +// = Messages Key = +// ================ +define( 'AI1WM_MESSAGES', 'ai1wm_messages' ); + +// ================= +// = Support Email = +// ================= +define( 'AI1WM_SUPPORT_EMAIL', 'support@servmask.com' ); + +// ================== +// = Max Chunk Size = +// ================== +define( 'AI1WM_MAX_CHUNK_SIZE', 5 * 1024 * 1024 ); + +// ===================== +// = Max Chunk Retries = +// ===================== +define( 'AI1WM_MAX_CHUNK_RETRIES', 10 ); + +// =============== +// = CIPHER NAME = +// =============== +define( 'AI1WM_CIPHER_NAME', 'AES-256-CBC' ); + +// ============= +// = SIGN TEXT = +// ============= +define( 'AI1WM_SIGN_TEXT', '"How long do you want these messages to remain secret? I want them to remain secret for as long as men are capable of evil." - Neal Stephenson' ); + +// =========================== +// = Max Transaction Queries = +// =========================== +if ( ! defined( 'AI1WM_MAX_TRANSACTION_QUERIES' ) ) { + define( 'AI1WM_MAX_TRANSACTION_QUERIES', 1000 ); +} + +// ====================== +// = Max Select Records = +// ====================== +if ( ! defined( 'AI1WM_MAX_SELECT_RECORDS' ) ) { + define( 'AI1WM_MAX_SELECT_RECORDS', 1000 ); +} + +// ======================= +// = Max Storage Cleanup = +// ======================= +define( 'AI1WM_MAX_STORAGE_CLEANUP', 24 * 60 * 60 ); + +// ===================== +// = Disk Space Factor = +// ===================== +define( 'AI1WM_DISK_SPACE_FACTOR', 2 ); + +// ==================== +// = Disk Space Extra = +//===================== +define( 'AI1WM_DISK_SPACE_EXTRA', 300 * 1024 * 1024 ); + +// =========================== +// = WP_CONTENT_DIR Constant = +// =========================== +if ( ! defined( 'WP_CONTENT_DIR' ) ) { + define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); +} + +// ======================== +// = Backups Default Path = +// ======================== +if ( ! defined( 'AI1WM_DEFAULT_BACKUPS_PATH' ) ) { + define( 'AI1WM_DEFAULT_BACKUPS_PATH', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'ai1wm-backups' ); +} + +// ================ +// = Backups Path = +// ================ +define( 'AI1WM_BACKUPS_PATH', get_option( AI1WM_BACKUPS_PATH_OPTION, AI1WM_DEFAULT_BACKUPS_PATH ) ); + +// ========================== +// = Storage index.php File = +// ========================== +define( 'AI1WM_STORAGE_INDEX_PHP', AI1WM_STORAGE_PATH . DIRECTORY_SEPARATOR . 'index.php' ); + +// =========================== +// = Storage index.html File = +// =========================== +define( 'AI1WM_STORAGE_INDEX_HTML', AI1WM_STORAGE_PATH . DIRECTORY_SEPARATOR . 'index.html' ); + +// ========================== +// = Backups index.php File = +// ========================== +define( 'AI1WM_BACKUPS_INDEX_PHP', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . 'index.php' ); + +// =========================== +// = Backups index.html File = +// =========================== +define( 'AI1WM_BACKUPS_INDEX_HTML', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . 'index.html' ); + +// =========================== +// = Backups robots.txt File = +// =========================== +define( 'AI1WM_BACKUPS_ROBOTS_TXT', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . 'robots.txt' ); + +// ========================== +// = Backups .htaccess File = +// ========================== +define( 'AI1WM_BACKUPS_HTACCESS', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . '.htaccess' ); + +// =========================== +// = Backups web.config File = +// =========================== +define( 'AI1WM_BACKUPS_WEBCONFIG', AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . 'web.config' ); + +// ============================ +// = WordPress .htaccess File = +// ============================ +define( 'AI1WM_WORDPRESS_HTACCESS', ABSPATH . DIRECTORY_SEPARATOR . '.htaccess' ); + +// ============================= +// = WordPress web.config File = +// ============================= +define( 'AI1WM_WORDPRESS_WEBCONFIG', ABSPATH . DIRECTORY_SEPARATOR . 'web.config' ); + +// ================================ +// = WP Migration Plugin Base Dir = +// ================================ +if ( defined( 'AI1WM_PLUGIN_BASENAME' ) ) { + define( 'AI1WM_PLUGIN_BASEDIR', dirname( AI1WM_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WM_PLUGIN_BASEDIR', 'all-in-one-wp-migration' ); +} + +// ====================================== +// = Microsoft Azure Extension Base Dir = +// ====================================== +if ( defined( 'AI1WMZE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMZE_PLUGIN_BASEDIR', dirname( AI1WMZE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMZE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-azure-storage-extension' ); +} + +// =================================== +// = Microsoft Azure Extension Title = +// =================================== +if ( ! defined( 'AI1WMZE_PLUGIN_TITLE' ) ) { + define( 'AI1WMZE_PLUGIN_TITLE', 'Microsoft Azure Storage Extension' ); +} + +// =================================== +// = Microsoft Azure Extension About = +// =================================== +if ( ! defined( 'AI1WMZE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMZE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/microsoft-azure-storage-extension.json' ); +} + +// =================================== +// = Microsoft Azure Extension Check = +// =================================== +if ( ! defined( 'AI1WMZE_PLUGIN_CHECK' ) ) { + define( 'AI1WMZE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/microsoft-azure-storage-extension' ); +} + +// ================================= +// = Microsoft Azure Extension Key = +// ================================= +if ( ! defined( 'AI1WMZE_PLUGIN_KEY' ) ) { + define( 'AI1WMZE_PLUGIN_KEY', 'ai1wmze_plugin_key' ); +} + +// =================================== +// = Microsoft Azure Extension Short = +// =================================== +if ( ! defined( 'AI1WMZE_PLUGIN_SHORT' ) ) { + define( 'AI1WMZE_PLUGIN_SHORT', 'azure-storage' ); +} + +// =================================== +// = Backblaze B2 Extension Base Dir = +// =================================== +if ( defined( 'AI1WMAE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMAE_PLUGIN_BASEDIR', dirname( AI1WMAE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMAE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-b2-extension' ); +} + +// ================================ +// = Backblaze B2 Extension Title = +// ================================ +if ( ! defined( 'AI1WMAE_PLUGIN_TITLE' ) ) { + define( 'AI1WMAE_PLUGIN_TITLE', 'Backblaze B2 Extension' ); +} + +// ================================ +// = Backblaze B2 Extension About = +// ================================ +if ( ! defined( 'AI1WMAE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMAE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/backblaze-b2-extension.json' ); +} + +// ================================ +// = Backblaze B2 Extension Check = +// ================================ +if ( ! defined( 'AI1WMAE_PLUGIN_CHECK' ) ) { + define( 'AI1WMAE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/backblaze-b2-extension' ); +} + +// ============================== +// = Backblaze B2 Extension Key = +// ============================== +if ( ! defined( 'AI1WMAE_PLUGIN_KEY' ) ) { + define( 'AI1WMAE_PLUGIN_KEY', 'ai1wmae_plugin_key' ); +} + +// ================================ +// = Backblaze B2 Extension Short = +// ================================ +if ( ! defined( 'AI1WMAE_PLUGIN_SHORT' ) ) { + define( 'AI1WMAE_PLUGIN_SHORT', 'b2' ); +} + +// ========================== +// = Backup Plugin Base Dir = +// ========================== +if ( defined( 'AI1WMVE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMVE_PLUGIN_BASEDIR', dirname( AI1WMVE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMVE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-backup' ); +} + +// ======================= +// = Backup Plugin Title = +// ======================= +if ( ! defined( 'AI1WMVE_PLUGIN_TITLE' ) ) { + define( 'AI1WMVE_PLUGIN_TITLE', 'Backup Plugin' ); +} + +// ======================= +// = Backup Plugin About = +// ======================= +if ( ! defined( 'AI1WMVE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMVE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/backup-plugin.json' ); +} + +// ======================= +// = Backup Plugin Check = +// ======================= +if ( ! defined( 'AI1WMVE_PLUGIN_CHECK' ) ) { + define( 'AI1WMVE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/backup-plugin' ); +} + +// ===================== +// = Backup Plugin Key = +// ===================== +if ( ! defined( 'AI1WMVE_PLUGIN_KEY' ) ) { + define( 'AI1WMVE_PLUGIN_KEY', 'ai1wmve_plugin_key' ); +} + +// ======================= +// = Backup Plugin Short = +// ======================= +if ( ! defined( 'AI1WMVE_PLUGIN_SHORT' ) ) { + define( 'AI1WMVE_PLUGIN_SHORT', 'backup' ); +} + +// ========================== +// = Box Extension Base Dir = +// ========================== +if ( defined( 'AI1WMBE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMBE_PLUGIN_BASEDIR', dirname( AI1WMBE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMBE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-box-extension' ); +} + +// ======================= +// = Box Extension Title = +// ======================= +if ( ! defined( 'AI1WMBE_PLUGIN_TITLE' ) ) { + define( 'AI1WMBE_PLUGIN_TITLE', 'Box Extension' ); +} + +// ======================= +// = Box Extension About = +// ======================= +if ( ! defined( 'AI1WMBE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMBE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/box-extension.json' ); +} + +// ======================= +// = Box Extension Check = +// ======================= +if ( ! defined( 'AI1WMBE_PLUGIN_CHECK' ) ) { + define( 'AI1WMBE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/box-extension' ); +} + +// ===================== +// = Box Extension Key = +// ===================== +if ( ! defined( 'AI1WMBE_PLUGIN_KEY' ) ) { + define( 'AI1WMBE_PLUGIN_KEY', 'ai1wmbe_plugin_key' ); +} + +// ======================= +// = Box Extension Short = +// ======================= +if ( ! defined( 'AI1WMBE_PLUGIN_SHORT' ) ) { + define( 'AI1WMBE_PLUGIN_SHORT', 'box' ); +} + +// ========================================== +// = DigitalOcean Spaces Extension Base Dir = +// ========================================== +if ( defined( 'AI1WMIE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMIE_PLUGIN_BASEDIR', dirname( AI1WMIE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMIE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-digitalocean-extension' ); +} + +// ======================================= +// = DigitalOcean Spaces Extension Title = +// ======================================= +if ( ! defined( 'AI1WMIE_PLUGIN_TITLE' ) ) { + define( 'AI1WMIE_PLUGIN_TITLE', 'DigitalOcean Spaces Extension' ); +} + +// ======================================= +// = DigitalOcean Spaces Extension About = +// ======================================= +if ( ! defined( 'AI1WMIE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMIE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/digitalocean-spaces-extension.json' ); +} + +// ======================================= +// = DigitalOcean Spaces Extension Check = +// ======================================= +if ( ! defined( 'AI1WMIE_PLUGIN_CHECK' ) ) { + define( 'AI1WMIE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/digitalocean-spaces-extension' ); +} + +// ===================================== +// = DigitalOcean Spaces Extension Key = +// ===================================== +if ( ! defined( 'AI1WMIE_PLUGIN_KEY' ) ) { + define( 'AI1WMIE_PLUGIN_KEY', 'ai1wmie_plugin_key' ); +} + +// ======================================= +// = DigitalOcean Spaces Extension Short = +// ======================================= +if ( ! defined( 'AI1WMIE_PLUGIN_SHORT' ) ) { + define( 'AI1WMIE_PLUGIN_SHORT', 'digitalocean' ); +} + +// ============================= +// = Direct Extension Base Dir = +// ============================= +if ( defined( 'AI1WMXE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMXE_PLUGIN_BASEDIR', dirname( AI1WMXE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMXE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-direct-extension' ); +} +// ========================== +// = Direct Extension Title = +// ========================== +if ( ! defined( 'AI1WMXE_PLUGIN_TITLE' ) ) { + define( 'AI1WMXE_PLUGIN_TITLE', 'Direct Extension' ); +} +// ========================== +// = Direct Extension About = +// ========================== +if ( ! defined( 'AI1WMXE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMXE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/direct-extension.json' ); +} + +// ========================== +// = Direct Extension Check = +// ========================== +if ( ! defined( 'AI1WMXE_PLUGIN_CHECK' ) ) { + define( 'AI1WMXE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/direct-extension' ); +} + +// ======================== +// = Direct Extension Key = +// ======================== +if ( ! defined( 'AI1WMXE_PLUGIN_KEY' ) ) { + define( 'AI1WMXE_PLUGIN_KEY', 'ai1wmxe_plugin_key' ); +} +// ========================== +// = Direct Extension Short = +// ========================== +if ( ! defined( 'AI1WMXE_PLUGIN_SHORT' ) ) { + define( 'AI1WMXE_PLUGIN_SHORT', 'direct' ); +} + +// ============================== +// = Dropbox Extension Base Dir = +// ============================== +if ( defined( 'AI1WMDE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMDE_PLUGIN_BASEDIR', dirname( AI1WMDE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMDE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-dropbox-extension' ); +} + +// =========================== +// = Dropbox Extension Title = +// =========================== +if ( ! defined( 'AI1WMDE_PLUGIN_TITLE' ) ) { + define( 'AI1WMDE_PLUGIN_TITLE', 'Dropbox Extension' ); +} + +// =========================== +// = Dropbox Extension About = +// =========================== +if ( ! defined( 'AI1WMDE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMDE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/dropbox-extension.json' ); +} + +// =========================== +// = Dropbox Extension Check = +// =========================== +if ( ! defined( 'AI1WMDE_PLUGIN_CHECK' ) ) { + define( 'AI1WMDE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/dropbox-extension' ); +} + +// ========================= +// = Dropbox Extension Key = +// ========================= +if ( ! defined( 'AI1WMDE_PLUGIN_KEY' ) ) { + define( 'AI1WMDE_PLUGIN_KEY', 'ai1wmde_plugin_key' ); +} + +// =========================== +// = Dropbox Extension Short = +// =========================== +if ( ! defined( 'AI1WMDE_PLUGIN_SHORT' ) ) { + define( 'AI1WMDE_PLUGIN_SHORT', 'dropbox' ); +} + +// =========================== +// = File Extension Base Dir = +// =========================== +if ( defined( 'AI1WMTE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMTE_PLUGIN_BASEDIR', dirname( AI1WMTE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMTE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-file-extension' ); +} + +// ======================== +// = File Extension Title = +// ======================== +if ( ! defined( 'AI1WMTE_PLUGIN_TITLE' ) ) { + define( 'AI1WMTE_PLUGIN_TITLE', 'File Extension' ); +} + +// ======================== +// = File Extension About = +// ======================== +if ( ! defined( 'AI1WMTE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMTE_PLUGIN_ABOUT', 'https://import.wp-migration.com/file-extension.json' ); +} + +// ======================== +// = File Extension Check = +// ======================== +if ( ! defined( 'AI1WMTE_PLUGIN_CHECK' ) ) { + define( 'AI1WMTE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/file-extension' ); +} + +// ====================== +// = File Extension Key = +// ====================== +if ( ! defined( 'AI1WMTE_PLUGIN_KEY' ) ) { + define( 'AI1WMTE_PLUGIN_KEY', 'ai1wmte_plugin_key' ); +} + +// ======================== +// = File Extension Short = +// ======================== +if ( ! defined( 'AI1WMTE_PLUGIN_SHORT' ) ) { + define( 'AI1WMTE_PLUGIN_SHORT', 'file' ); +} + +// ========================== +// = FTP Extension Base Dir = +// ========================== +if ( defined( 'AI1WMFE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMFE_PLUGIN_BASEDIR', dirname( AI1WMFE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMFE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-ftp-extension' ); +} + +// ======================= +// = FTP Extension Title = +// ======================= +if ( ! defined( 'AI1WMFE_PLUGIN_TITLE' ) ) { + define( 'AI1WMFE_PLUGIN_TITLE', 'FTP Extension' ); +} + +// ======================= +// = FTP Extension About = +// ======================= +if ( ! defined( 'AI1WMFE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMFE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/ftp-extension.json' ); +} + +// ======================= +// = FTP Extension Check = +// ======================= +if ( ! defined( 'AI1WMFE_PLUGIN_CHECK' ) ) { + define( 'AI1WMFE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/ftp-extension' ); +} + +// ===================== +// = FTP Extension Key = +// ===================== +if ( ! defined( 'AI1WMFE_PLUGIN_KEY' ) ) { + define( 'AI1WMFE_PLUGIN_KEY', 'ai1wmfe_plugin_key' ); +} + +// ======================= +// = FTP Extension Short = +// ======================= +if ( ! defined( 'AI1WMFE_PLUGIN_SHORT' ) ) { + define( 'AI1WMFE_PLUGIN_SHORT', 'ftp' ); +} + +// =========================================== +// = Google Cloud Storage Extension Base Dir = +// =========================================== +if ( defined( 'AI1WMCE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMCE_PLUGIN_BASEDIR', dirname( AI1WMCE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMCE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-gcloud-storage-extension' ); +} + +// ======================================== +// = Google Cloud Storage Extension Title = +// ======================================== +if ( ! defined( 'AI1WMCE_PLUGIN_TITLE' ) ) { + define( 'AI1WMCE_PLUGIN_TITLE', 'Google Cloud Storage Extension' ); +} + +// ======================================== +// = Google Cloud Storage Extension About = +// ======================================== +if ( ! defined( 'AI1WMCE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMCE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/google-cloud-storage-extension.json' ); +} + +// ======================================== +// = Google Cloud Storage Extension Check = +// ======================================== +if ( ! defined( 'AI1WMCE_PLUGIN_CHECK' ) ) { + define( 'AI1WMCE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/google-cloud-storage-extension' ); +} + +// ====================================== +// = Google Cloud Storage Extension Key = +// ====================================== +if ( ! defined( 'AI1WMCE_PLUGIN_KEY' ) ) { + define( 'AI1WMCE_PLUGIN_KEY', 'ai1wmce_plugin_key' ); +} + +// ======================================== +// = Google Cloud Storage Extension Short = +// ======================================== +if ( ! defined( 'AI1WMCE_PLUGIN_SHORT' ) ) { + define( 'AI1WMCE_PLUGIN_SHORT', 'gcloud-storage' ); +} + +// =================================== +// = Google Drive Extension Base Dir = +// =================================== +if ( defined( 'AI1WMGE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMGE_PLUGIN_BASEDIR', dirname( AI1WMGE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMGE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-gdrive-extension' ); +} + +// ================================ +// = Google Drive Extension Title = +// ================================ +if ( ! defined( 'AI1WMGE_PLUGIN_TITLE' ) ) { + define( 'AI1WMGE_PLUGIN_TITLE', 'Google Drive Extension' ); +} + +// ================================ +// = Google Drive Extension About = +// ================================ +if ( ! defined( 'AI1WMGE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMGE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/google-drive-extension.json' ); +} + +// ================================ +// = Google Drive Extension Check = +// ================================ +if ( ! defined( 'AI1WMGE_PLUGIN_CHECK' ) ) { + define( 'AI1WMGE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/google-drive-extension' ); +} + +// ============================== +// = Google Drive Extension Key = +// ============================== +if ( ! defined( 'AI1WMGE_PLUGIN_KEY' ) ) { + define( 'AI1WMGE_PLUGIN_KEY', 'ai1wmge_plugin_key' ); +} + +// ================================ +// = Google Drive Extension Short = +// ================================ +if ( ! defined( 'AI1WMGE_PLUGIN_SHORT' ) ) { + define( 'AI1WMGE_PLUGIN_SHORT', 'gdrive' ); +} + +// ===================================== +// = Amazon Glacier Extension Base Dir = +// ===================================== +if ( defined( 'AI1WMRE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMRE_PLUGIN_BASEDIR', dirname( AI1WMRE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMRE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-glacier-extension' ); +} + +// ================================== +// = Amazon Glacier Extension Title = +// ================================== +if ( ! defined( 'AI1WMRE_PLUGIN_TITLE' ) ) { + define( 'AI1WMRE_PLUGIN_TITLE', 'Amazon Glacier Extension' ); +} + +// ================================== +// = Amazon Glacier Extension About = +// ================================== +if ( ! defined( 'AI1WMRE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMRE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/amazon-glacier-extension.json' ); +} + +// ================================== +// = Amazon Glacier Extension Check = +// ================================== +if ( ! defined( 'AI1WMRE_PLUGIN_CHECK' ) ) { + define( 'AI1WMRE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/amazon-glacier-extension' ); +} + +// ================================ +// = Amazon Glacier Extension Key = +// ================================ +if ( ! defined( 'AI1WMRE_PLUGIN_KEY' ) ) { + define( 'AI1WMRE_PLUGIN_KEY', 'ai1wmre_plugin_key' ); +} + +// ================================== +// = Amazon Glacier Extension Short = +// ================================== +if ( ! defined( 'AI1WMRE_PLUGIN_SHORT' ) ) { + define( 'AI1WMRE_PLUGIN_SHORT', 'glacier' ); +} + +// =========================== +// = Mega Extension Base Dir = +// =========================== +if ( defined( 'AI1WMEE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMEE_PLUGIN_BASEDIR', dirname( AI1WMEE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMEE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-mega-extension' ); +} + +// ======================== +// = Mega Extension Title = +// ======================== +if ( ! defined( 'AI1WMEE_PLUGIN_TITLE' ) ) { + define( 'AI1WMEE_PLUGIN_TITLE', 'Mega Extension' ); +} + +// ======================== +// = Mega Extension About = +// ======================== +if ( ! defined( 'AI1WMEE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMEE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/mega-extension.json' ); +} + +// ======================== +// = Mega Extension Check = +// ======================== +if ( ! defined( 'AI1WMEE_PLUGIN_CHECK' ) ) { + define( 'AI1WMEE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/mega-extension' ); +} + +// ====================== +// = Mega Extension Key = +// ====================== +if ( ! defined( 'AI1WMEE_PLUGIN_KEY' ) ) { + define( 'AI1WMEE_PLUGIN_KEY', 'ai1wmee_plugin_key' ); +} + +// ======================== +// = Mega Extension Short = +// ======================== +if ( ! defined( 'AI1WMEE_PLUGIN_SHORT' ) ) { + define( 'AI1WMEE_PLUGIN_SHORT', 'mega' ); +} + +// ================================ +// = Multisite Extension Base Dir = +// ================================ +if ( defined( 'AI1WMME_PLUGIN_BASENAME' ) ) { + define( 'AI1WMME_PLUGIN_BASEDIR', dirname( AI1WMME_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMME_PLUGIN_BASEDIR', 'all-in-one-wp-migration-multisite-extension' ); +} + +// ============================= +// = Multisite Extension Title = +// ============================= +if ( ! defined( 'AI1WMME_PLUGIN_TITLE' ) ) { + define( 'AI1WMME_PLUGIN_TITLE', 'Multisite Extension' ); +} + +// ============================= +// = Multisite Extension About = +// ============================= +if ( ! defined( 'AI1WMME_PLUGIN_ABOUT' ) ) { + define( 'AI1WMME_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/multisite-extension.json' ); +} + +// ============================= +// = Multisite Extension Check = +// ============================= +if ( ! defined( 'AI1WMME_PLUGIN_CHECK' ) ) { + define( 'AI1WMME_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/multisite-extension' ); +} + +// =========================== +// = Multisite Extension Key = +// =========================== +if ( ! defined( 'AI1WMME_PLUGIN_KEY' ) ) { + define( 'AI1WMME_PLUGIN_KEY', 'ai1wmme_plugin_key' ); +} + +// ============================= +// = Multisite Extension Short = +// ============================= +if ( ! defined( 'AI1WMME_PLUGIN_SHORT' ) ) { + define( 'AI1WMME_PLUGIN_SHORT', 'multisite' ); +} + +// =============================== +// = OneDrive Extension Base Dir = +// =============================== +if ( defined( 'AI1WMOE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMOE_PLUGIN_BASEDIR', dirname( AI1WMOE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMOE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-onedrive-extension' ); +} + +// ============================ +// = OneDrive Extension Title = +// ============================ +if ( ! defined( 'AI1WMOE_PLUGIN_TITLE' ) ) { + define( 'AI1WMOE_PLUGIN_TITLE', 'OneDrive Extension' ); +} + +// ============================ +// = OneDrive Extension About = +// ============================ +if ( ! defined( 'AI1WMOE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMOE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/onedrive-extension.json' ); +} + +// ============================ +// = OneDrive Extension Check = +// ============================ +if ( ! defined( 'AI1WMOE_PLUGIN_CHECK' ) ) { + define( 'AI1WMOE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/onedrive-extension' ); +} + +// ========================== +// = OneDrive Extension Key = +// ========================== +if ( ! defined( 'AI1WMOE_PLUGIN_KEY' ) ) { + define( 'AI1WMOE_PLUGIN_KEY', 'ai1wmoe_plugin_key' ); +} + +// ============================ +// = OneDrive Extension Short = +// ============================ +if ( ! defined( 'AI1WMOE_PLUGIN_SHORT' ) ) { + define( 'AI1WMOE_PLUGIN_SHORT', 'onedrive' ); +} + +// ============================= +// = pCloud Extension Base Dir = +// ============================= +if ( defined( 'AI1WMPE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMPE_PLUGIN_BASEDIR', dirname( AI1WMPE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMPE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-pcloud-extension' ); +} + +// ========================== +// = pCloud Extension Title = +// ========================== +if ( ! defined( 'AI1WMPE_PLUGIN_TITLE' ) ) { + define( 'AI1WMPE_PLUGIN_TITLE', 'pCloud Extension' ); +} + +// ========================== +// = pCloud Extension About = +// ========================== +if ( ! defined( 'AI1WMPE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMPE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/pcloud-extension.json' ); +} + +// ========================== +// = pCloud Extension Check = +// ========================== +if ( ! defined( 'AI1WMPE_PLUGIN_CHECK' ) ) { + define( 'AI1WMPE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/pcloud-extension' ); +} + +// ======================== +// = pCloud Extension Key = +// ======================== +if ( ! defined( 'AI1WMPE_PLUGIN_KEY' ) ) { + define( 'AI1WMPE_PLUGIN_KEY', 'ai1wmpe_plugin_key' ); +} + +// ========================== +// = pCloud Extension Short = +// ========================== +if ( ! defined( 'AI1WMPE_PLUGIN_SHORT' ) ) { + define( 'AI1WMPE_PLUGIN_SHORT', 'pcloud' ); +} + +// ======================= +// = Pro Plugin Base Dir = +// ======================= +if ( defined( 'AI1WMKE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMKE_PLUGIN_BASEDIR', dirname( AI1WMKE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMKE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-pro' ); +} + +// ==================== +// = Pro Plugin Title = +// ==================== +if ( ! defined( 'AI1WMKE_PLUGIN_TITLE' ) ) { + define( 'AI1WMKE_PLUGIN_TITLE', 'Pro Plugin' ); +} + +// ==================== +// = Pro Plugin About = +// ==================== +if ( ! defined( 'AI1WMKE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMKE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/pro-plugin.json' ); +} + +// ==================== +// = Pro Plugin Check = +// ==================== +if ( ! defined( 'AI1WMKE_PLUGIN_CHECK' ) ) { + define( 'AI1WMKE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/pro-plugin' ); +} + +// ================== +// = Pro Plugin Key = +// ================== +if ( ! defined( 'AI1WMKE_PLUGIN_KEY' ) ) { + define( 'AI1WMKE_PLUGIN_KEY', 'ai1wmke_plugin_key' ); +} + +// ==================== +// = Pro Plugin Short = +// ==================== +if ( ! defined( 'AI1WMKE_PLUGIN_SHORT' ) ) { + define( 'AI1WMKE_PLUGIN_SHORT', 'pro' ); +} + +// ================================ +// = S3 Client Extension Base Dir = +// ================================ +if ( defined( 'AI1WMNE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMNE_PLUGIN_BASEDIR', dirname( AI1WMNE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMNE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-s3-client-extension' ); +} + +// ============================= +// = S3 Client Extension Title = +// ============================= +if ( ! defined( 'AI1WMNE_PLUGIN_TITLE' ) ) { + define( 'AI1WMNE_PLUGIN_TITLE', 'S3 Client Extension' ); +} + +// ============================= +// = S3 Client Extension About = +// ============================= +if ( ! defined( 'AI1WMNE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMNE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/s3-client-extension.json' ); +} + +// ============================= +// = S3 Client Extension Check = +// ============================= +if ( ! defined( 'AI1WMNE_PLUGIN_CHECK' ) ) { + define( 'AI1WMNE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/s3-client-extension' ); +} + +// =========================== +// = S3 Client Extension Key = +// =========================== +if ( ! defined( 'AI1WMNE_PLUGIN_KEY' ) ) { + define( 'AI1WMNE_PLUGIN_KEY', 'ai1wmne_plugin_key' ); +} + +// ============================= +// = S3 Client Extension Short = +// ============================= +if ( ! defined( 'AI1WMNE_PLUGIN_SHORT' ) ) { + define( 'AI1WMNE_PLUGIN_SHORT', 's3-client' ); +} + +// ================================ +// = Amazon S3 Extension Base Dir = +// ================================ +if ( defined( 'AI1WMSE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMSE_PLUGIN_BASEDIR', dirname( AI1WMSE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMSE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-s3-extension' ); +} + +// ============================= +// = Amazon S3 Extension Title = +// ============================= +if ( ! defined( 'AI1WMSE_PLUGIN_TITLE' ) ) { + define( 'AI1WMSE_PLUGIN_TITLE', 'Amazon S3 Extension' ); +} + +// ============================= +// = Amazon S3 Extension About = +// ============================= +if ( ! defined( 'AI1WMSE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMSE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/amazon-s3-extension.json' ); +} + +// ============================= +// = Amazon S3 Extension Check = +// ============================= +if ( ! defined( 'AI1WMSE_PLUGIN_CHECK' ) ) { + define( 'AI1WMSE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/amazon-s3-extension' ); +} + +// =========================== +// = Amazon S3 Extension Key = +// =========================== +if ( ! defined( 'AI1WMSE_PLUGIN_KEY' ) ) { + define( 'AI1WMSE_PLUGIN_KEY', 'ai1wmse_plugin_key' ); +} + +// ============================= +// = Amazon S3 Extension Short = +// ============================= +if ( ! defined( 'AI1WMSE_PLUGIN_SHORT' ) ) { + define( 'AI1WMSE_PLUGIN_SHORT', 's3' ); +} + +// ================================ +// = Unlimited Extension Base Dir = +// ================================ +if ( defined( 'AI1WMUE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMUE_PLUGIN_BASEDIR', dirname( AI1WMUE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMUE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-unlimited-extension' ); +} + +// ============================= +// = Unlimited Extension Title = +// ============================= +if ( ! defined( 'AI1WMUE_PLUGIN_TITLE' ) ) { + define( 'AI1WMUE_PLUGIN_TITLE', 'Unlimited Extension' ); +} + +// ============================= +// = Unlimited Extension About = +// ============================= +if ( ! defined( 'AI1WMUE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMUE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/unlimited-extension.json' ); +} + +// ============================= +// = Unlimited Extension Check = +// ============================= +if ( ! defined( 'AI1WMUE_PLUGIN_CHECK' ) ) { + define( 'AI1WMUE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/unlimited-extension' ); +} + +// =========================== +// = Unlimited Extension Key = +// =========================== +if ( ! defined( 'AI1WMUE_PLUGIN_KEY' ) ) { + define( 'AI1WMUE_PLUGIN_KEY', 'ai1wmue_plugin_key' ); +} + +// ============================= +// = Unlimited Extension Short = +// ============================= +if ( ! defined( 'AI1WMUE_PLUGIN_SHORT' ) ) { + define( 'AI1WMUE_PLUGIN_SHORT', 'unlimited' ); +} + +// ========================== +// = URL Extension Base Dir = +// ========================== +if ( defined( 'AI1WMLE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMLE_PLUGIN_BASEDIR', dirname( AI1WMLE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMLE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-url-extension' ); +} + +// ======================= +// = URL Extension Title = +// ======================= +if ( ! defined( 'AI1WMLE_PLUGIN_TITLE' ) ) { + define( 'AI1WMLE_PLUGIN_TITLE', 'URL Extension' ); +} + +// ======================= +// = URL Extension About = +// ======================= +if ( ! defined( 'AI1WMLE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMLE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/url-extension.json' ); +} + +// ======================= +// = URL Extension Check = +// ======================= +if ( ! defined( 'AI1WMLE_PLUGIN_CHECK' ) ) { + define( 'AI1WMLE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/url-extension' ); +} + +// ===================== +// = URL Extension Key = +// ===================== +if ( ! defined( 'AI1WMLE_PLUGIN_KEY' ) ) { + define( 'AI1WMLE_PLUGIN_KEY', 'ai1wmle_plugin_key' ); +} + +// ======================= +// = URL Extension Short = +// ======================= +if ( ! defined( 'AI1WMLE_PLUGIN_SHORT' ) ) { + define( 'AI1WMLE_PLUGIN_SHORT', 'url' ); +} + +// ============================= +// = WebDAV Extension Base Dir = +// ============================= +if ( defined( 'AI1WMWE_PLUGIN_BASENAME' ) ) { + define( 'AI1WMWE_PLUGIN_BASEDIR', dirname( AI1WMWE_PLUGIN_BASENAME ) ); +} else { + define( 'AI1WMWE_PLUGIN_BASEDIR', 'all-in-one-wp-migration-webdav-extension' ); +} + +// ========================== +// = WebDAV Extension Title = +// ========================== +if ( ! defined( 'AI1WMWE_PLUGIN_TITLE' ) ) { + define( 'AI1WMWE_PLUGIN_TITLE', 'WebDAV Extension' ); +} + +// ========================== +// = WebDAV Extension About = +// ========================== +if ( ! defined( 'AI1WMWE_PLUGIN_ABOUT' ) ) { + define( 'AI1WMWE_PLUGIN_ABOUT', 'https://plugin-updates.wp-migration.com/webdav-extension.json' ); +} + +// ========================== +// = WebDAV Extension Check = +// ========================== +if ( ! defined( 'AI1WMWE_PLUGIN_CHECK' ) ) { + define( 'AI1WMWE_PLUGIN_CHECK', 'https://redirect.wp-migration.com/v1/check/webdav-extension' ); +} + +// ======================== +// = WebDAV Extension Key = +// ======================== +if ( ! defined( 'AI1WMWE_PLUGIN_KEY' ) ) { + define( 'AI1WMWE_PLUGIN_KEY', 'ai1wmwe_plugin_key' ); +} + +// ========================== +// = WebDAV Extension Short = +// ========================== +if ( ! defined( 'AI1WMWE_PLUGIN_SHORT' ) ) { + define( 'AI1WMWE_PLUGIN_SHORT', 'webdav' ); +} diff --git a/plugin-file/all-in-one-wp-migration/deprecated.php b/plugin-file/all-in-one-wp-migration/deprecated.php new file mode 100644 index 0000000..fe536a1 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/deprecated.php @@ -0,0 +1,30 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +function ai1wm_progress_path( $params ) {} diff --git a/plugin-file/all-in-one-wp-migration/exceptions.php b/plugin-file/all-in-one-wp-migration/exceptions.php new file mode 100644 index 0000000..3cf9bcf --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/exceptions.php @@ -0,0 +1,52 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Archive_Exception extends Exception {} +class Ai1wm_Backups_Exception extends Exception {} +class Ai1wm_Export_Exception extends Exception {} +class Ai1wm_Http_Exception extends Exception {} +class Ai1wm_Import_Exception extends Exception {} +class Ai1wm_Import_Retry_Exception extends Exception {} +class Ai1wm_Not_Accessible_Exception extends Exception {} +class Ai1wm_Not_Seekable_Exception extends Exception {} +class Ai1wm_Not_Tellable_Exception extends Exception {} +class Ai1wm_Not_Readable_Exception extends Exception {} +class Ai1wm_Not_Writable_Exception extends Exception {} +class Ai1wm_Not_Truncatable_Exception extends Exception {} +class Ai1wm_Not_Closable_Exception extends Exception {} +class Ai1wm_Not_Found_Exception extends Exception {} +class Ai1wm_Not_Directory_Exception extends Exception {} +class Ai1wm_Not_Valid_Secret_Key_Exception extends Exception {} +class Ai1wm_Quota_Exceeded_Exception extends Exception {} +class Ai1wm_Storage_Exception extends Exception {} +class Ai1wm_Compatibility_Exception extends Exception {} +class Ai1wm_Feedback_Exception extends Exception {} +class Ai1wm_Database_Exception extends Exception {} +class Ai1wm_Not_Encryptable_Exception extends Exception {} +class Ai1wm_Not_Decryptable_Exception extends Exception {} diff --git a/plugin-file/all-in-one-wp-migration/functions.php b/plugin-file/all-in-one-wp-migration/functions.php new file mode 100644 index 0000000..6fa397c --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/functions.php @@ -0,0 +1,2171 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +/** + * Get storage absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_storage_path( $params ) { + if ( empty( $params['storage'] ) ) { + throw new Ai1wm_Storage_Exception( __( 'Unable to locate storage path. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + // Validate storage path + if ( ai1wm_validate_file( $params['storage'] ) !== 0 ) { + throw new Ai1wm_Storage_Exception( __( 'Your storage directory name contains invalid characters. It cannot contain: < > : " | ? * \0. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + // Get storage path + $storage = AI1WM_STORAGE_PATH . DIRECTORY_SEPARATOR . basename( $params['storage'] ); + if ( ! is_dir( $storage ) ) { + mkdir( $storage, 0777, true ); + } + + return $storage; +} + +/** + * Get backup absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_backup_path( $params ) { + if ( empty( $params['archive'] ) ) { + throw new Ai1wm_Archive_Exception( __( 'Unable to locate archive path. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + // Validate archive path + if ( ai1wm_validate_file( $params['archive'] ) !== 0 ) { + throw new Ai1wm_Archive_Exception( __( 'Your archive file name contains invalid characters. It cannot contain: < > : " | ? * \0. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + return AI1WM_BACKUPS_PATH . DIRECTORY_SEPARATOR . $params['archive']; +} + +/** + * Validates a file name and path against an allowed set of rules + * + * @param string $file File path + * @param array $allowed_files Array of allowed files + * @return integer + */ +function ai1wm_validate_file( $file, $allowed_files = array() ) { + $file = str_replace( '\\', '/', $file ); + + // Validates special characters that are illegal in filenames on certain + // operating systems and special characters requiring special escaping + // to manipulate at the command line + $invalid_chars = array( '<', '>', ':', '"', '|', '?', '*', chr( 0 ) ); + foreach ( $invalid_chars as $char ) { + if ( strpos( $file, $char ) !== false ) { + return 1; + } + } + + return validate_file( $file, $allowed_files ); +} + +/** + * Get archive absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_archive_path( $params ) { + if ( empty( $params['archive'] ) ) { + throw new Ai1wm_Archive_Exception( __( 'Unable to locate archive path. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + // Validate archive path + if ( ai1wm_validate_file( $params['archive'] ) !== 0 ) { + throw new Ai1wm_Archive_Exception( __( 'Your archive file name contains invalid characters. It cannot contain: < > : " | ? * \0. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + // Get archive path + if ( empty( $params['ai1wm_manual_restore'] ) ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . $params['archive']; + } + + return ai1wm_backup_path( $params ); +} + +/** + * Get multipart.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_multipart_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_MULTIPART_NAME; +} + +/** + * Get content.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_content_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_CONTENT_LIST_NAME; +} + +/** + * Get media.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_media_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_MEDIA_LIST_NAME; +} + +/** + * Get plugins.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_plugins_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_PLUGINS_LIST_NAME; +} + +/** + * Get themes.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_themes_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_THEMES_LIST_NAME; +} + +/** + * Get tables.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_tables_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_TABLES_LIST_NAME; +} + +/** + * Get incremental.content.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_incremental_content_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_CONTENT_LIST_NAME; +} + +/** + * Get incremental.media.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_incremental_media_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_MEDIA_LIST_NAME; +} + +/** + * Get incremental.plugins.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_incremental_plugins_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_PLUGINS_LIST_NAME; +} + +/** + * Get incremental.themes.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_incremental_themes_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_THEMES_LIST_NAME; +} + +/** + * Get incremental.backups.list absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_incremental_backups_list_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_INCREMENTAL_BACKUPS_LIST_NAME; +} + +/** + * Get package.json absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_package_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_PACKAGE_NAME; +} + +/** + * Get multisite.json absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_multisite_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_MULTISITE_NAME; +} + +/** + * Get blogs.json absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_blogs_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_BLOGS_NAME; +} + +/** + * Get settings.json absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_settings_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_SETTINGS_NAME; +} + +/** + * Get database.sql absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_database_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_DATABASE_NAME; +} + +/** + * Get cookies.txt absolute path + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_cookies_path( $params ) { + return ai1wm_storage_path( $params ) . DIRECTORY_SEPARATOR . AI1WM_COOKIES_NAME; +} + +/** + * Get error log absolute path + * + * @return string + */ +function ai1wm_error_path() { + return AI1WM_STORAGE_PATH . DIRECTORY_SEPARATOR . AI1WM_ERROR_NAME; +} + +/** + * Get archive name + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_archive_name( $params ) { + return basename( $params['archive'] ); +} + +/** + * Get backup URL address + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_backup_url( $params ) { + static $backups_base_url = ''; + if ( empty( $backups_base_url ) ) { + if ( Ai1wm_Backups::are_in_wp_content_folder() ) { + $backups_base_url = str_replace( untrailingslashit( WP_CONTENT_DIR ), '', AI1WM_BACKUPS_PATH ); + $backups_base_url = content_url( + ai1wm_replace_directory_separator_with_forward_slash( $backups_base_url ) + ); + } else { + $backups_base_url = str_replace( untrailingslashit( ABSPATH ), '', AI1WM_BACKUPS_PATH ); + $backups_base_url = site_url( + ai1wm_replace_directory_separator_with_forward_slash( $backups_base_url ) + ); + } + } + + return $backups_base_url . '/' . ai1wm_replace_directory_separator_with_forward_slash( $params['archive'] ); +} + +/** + * Get archive size in bytes + * + * @param array $params Request parameters + * @return integer + */ +function ai1wm_archive_bytes( $params ) { + return filesize( ai1wm_archive_path( $params ) ); +} + +/** + * Get archive modified time in seconds + * + * @param array $params Request parameters + * @return integer + */ +function ai1wm_archive_mtime( $params ) { + return filemtime( ai1wm_archive_path( $params ) ); +} + +/** + * Get backup size in bytes + * + * @param array $params Request parameters + * @return integer + */ +function ai1wm_backup_bytes( $params ) { + return filesize( ai1wm_backup_path( $params ) ); +} + +/** + * Get database size in bytes + * + * @param array $params Request parameters + * @return integer + */ +function ai1wm_database_bytes( $params ) { + return filesize( ai1wm_database_path( $params ) ); +} + +/** + * Get package size in bytes + * + * @param array $params Request parameters + * @return integer + */ +function ai1wm_package_bytes( $params ) { + return filesize( ai1wm_package_path( $params ) ); +} + +/** + * Get multisite size in bytes + * + * @param array $params Request parameters + * @return integer + */ +function ai1wm_multisite_bytes( $params ) { + return filesize( ai1wm_multisite_path( $params ) ); +} + +/** + * Get archive size as text + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_archive_size( $params ) { + return ai1wm_size_format( filesize( ai1wm_archive_path( $params ) ) ); +} + +/** + * Get backup size as text + * + * @param array $params Request parameters + * @return string + */ +function ai1wm_backup_size( $params ) { + return ai1wm_size_format( filesize( ai1wm_backup_path( $params ) ) ); +} + +/** + * Parse file size + * + * @param string $size File size + * @param string $default Default size + * @return string + */ +function ai1wm_parse_size( $size, $default = null ) { + $suffixes = array( + '' => 1, + 'k' => 1000, + 'm' => 1000000, + 'g' => 1000000000, + ); + + // Parse size format + if ( preg_match( '/([0-9]+)\s*(k|m|g)?(b?(ytes?)?)/i', $size, $matches ) ) { + return $matches[1] * $suffixes[ strtolower( $matches[2] ) ]; + } + + return $default; +} + +/** + * Format file size into human-readable string + * + * Fixes the WP size_format bug: size_format( '0' ) => false + * + * @param int|string $bytes Number of bytes. Note max integer size for integers. + * @param int $decimals Optional. Precision of number of decimal places. Default 0. + * @return string|false False on failure. Number string on success. + */ +function ai1wm_size_format( $bytes, $decimals = 0 ) { + if ( strval( $bytes ) === '0' ) { + return size_format( 0, $decimals ); + } + + return size_format( $bytes, $decimals ); +} + +/** + * Get current site name + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_site_name( $blog_id = null ) { + return parse_url( get_site_url( $blog_id ), PHP_URL_HOST ); +} + +/** + * Get archive file name + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_archive_file( $blog_id = null ) { + $name = array(); + + // Add domain + if ( defined( 'AI1WM_KEEP_DOMAIN_NAME' ) ) { + $name[] = parse_url( get_site_url( $blog_id ), PHP_URL_HOST ); + } elseif ( ( $domain = explode( '.', parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) ) ) { + foreach ( $domain as $subdomain ) { + if ( ( $subdomain = strtolower( $subdomain ) ) ) { + $name[] = $subdomain; + } + } + } + + // Add path + if ( ( $path = parse_url( get_site_url( $blog_id ), PHP_URL_PATH ) ) ) { + foreach ( explode( '/', $path ) as $directory ) { + if ( ( $directory = strtolower( preg_replace( '/[^A-Za-z0-9\-]/', '', $directory ) ) ) ) { + $name[] = $directory; + } + } + } + + // Add year, month and day + $name[] = date_i18n( 'Ymd' ); + + // Add hours, minutes and seconds + $name[] = date_i18n( 'His' ); + + // Add unique identifier + $name[] = ai1wm_generate_random_string( 6, false ); + + return sprintf( '%s.wpress', strtolower( implode( '-', $name ) ) ); +} + +/** + * Get archive folder name + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_archive_folder( $blog_id = null ) { + $name = array(); + + // Add domain + if ( defined( 'AI1WM_KEEP_DOMAIN_NAME' ) ) { + $name[] = parse_url( get_site_url( $blog_id ), PHP_URL_HOST ); + } elseif ( ( $domain = explode( '.', parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) ) ) { + foreach ( $domain as $subdomain ) { + if ( ( $subdomain = strtolower( $subdomain ) ) ) { + $name[] = $subdomain; + } + } + } + + // Add path + if ( ( $path = parse_url( get_site_url( $blog_id ), PHP_URL_PATH ) ) ) { + foreach ( explode( '/', $path ) as $directory ) { + if ( ( $directory = strtolower( preg_replace( '/[^A-Za-z0-9\-]/', '', $directory ) ) ) ) { + $name[] = $directory; + } + } + } + + return strtolower( implode( '-', $name ) ); +} + +/** + * Get archive bucket name + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_archive_bucket( $blog_id = null ) { + $name = array(); + + // Add domain + if ( ( $domain = explode( '.', parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) ) ) { + foreach ( $domain as $subdomain ) { + if ( ( $subdomain = strtolower( $subdomain ) ) ) { + $name[] = $subdomain; + } + } + } + + // Add path + if ( ( $path = parse_url( get_site_url( $blog_id ), PHP_URL_PATH ) ) ) { + foreach ( explode( '/', $path ) as $directory ) { + if ( ( $directory = strtolower( preg_replace( '/[^A-Za-z0-9\-]/', '', $directory ) ) ) ) { + $name[] = $directory; + } + } + } + + return strtolower( implode( '-', $name ) ); +} + +/** + * Get archive vault name + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_archive_vault( $blog_id = null ) { + $name = array(); + + // Add domain + if ( ( $domain = explode( '.', parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) ) ) { + foreach ( $domain as $subdomain ) { + if ( ( $subdomain = strtolower( $subdomain ) ) ) { + $name[] = $subdomain; + } + } + } + + // Add path + if ( ( $path = parse_url( get_site_url( $blog_id ), PHP_URL_PATH ) ) ) { + foreach ( explode( '/', $path ) as $directory ) { + if ( ( $directory = strtolower( preg_replace( '/[^A-Za-z0-9\-]/', '', $directory ) ) ) ) { + $name[] = $directory; + } + } + } + + return strtolower( implode( '-', $name ) ); +} + +/** + * Get archive project name + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_archive_project( $blog_id = null ) { + $name = array(); + + // Add domain + if ( ( $domain = explode( '.', parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) ) ) { + foreach ( $domain as $subdomain ) { + if ( ( $subdomain = strtolower( $subdomain ) ) ) { + $name[] = $subdomain; + } + } + } + + // Add path + if ( ( $path = parse_url( get_site_url( $blog_id ), PHP_URL_PATH ) ) ) { + foreach ( explode( '/', $path ) as $directory ) { + if ( ( $directory = strtolower( preg_replace( '/[^A-Za-z0-9\-]/', '', $directory ) ) ) ) { + $name[] = $directory; + } + } + } + + return strtolower( implode( '-', $name ) ); +} + +/** + * Get archive share name + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_archive_share( $blog_id = null ) { + $name = array(); + + // Add domain + if ( ( $domain = explode( '.', parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) ) ) { + foreach ( $domain as $subdomain ) { + if ( ( $subdomain = strtolower( $subdomain ) ) ) { + $name[] = $subdomain; + } + } + } + + // Add path + if ( ( $path = parse_url( get_site_url( $blog_id ), PHP_URL_PATH ) ) ) { + foreach ( explode( '/', $path ) as $directory ) { + if ( ( $directory = strtolower( preg_replace( '/[^A-Za-z0-9\-]/', '', $directory ) ) ) ) { + $name[] = $directory; + } + } + } + + return strtolower( implode( '-', $name ) ); +} + +/** + * Generate random string + * + * @param integer $length String length + * @param boolean $mixed_chars Whether to include mixed characters + * @param boolean $special_chars Whether to include special characters + * @param boolean $extra_special_chars Whether to include extra special characters + * @return string + */ +function ai1wm_generate_random_string( $length = 12, $mixed_chars = true, $special_chars = false, $extra_special_chars = false ) { + $chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; + if ( $mixed_chars ) { + $chars .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + } + + if ( $special_chars ) { + $chars .= '!@#$%^&*()'; + } + + if ( $extra_special_chars ) { + $chars .= '-_ []{}<>~`+=,.;:/?|'; + } + + $str = ''; + for ( $i = 0; $i < $length; $i++ ) { + $str .= substr( $chars, wp_rand( 0, strlen( $chars ) - 1 ), 1 ); + } + + return $str; +} + +/** + * Get storage folder name + * + * @return string + */ +function ai1wm_storage_folder() { + return uniqid(); +} + +/** + * Check whether blog ID is main site + * + * @param integer $blog_id Blog ID + * @return boolean + */ +function ai1wm_is_mainsite( $blog_id = null ) { + return $blog_id === null || $blog_id === 0 || $blog_id === 1; +} + +/** + * Get files absolute path by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_files_abspath( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return ai1wm_get_uploads_dir(); + } + + return WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'blogs.dir' . DIRECTORY_SEPARATOR . $blog_id . DIRECTORY_SEPARATOR . 'files'; +} + +/** + * Get blogs.dir absolute path by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_blogsdir_abspath( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return ai1wm_get_uploads_dir(); + } + + return WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'blogs.dir' . DIRECTORY_SEPARATOR . $blog_id; +} + +/** + * Get sites absolute path by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_sites_abspath( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return ai1wm_get_uploads_dir(); + } + + return ai1wm_get_uploads_dir() . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . $blog_id; +} + +/** + * Get files relative path by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_files_relpath( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return 'uploads'; + } + + return 'blogs.dir' . DIRECTORY_SEPARATOR . $blog_id . DIRECTORY_SEPARATOR . 'files'; +} + +/** + * Get blogs.dir relative path by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_blogsdir_relpath( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return 'uploads'; + } + + return 'blogs.dir' . DIRECTORY_SEPARATOR . $blog_id; +} + +/** + * Get sites relative path by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_sites_relpath( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return 'uploads'; + } + + return 'uploads' . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . $blog_id; +} + +/** + * Get files URL by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_files_url( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return '/wp-content/uploads/'; + } + + return sprintf( '/wp-content/blogs.dir/%d/files/', $blog_id ); +} + +/** + * Get blogs.dir URL by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_blogsdir_url( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return '/wp-content/uploads/'; + } + + return sprintf( '/wp-content/blogs.dir/%d/', $blog_id ); +} + +/** + * Get sites URL by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_sites_url( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return '/wp-content/uploads/'; + } + + return sprintf( '/wp-content/uploads/sites/%d/', $blog_id ); +} + +/** + * Get uploads URL by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_blog_uploads_url( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return sprintf( '/%s/', ai1wm_get_uploads_path() ); + } + + return sprintf( '/%s/sites/%d/', ai1wm_get_uploads_path(), $blog_id ); +} + +/** + * Get ServMask table prefix by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_servmask_prefix( $blog_id = null ) { + if ( ai1wm_is_mainsite( $blog_id ) ) { + return AI1WM_TABLE_PREFIX; + } + + return AI1WM_TABLE_PREFIX . $blog_id . '_'; +} + +/** + * Get WordPress table prefix by blog ID + * + * @param integer $blog_id Blog ID + * @return string + */ +function ai1wm_table_prefix( $blog_id = null ) { + global $wpdb; + + // Set base table prefix + if ( ai1wm_is_mainsite( $blog_id ) ) { + return $wpdb->base_prefix; + } + + return $wpdb->base_prefix . $blog_id . '_'; +} + +/** + * Get default content filters + * + * @param array $filters List of files and directories + * @return array + */ +function ai1wm_content_filters( $filters = array() ) { + return array_merge( + $filters, + array( + AI1WM_BACKUPS_PATH, + AI1WM_BACKUPS_NAME, + AI1WM_PACKAGE_NAME, + AI1WM_MULTISITE_NAME, + AI1WM_DATABASE_NAME, + AI1WM_W3TC_CONFIG_FILE, + ) + ); +} + +/** + * Get default media filters + * + * @param array $filters List of files and directories + * @return array + */ +function ai1wm_media_filters( $filters = array() ) { + return array_merge( + $filters, + array( + AI1WM_BACKUPS_PATH, + ) + ); +} + +/** + * Get default plugin filters + * + * @param array $filters List of plugins + * @return array + */ +function ai1wm_plugin_filters( $filters = array() ) { + return array_merge( + $filters, + array( + AI1WM_BACKUPS_PATH, + AI1WM_PLUGIN_BASEDIR, + AI1WMZE_PLUGIN_BASEDIR, + AI1WMAE_PLUGIN_BASEDIR, + AI1WMVE_PLUGIN_BASEDIR, + AI1WMBE_PLUGIN_BASEDIR, + AI1WMIE_PLUGIN_BASEDIR, + AI1WMXE_PLUGIN_BASEDIR, + AI1WMDE_PLUGIN_BASEDIR, + AI1WMTE_PLUGIN_BASEDIR, + AI1WMFE_PLUGIN_BASEDIR, + AI1WMCE_PLUGIN_BASEDIR, + AI1WMGE_PLUGIN_BASEDIR, + AI1WMRE_PLUGIN_BASEDIR, + AI1WMEE_PLUGIN_BASEDIR, + AI1WMME_PLUGIN_BASEDIR, + AI1WMOE_PLUGIN_BASEDIR, + AI1WMPE_PLUGIN_BASEDIR, + AI1WMKE_PLUGIN_BASEDIR, + AI1WMNE_PLUGIN_BASEDIR, + AI1WMSE_PLUGIN_BASEDIR, + AI1WMUE_PLUGIN_BASEDIR, + AI1WMLE_PLUGIN_BASEDIR, + AI1WMWE_PLUGIN_BASEDIR, + ) + ); + + return $filters; +} + +/** + * Get default theme filters + * + * @param array $filters List of files and directories + * @return array + */ +function ai1wm_theme_filters( $filters = array() ) { + return array_merge( + $filters, + array( + AI1WM_BACKUPS_PATH, + ) + ); +} + +/** + * Get active ServMask plugins + * + * @return array + */ +function ai1wm_active_servmask_plugins( $plugins = array() ) { + // WP Migration Plugin + if ( defined( 'AI1WM_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WM_PLUGIN_BASENAME; + } + + // Microsoft Azure Extension + if ( defined( 'AI1WMZE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMZE_PLUGIN_BASENAME; + } + + // Backblaze B2 Extension + if ( defined( 'AI1WMAE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMAE_PLUGIN_BASENAME; + } + + // Backup Plugin + if ( defined( 'AI1WMVE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMVE_PLUGIN_BASENAME; + } + + // Box Extension + if ( defined( 'AI1WMBE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMBE_PLUGIN_BASENAME; + } + + // DigitalOcean Spaces Extension + if ( defined( 'AI1WMIE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMIE_PLUGIN_BASENAME; + } + + // Direct Extension + if ( defined( 'AI1WMXE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMXE_PLUGIN_BASENAME; + } + + // Dropbox Extension + if ( defined( 'AI1WMDE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMDE_PLUGIN_BASENAME; + } + + // File Extension + if ( defined( 'AI1WMTE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMTE_PLUGIN_BASENAME; + } + + // FTP Extension + if ( defined( 'AI1WMFE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMFE_PLUGIN_BASENAME; + } + + // Google Cloud Storage Extension + if ( defined( 'AI1WMCE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMCE_PLUGIN_BASENAME; + } + + // Google Drive Extension + if ( defined( 'AI1WMGE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMGE_PLUGIN_BASENAME; + } + + // Amazon Glacier Extension + if ( defined( 'AI1WMRE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMRE_PLUGIN_BASENAME; + } + + // Mega Extension + if ( defined( 'AI1WMEE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMEE_PLUGIN_BASENAME; + } + + // Multisite Extension + if ( defined( 'AI1WMME_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMME_PLUGIN_BASENAME; + } + + // OneDrive Extension + if ( defined( 'AI1WMOE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMOE_PLUGIN_BASENAME; + } + + // pCloud Extension + if ( defined( 'AI1WMPE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMPE_PLUGIN_BASENAME; + } + + // Pro Plugin + if ( defined( 'AI1WMKE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMKE_PLUGIN_BASENAME; + } + + // S3 Client Extension + if ( defined( 'AI1WMNE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMNE_PLUGIN_BASENAME; + } + + // Amazon S3 Extension + if ( defined( 'AI1WMSE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMSE_PLUGIN_BASENAME; + } + + // Unlimited Extension + if ( defined( 'AI1WMUE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMUE_PLUGIN_BASENAME; + } + + // URL Extension + if ( defined( 'AI1WMLE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMLE_PLUGIN_BASENAME; + } + + // WebDAV Extension + if ( defined( 'AI1WMWE_PLUGIN_BASENAME' ) ) { + $plugins[] = AI1WMWE_PLUGIN_BASENAME; + } + + return $plugins; +} + +/** + * Get active sitewide plugins + * + * @return array + */ +function ai1wm_active_sitewide_plugins() { + return array_keys( get_site_option( AI1WM_ACTIVE_SITEWIDE_PLUGINS, array() ) ); +} + +/** + * Get active plugins + * + * @return array + */ +function ai1wm_active_plugins() { + return array_values( get_option( AI1WM_ACTIVE_PLUGINS, array() ) ); +} + +/** + * Set active sitewide plugins (inspired by WordPress activate_plugins() function) + * + * @param array $plugins List of plugins + * @return boolean + */ +function ai1wm_activate_sitewide_plugins( $plugins ) { + $current = get_site_option( AI1WM_ACTIVE_SITEWIDE_PLUGINS, array() ); + + // Add plugins + foreach ( $plugins as $plugin ) { + if ( ! isset( $current[ $plugin ] ) && ! is_wp_error( validate_plugin( $plugin ) ) ) { + $current[ $plugin ] = time(); + } + } + + return update_site_option( AI1WM_ACTIVE_SITEWIDE_PLUGINS, $current ); +} + +/** + * Set active plugins (inspired by WordPress activate_plugins() function) + * + * @param array $plugins List of plugins + * @return boolean + */ +function ai1wm_activate_plugins( $plugins ) { + $current = get_option( AI1WM_ACTIVE_PLUGINS, array() ); + + // Add plugins + foreach ( $plugins as $plugin ) { + if ( ! in_array( $plugin, $current ) && ! is_wp_error( validate_plugin( $plugin ) ) ) { + $current[] = $plugin; + } + } + + return update_option( AI1WM_ACTIVE_PLUGINS, $current ); +} + +/** + * Get active template + * + * @return string + */ +function ai1wm_active_template() { + return get_option( AI1WM_ACTIVE_TEMPLATE ); +} + +/** + * Get active stylesheet + * + * @return string + */ +function ai1wm_active_stylesheet() { + return get_option( AI1WM_ACTIVE_STYLESHEET ); +} + +/** + * Set active template + * + * @param string $template Template name + * @return boolean + */ +function ai1wm_activate_template( $template ) { + return update_option( AI1WM_ACTIVE_TEMPLATE, $template ); +} + +/** + * Set active stylesheet + * + * @param string $stylesheet Stylesheet name + * @return boolean + */ +function ai1wm_activate_stylesheet( $stylesheet ) { + return update_option( AI1WM_ACTIVE_STYLESHEET, $stylesheet ); +} + +/** + * Set inactive sitewide plugins (inspired by WordPress deactivate_plugins() function) + * + * @param array $plugins List of plugins + * @return boolean + */ +function ai1wm_deactivate_sitewide_plugins( $plugins ) { + $current = get_site_option( AI1WM_ACTIVE_SITEWIDE_PLUGINS, array() ); + + // Add plugins + foreach ( $plugins as $plugin ) { + if ( isset( $current[ $plugin ] ) ) { + unset( $current[ $plugin ] ); + } + } + + return update_site_option( AI1WM_ACTIVE_SITEWIDE_PLUGINS, $current ); +} + + +/** + * Set inactive plugins (inspired by WordPress deactivate_plugins() function) + * + * @param array $plugins List of plugins + * @return boolean + */ +function ai1wm_deactivate_plugins( $plugins ) { + $current = get_option( AI1WM_ACTIVE_PLUGINS, array() ); + + // Remove plugins + foreach ( $plugins as $plugin ) { + if ( ( $key = array_search( $plugin, $current ) ) !== false ) { + unset( $current[ $key ] ); + } + } + + return update_option( AI1WM_ACTIVE_PLUGINS, $current ); +} + +/** + * Deactivate Jetpack modules + * + * @param array $modules List of modules + * @return boolean + */ +function ai1wm_deactivate_jetpack_modules( $modules ) { + $current = get_option( AI1WM_JETPACK_ACTIVE_MODULES, array() ); + + // Remove modules + foreach ( $modules as $module ) { + if ( ( $key = array_search( $module, $current ) ) !== false ) { + unset( $current[ $key ] ); + } + } + + return update_option( AI1WM_JETPACK_ACTIVE_MODULES, $current ); +} + +/** + * Deactivate Swift Optimizer rules + * + * @param array $rules List of rules + * @return boolean + */ +function ai1wm_deactivate_swift_optimizer_rules( $rules ) { + $current = get_option( AI1WM_SWIFT_OPTIMIZER_PLUGIN_ORGANIZER, array() ); + + // Remove rules + foreach ( $rules as $rule ) { + unset( $current['rules'][ $rule ] ); + } + + return update_option( AI1WM_SWIFT_OPTIMIZER_PLUGIN_ORGANIZER, $current ); +} + +/** + * Deactivate sitewide Revolution Slider + * + * @param string $basename Plugin basename + * @return boolean + */ +function ai1wm_deactivate_sitewide_revolution_slider( $basename ) { + if ( ( $plugins = get_plugins() ) ) { + if ( isset( $plugins[ $basename ]['Version'] ) && ( $version = $plugins[ $basename ]['Version'] ) ) { + if ( version_compare( PHP_VERSION, '7.3', '>=' ) && version_compare( $version, '5.4.8.3', '<' ) ) { + return ai1wm_deactivate_sitewide_plugins( array( $basename ) ); + } + + if ( version_compare( PHP_VERSION, '7.2', '>=' ) && version_compare( $version, '5.4.6', '<' ) ) { + return ai1wm_deactivate_sitewide_plugins( array( $basename ) ); + } + + if ( version_compare( PHP_VERSION, '7.1', '>=' ) && version_compare( $version, '5.4.1', '<' ) ) { + return ai1wm_deactivate_sitewide_plugins( array( $basename ) ); + } + + if ( version_compare( PHP_VERSION, '7.0', '>=' ) && version_compare( $version, '4.6.5', '<' ) ) { + return ai1wm_deactivate_sitewide_plugins( array( $basename ) ); + } + } + } + + return false; +} + +/** + * Deactivate Revolution Slider + * + * @param string $basename Plugin basename + * @return boolean + */ +function ai1wm_deactivate_revolution_slider( $basename ) { + if ( ( $plugins = get_plugins() ) ) { + if ( isset( $plugins[ $basename ]['Version'] ) && ( $version = $plugins[ $basename ]['Version'] ) ) { + if ( version_compare( PHP_VERSION, '7.3', '>=' ) && version_compare( $version, '5.4.8.3', '<' ) ) { + return ai1wm_deactivate_plugins( array( $basename ) ); + } + + if ( version_compare( PHP_VERSION, '7.2', '>=' ) && version_compare( $version, '5.4.6', '<' ) ) { + return ai1wm_deactivate_plugins( array( $basename ) ); + } + + if ( version_compare( PHP_VERSION, '7.1', '>=' ) && version_compare( $version, '5.4.1', '<' ) ) { + return ai1wm_deactivate_plugins( array( $basename ) ); + } + + if ( version_compare( PHP_VERSION, '7.0', '>=' ) && version_compare( $version, '4.6.5', '<' ) ) { + return ai1wm_deactivate_plugins( array( $basename ) ); + } + } + } + + return false; +} + +/** + * Initial DB version + * + * @return boolean + */ +function ai1wm_initial_db_version() { + if ( ! get_option( AI1WM_DB_VERSION ) ) { + return update_option( AI1WM_DB_VERSION, get_option( AI1WM_INITIAL_DB_VERSION ) ); + } + + return false; +} + +/** + * Discover plugin basename + * + * @param string $basename Plugin basename + * @return string + */ +function ai1wm_discover_plugin_basename( $basename ) { + if ( ( $plugins = get_plugins() ) ) { + foreach ( $plugins as $plugin => $info ) { + if ( strpos( dirname( $plugin ), dirname( $basename ) ) !== false ) { + if ( basename( $plugin ) === basename( $basename ) ) { + return $plugin; + } + } + } + } + + return $basename; +} + +/** + * Validate plugin basename + * + * @param string $basename Plugin basename + * @return boolean + */ +function ai1wm_validate_plugin_basename( $basename ) { + if ( ( $plugins = get_plugins() ) ) { + foreach ( $plugins as $plugin => $info ) { + if ( $plugin === $basename ) { + return true; + } + } + } + + return false; +} + +/** + * Validate theme basename + * + * @param string $basename Theme basename + * @return boolean + */ +function ai1wm_validate_theme_basename( $basename ) { + if ( ( $themes = search_theme_directories() ) ) { + foreach ( $themes as $theme => $info ) { + if ( $info['theme_file'] === $basename ) { + return true; + } + } + } + + return false; +} + +/** + * Flush WP options cache + * + * @return void + */ +function ai1wm_cache_flush() { + wp_cache_init(); + wp_cache_flush(); + + // Reset WP options cache + wp_cache_set( 'alloptions', array(), 'options' ); + wp_cache_set( 'notoptions', array(), 'options' ); + + // Reset WP sitemeta cache + wp_cache_set( '1:notoptions', array(), 'site-options' ); + wp_cache_set( '1:ms_files_rewriting', false, 'site-options' ); + wp_cache_set( '1:active_sitewide_plugins', false, 'site-options' ); + + // Delete WP options cache + wp_cache_delete( 'alloptions', 'options' ); + wp_cache_delete( 'notoptions', 'options' ); + + // Delete WP sitemeta cache + wp_cache_delete( '1:notoptions', 'site-options' ); + wp_cache_delete( '1:ms_files_rewriting', 'site-options' ); + wp_cache_delete( '1:active_sitewide_plugins', 'site-options' ); + + // Remove WP options filter + remove_all_filters( 'sanitize_option_home' ); + remove_all_filters( 'sanitize_option_siteurl' ); + remove_all_filters( 'default_site_option_ms_files_rewriting' ); +} + +/** + * Flush Elementor cache + * + * @return void + */ +function ai1wm_elementor_cache_flush() { + delete_post_meta_by_key( '_elementor_css' ); + delete_option( '_elementor_global_css' ); + delete_option( 'elementor-custom-breakpoints-files' ); +} + +/** + * Set WooCommerce Force SSL checkout + * + * @param boolean $yes Force SSL checkout + * @return void + */ +function ai1wm_woocommerce_force_ssl( $yes = true ) { + if ( get_option( 'woocommerce_force_ssl_checkout' ) ) { + if ( $yes ) { + update_option( 'woocommerce_force_ssl_checkout', 'yes' ); + } else { + update_option( 'woocommerce_force_ssl_checkout', 'no' ); + } + } +} + +/** + * Set URL scheme + * + * @param string $url URL value + * @param string $scheme URL scheme + * @return string + */ +function ai1wm_url_scheme( $url, $scheme = '' ) { + if ( empty( $scheme ) ) { + return preg_replace( '#^\w+://#', '//', $url ); + } + + return preg_replace( '#^\w+://#', $scheme . '://', $url ); +} + +/** + * Opens a file in specified mode + * + * @param string $file Path to the file to open + * @param string $mode Mode in which to open the file + * @return resource + * @throws Ai1wm_Not_Accessible_Exception + */ +function ai1wm_open( $file, $mode ) { + $file_handle = @fopen( $file, $mode ); + if ( false === $file_handle ) { + throw new Ai1wm_Not_Accessible_Exception( sprintf( __( 'Unable to open %s with mode %s. Technical details', AI1WM_PLUGIN_NAME ), $file, $mode ) ); + } + + return $file_handle; +} + +/** + * Write contents to a file + * + * @param resource $handle File handle to write to + * @param string $content Contents to write to the file + * @return integer + * @throws Ai1wm_Not_Writable_Exception + * @throws Ai1wm_Quota_Exceeded_Exception + */ +function ai1wm_write( $handle, $content ) { + $write_result = @fwrite( $handle, $content ); + if ( false === $write_result ) { + if ( ( $meta = stream_get_meta_data( $handle ) ) ) { + throw new Ai1wm_Not_Writable_Exception( sprintf( __( 'Unable to write to: %s. Technical details', AI1WM_PLUGIN_NAME ), $meta['uri'] ) ); + } + } elseif ( null === $write_result ) { + return strlen( $content ); + } elseif ( strlen( $content ) !== $write_result ) { + if ( ( $meta = stream_get_meta_data( $handle ) ) ) { + throw new Ai1wm_Quota_Exceeded_Exception( sprintf( __( 'Out of disk space. Unable to write to: %s. Technical details', AI1WM_PLUGIN_NAME ), $meta['uri'] ) ); + } + } + + return $write_result; +} + +/** + * Read contents from a file + * + * @param resource $handle File handle to read from + * @param integer $length Up to length number of bytes read + * @return string + * @throws Ai1wm_Not_Readable_Exception + */ +function ai1wm_read( $handle, $length ) { + if ( $length > 0 ) { + $read_result = @fread( $handle, $length ); + if ( false === $read_result ) { + if ( ( $meta = stream_get_meta_data( $handle ) ) ) { + throw new Ai1wm_Not_Readable_Exception( sprintf( __( 'Unable to read file: %s. Technical details', AI1WM_PLUGIN_NAME ), $meta['uri'] ) ); + } + } + + return $read_result; + } + + return false; +} + +/** + * Seeks on a file pointer + * + * @param resource $handle File handle + * @param integer $offset File offset + * @param integer $mode Offset mode + * @return integer + */ +function ai1wm_seek( $handle, $offset, $mode = SEEK_SET ) { + $seek_result = @fseek( $handle, $offset, $mode ); + if ( -1 === $seek_result ) { + if ( ( $meta = stream_get_meta_data( $handle ) ) ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset %d on %s. Technical details', AI1WM_PLUGIN_NAME ), $offset, $meta['uri'] ) ); + } + } + + return $seek_result; +} + +/** + * Returns the current position of the file read/write pointer + * + * @param resource $handle File handle + * @return integer + */ +function ai1wm_tell( $handle ) { + $tell_result = @ftell( $handle ); + if ( false === $tell_result ) { + if ( ( $meta = stream_get_meta_data( $handle ) ) ) { + throw new Ai1wm_Not_Tellable_Exception( sprintf( __( 'Unable to get current pointer position of %s. Technical details', AI1WM_PLUGIN_NAME ), $meta['uri'] ) ); + } + } + + return $tell_result; +} + +/** + * Write fields to a file + * + * @param resource $handle File handle to write to + * @param array $fields Fields to write to the file + * @return integer + * @throws Ai1wm_Not_Writable_Exception + */ +function ai1wm_putcsv( $handle, $fields ) { + $write_result = @fputcsv( $handle, $fields ); + if ( false === $write_result ) { + if ( ( $meta = stream_get_meta_data( $handle ) ) ) { + throw new Ai1wm_Not_Writable_Exception( sprintf( __( 'Unable to write to: %s. Technical details', AI1WM_PLUGIN_NAME ), $meta['uri'] ) ); + } + } + + return $write_result; +} + +/** + * Closes a file handle + * + * @param resource $handle File handle to close + * @return boolean + */ +function ai1wm_close( $handle ) { + return @fclose( $handle ); +} + +/** + * Deletes a file + * + * @param string $file Path to file to delete + * @return boolean + */ +function ai1wm_unlink( $file ) { + return @unlink( $file ); +} + +/** + * Sets modification time of a file + * + * @param string $file Path to file to change modification time + * @param integer $time File modification time + * @return boolean + */ +function ai1wm_touch( $file, $mtime ) { + return @touch( $file, $mtime ); +} + +/** + * Changes file mode + * + * @param string $file Path to file to change mode + * @param integer $time File mode + * @return boolean + */ +function ai1wm_chmod( $file, $mode ) { + return @chmod( $file, $mode ); +} + +/** + * Copies one file's contents to another + * + * @param string $source_file File to copy the contents from + * @param string $destination_file File to copy the contents to + */ +function ai1wm_copy( $source_file, $destination_file ) { + $source_handle = ai1wm_open( $source_file, 'rb' ); + $destination_handle = ai1wm_open( $destination_file, 'ab' ); + while ( $buffer = ai1wm_read( $source_handle, 4096 ) ) { + ai1wm_write( $destination_handle, $buffer ); + } + ai1wm_close( $source_handle ); + ai1wm_close( $destination_handle ); +} + +/** + * Check whether file size is supported by current PHP version + * + * @param string $file Path to file + * @param integer $php_int_size Size of PHP integer + * @return boolean $php_int_max Max value of PHP integer + */ +function ai1wm_is_filesize_supported( $file, $php_int_size = PHP_INT_SIZE, $php_int_max = PHP_INT_MAX ) { + $size_result = true; + + // Check whether file size is less than 2GB in PHP 32bits + if ( $php_int_size === 4 ) { + if ( ( $file_handle = @fopen( $file, 'r' ) ) ) { + if ( @fseek( $file_handle, $php_int_max, SEEK_SET ) !== -1 ) { + if ( @fgetc( $file_handle ) !== false ) { + $size_result = false; + } + } + + @fclose( $file_handle ); + } + } + + return $size_result; +} + +/** + * Check whether file name is supported by All-in-One WP Migration + * + * @param string $file Path to file + * @param array $extensions File extensions + * @return boolean + */ +function ai1wm_is_filename_supported( $file, $extensions = array( 'wpress' ) ) { + if ( in_array( pathinfo( $file, PATHINFO_EXTENSION ), $extensions ) ) { + return true; + } + + return false; +} + +/** + * Verify secret key + * + * @param string $secret_key Secret key + * @return boolean + * @throws Ai1wm_Not_Valid_Secret_Key_Exception + */ +function ai1wm_verify_secret_key( $secret_key ) { + if ( $secret_key !== get_option( AI1WM_SECRET_KEY ) ) { + throw new Ai1wm_Not_Valid_Secret_Key_Exception( __( 'Unable to authenticate the secret key. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + return true; +} + +/** + * Is scheduled backup? + * + * @return boolean + */ +function ai1wm_is_scheduled_backup() { + if ( isset( $_GET['ai1wm_manual_export'] ) || isset( $_POST['ai1wm_manual_export'] ) ) { + return false; + } + + if ( isset( $_GET['ai1wm_manual_import'] ) || isset( $_POST['ai1wm_manual_import'] ) ) { + return false; + } + + if ( isset( $_GET['ai1wm_manual_restore'] ) || isset( $_POST['ai1wm_manual_restore'] ) ) { + return false; + } + + if ( isset( $_GET['ai1wm_manual_reset'] ) || isset( $_POST['ai1wm_manual_reset'] ) ) { + return false; + } + + return true; +} + +/** + * PHP setup environment + * + * @return void + */ +function ai1wm_setup_environment() { + // Set whether a client disconnect should abort script execution + @ignore_user_abort( true ); + + // Set maximum execution time + @set_time_limit( 0 ); + + // Set maximum time in seconds a script is allowed to parse input data + @ini_set( 'max_input_time', '-1' ); + + // Set maximum backtracking steps + @ini_set( 'pcre.backtrack_limit', PHP_INT_MAX ); + + // Set binary safe encoding + if ( @function_exists( 'mb_internal_encoding' ) && ( @ini_get( 'mbstring.func_overload' ) & 2 ) ) { + @mb_internal_encoding( 'ISO-8859-1' ); + } + + // Clean (erase) the output buffer and turn off output buffering + if ( @ob_get_length() ) { + @ob_end_clean(); + } + + // Set error handler + @set_error_handler( 'Ai1wm_Handler::error' ); + + // Set shutdown handler + @register_shutdown_function( 'Ai1wm_Handler::shutdown' ); +} + +/** + * Get WordPress time zone string + * + * @return string + */ +function ai1wm_get_timezone_string() { + if ( ( $timezone_string = get_option( 'timezone_string' ) ) ) { + return $timezone_string; + } + + if ( ( $gmt_offset = get_option( 'gmt_offset' ) ) ) { + if ( $gmt_offset > 0 ) { + return sprintf( 'UTC+%s', abs( $gmt_offset ) ); + } elseif ( $gmt_offset < 0 ) { + return sprintf( 'UTC-%s', abs( $gmt_offset ) ); + } + } + + return 'UTC'; +} + +/** + * Get WordPress filter hooks + * + * @param string $tag The name of the filter hook + * @return array + */ +function ai1wm_get_filters( $tag ) { + global $wp_filter; + + // Get WordPress filter hooks + $filters = array(); + if ( isset( $wp_filter[ $tag ] ) ) { + if ( ( $filters = $wp_filter[ $tag ] ) ) { + // WordPress 4.7 introduces new class for working with filters/actions called WP_Hook + // which adds another level of abstraction and we need to address it. + if ( isset( $filters->callbacks ) ) { + $filters = $filters->callbacks; + } + } + + ksort( $filters ); + } + + return $filters; +} + +/** + * Get WordPress plugins directories + * + * @return array + */ +function ai1wm_get_themes_dirs() { + $theme_dirs = array(); + foreach ( search_theme_directories() as $theme_name => $theme_info ) { + if ( isset( $theme_info['theme_root'] ) ) { + if ( ! in_array( $theme_info['theme_root'], $theme_dirs ) ) { + $theme_dirs[] = untrailingslashit( $theme_info['theme_root'] ); + } + } + } + + return $theme_dirs; +} + +/** + * Get WordPress plugins directory + * + * @return string + */ +function ai1wm_get_plugins_dir() { + return untrailingslashit( WP_PLUGIN_DIR ); +} + +/** + * Get WordPress uploads directory + * + * @return string + */ +function ai1wm_get_uploads_dir() { + if ( ( $upload_dir = wp_upload_dir() ) ) { + if ( isset( $upload_dir['basedir'] ) ) { + return untrailingslashit( $upload_dir['basedir'] ); + } + } +} + +/** + * Get WordPress uploads URL + * + * @return string + */ +function ai1wm_get_uploads_url() { + if ( ( $upload_dir = wp_upload_dir() ) ) { + if ( isset( $upload_dir['baseurl'] ) ) { + return trailingslashit( $upload_dir['baseurl'] ); + } + } +} + +/** + * Get WordPress uploads path + * + * @return string + */ +function ai1wm_get_uploads_path() { + if ( ( $upload_dir = wp_upload_dir() ) ) { + if ( isset( $upload_dir['basedir'] ) ) { + return str_replace( ABSPATH, '', $upload_dir['basedir'] ); + } + } +} + +/** + * i18n friendly version of basename() + * + * @param string $path File path + * @param string $suffix If the filename ends in suffix this will also be cut off + * @return string + */ +function ai1wm_basename( $path, $suffix = '' ) { + return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) ); +} + +/** + * i18n friendly version of dirname() + * + * @param string $path File path + * @return string + */ +function ai1wm_dirname( $path ) { + return urldecode( dirname( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ) ) ); +} + +/** + * Replace forward slash with current directory separator + * + * @param string $path Path + * @return string + */ +function ai1wm_replace_forward_slash_with_directory_separator( $path ) { + return str_replace( '/', DIRECTORY_SEPARATOR, $path ); +} + +/** + * Replace current directory separator with forward slash + * + * @param string $path Path + * @return string + */ +function ai1wm_replace_directory_separator_with_forward_slash( $path ) { + return str_replace( DIRECTORY_SEPARATOR, '/', $path ); +} + +/** + * Escape Windows directory separator + * + * @param string $path Path + * @return string + */ +function ai1wm_escape_windows_directory_separator( $path ) { + return preg_replace( '/[\\\\]+/', '\\\\\\\\', $path ); +} + +/** + * Should reset WordPress permalinks? + * + * @param array $params Request parameters + * @return boolean + */ +function ai1wm_should_reset_permalinks( $params ) { + global $wp_rewrite, $is_apache; + + // Permalinks are not supported + if ( empty( $params['using_permalinks'] ) ) { + if ( $wp_rewrite->using_permalinks() ) { + if ( $is_apache ) { + if ( ! apache_mod_loaded( 'mod_rewrite', false ) ) { + return true; + } + } + } + } + + return false; +} + +/** + * Get .htaccess file content + * + * @return string + */ +function ai1wm_get_htaccess() { + if ( is_file( AI1WM_WORDPRESS_HTACCESS ) ) { + return @file_get_contents( AI1WM_WORDPRESS_HTACCESS ); + } + + return ''; +} + +/** + * Get web.config file content + * + * @return string + */ +function ai1wm_get_webconfig() { + if ( is_file( AI1WM_WORDPRESS_WEBCONFIG ) ) { + return @file_get_contents( AI1WM_WORDPRESS_WEBCONFIG ); + } + + return ''; +} + +/** + * Get available space on filesystem or disk partition + * + * @param string $path Directory of the filesystem or disk partition + * @return mixed + */ +function ai1wm_disk_free_space( $path ) { + if ( function_exists( 'disk_free_space' ) ) { + return @disk_free_space( $path ); + } +} + +/** + * Set response header to json end echo data + * + * @param array $data + * @param int $options + * @param int $depth + * @return void + */ +function ai1wm_json_response( $data, $options = 0 ) { + if ( ! headers_sent() ) { + header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset', 'utf-8' ) ); + } + + echo json_encode( $data, $options ); +} + +/** + * Determines if the server can encrypt backups + * + * @return boolean + */ +function ai1wm_can_encrypt() { + if ( ! function_exists( 'openssl_encrypt' ) ) { + return false; + } + + if ( ! function_exists( 'openssl_random_pseudo_bytes' ) ) { + return false; + } + + if ( ! function_exists( 'openssl_cipher_iv_length' ) ) { + return false; + } + + if ( ! function_exists( 'sha1' ) ) { + return false; + } + + if ( ! in_array( AI1WM_CIPHER_NAME, array_map( 'strtoupper', openssl_get_cipher_methods() ) ) ) { + return false; + } + + return true; +} + +/** + * Determines if the server can decrypt backups + * + * @return boolean + */ +function ai1wm_can_decrypt() { + if ( ! function_exists( 'openssl_decrypt' ) ) { + return false; + } + + if ( ! function_exists( 'openssl_random_pseudo_bytes' ) ) { + return false; + } + + if ( ! function_exists( 'openssl_cipher_iv_length' ) ) { + return false; + } + + if ( ! function_exists( 'sha1' ) ) { + return false; + } + + if ( ! in_array( AI1WM_CIPHER_NAME, array_map( 'strtoupper', openssl_get_cipher_methods() ) ) ) { + return false; + } + + return true; +} + +/** + * Encrypts a string with a key + * + * @param string $string String to encrypt + * @param string $key Key to encrypt the string with + * @return string + * @throws Ai1wm_Not_Encryptable_Exception + */ +function ai1wm_encrypt_string( $string, $key ) { + $iv_length = ai1wm_crypt_iv_length(); + $key = substr( sha1( $key, true ), 0, $iv_length ); + + $iv = openssl_random_pseudo_bytes( $iv_length ); + if ( $iv === false ) { + throw new Ai1wm_Not_Encryptable_Exception( __( 'Unable to generate random bytes.', AI1WM_PLUGIN_NAME ) ); + } + + $encrypted_string = openssl_encrypt( $string, AI1WM_CIPHER_NAME, $key, OPENSSL_RAW_DATA, $iv ); + if ( $encrypted_string === false ) { + throw new Ai1wm_Not_Encryptable_Exception( __( 'Unable to encrypt data.', AI1WM_PLUGIN_NAME ) ); + } + + return sprintf( '%s%s', $iv, $encrypted_string ); +} + +/** + * Returns encrypt/decrypt iv length + * + * @return int + * @throws Ai1wm_Not_Encryptable_Exception + */ +function ai1wm_crypt_iv_length() { + $iv_length = openssl_cipher_iv_length( AI1WM_CIPHER_NAME ); + if ( $iv_length === false ) { + throw new Ai1wm_Not_Encryptable_Exception( __( 'Unable to obtain cipher length.', AI1WM_PLUGIN_NAME ) ); + } + + return $iv_length; +} + +/** + * Decrypts a string with a eky + * + * @param string $encrypted_string String to decrypt + * @param string $key Key to decrypt the string with + * @return string + * @throws Ai1wm_Not_Encryptable_Exception + * @throws Ai1wm_Not_Decryptable_Exception + */ +function ai1wm_decrypt_string( $encrypted_string, $key ) { + $iv_length = ai1wm_crypt_iv_length(); + $key = substr( sha1( $key, true ), 0, $iv_length ); + $iv = substr( $encrypted_string, 0, $iv_length ); + + $decrypted_string = openssl_decrypt( substr( $encrypted_string, $iv_length ), AI1WM_CIPHER_NAME, $key, OPENSSL_RAW_DATA, $iv ); + if ( $decrypted_string === false ) { + throw new Ai1wm_Not_Decryptable_Exception( __( 'Unable to decrypt data.', AI1WM_PLUGIN_NAME ) ); + } + + return $decrypted_string; +} + +/** + * Checks if decryption password is valid + * + * @param string $encrypted_signature + * @param string $password + * @return bool + */ +function ai1wm_is_decryption_password_valid( $encrypted_signature, $password ) { + try { + $encrypted_signature = base64_decode( $encrypted_signature ); + + return ai1wm_decrypt_string( $encrypted_signature, $password ) === AI1WM_SIGN_TEXT; + } catch ( Ai1wm_Not_Decryptable_Exception $exception ) { + return false; + } +} + +function ai1wm_populate_roles() { + if ( ! function_exists( 'populate_roles' ) && ! function_exists( 'populate_options' ) && ! function_exists( 'populate_network' ) ) { + require_once( ABSPATH . 'wp-admin/includes/schema.php' ); + } + + if ( function_exists( 'populate_roles' ) ) { + populate_roles(); + } +} + +/** + * Set basic auth header to request + * + * @param array $headers + * + * @return array + */ +function ai1wm_auth_headers( $headers = array() ) { + if ( $hash = get_option( AI1WM_AUTH_HEADER ) ) { + $headers['Authorization'] = sprintf( 'Basic %s', $hash ); + } + + if ( ( $user = get_option( AI1WM_AUTH_USER ) ) && ( $password = get_option( AI1WM_AUTH_PASSWORD ) ) ) { + if ( ! isset( $headers['Authorization'] ) && ( $hash = base64_encode( sprintf( '%s:%s', $user, $password ) ) ) ) { + update_option( AI1WM_AUTH_HEADER, $hash ); + $headers['Authorization'] = sprintf( 'Basic %s', $hash ); + } + delete_option( AI1WM_AUTH_USER ); + delete_option( AI1WM_AUTH_PASSWORD ); + } + + return $headers; +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-backups-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-backups-controller.php new file mode 100644 index 0000000..36fce8a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-backups-controller.php @@ -0,0 +1,234 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Backups_Controller { + + public static function index() { + Ai1wm_Template::render( + 'backups/index', + array( + 'backups' => Ai1wm_Backups::get_files(), + 'labels' => Ai1wm_Backups::get_labels(), + 'downloadable' => Ai1wm_Backups::are_downloadable(), + ) + ); + } + + public static function delete( $params = array() ) { + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( $_POST ); + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + // Set archive + $archive = null; + if ( isset( $params['archive'] ) ) { + $archive = trim( $params['archive'] ); + } + + try { + // Ensure that unauthorized people cannot access delete action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + try { + Ai1wm_Backups::delete_file( $archive ); + Ai1wm_Backups::delete_label( $archive ); + } catch ( Ai1wm_Backups_Exception $e ) { + ai1wm_json_response( array( 'errors' => array( $e->getMessage() ) ) ); + exit; + } + + ai1wm_json_response( array( 'errors' => array() ) ); + exit; + } + + public static function add_label( $params = array() ) { + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( $_POST ); + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + // Set archive + $archive = null; + if ( isset( $params['archive'] ) ) { + $archive = trim( $params['archive'] ); + } + + // Set backup label + $label = null; + if ( isset( $params['label'] ) ) { + $label = trim( $params['label'] ); + } + + try { + // Ensure that unauthorized people cannot access add label action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + try { + Ai1wm_Backups::set_label( $archive, $label ); + } catch ( Ai1wm_Backups_Exception $e ) { + ai1wm_json_response( array( 'errors' => array( $e->getMessage() ) ) ); + exit; + } + + ai1wm_json_response( array( 'errors' => array() ) ); + exit; + } + + public static function backup_list( $params = array() ) { + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( $_GET ); + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + try { + // Ensure that unauthorized people cannot access backups list action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + Ai1wm_Template::render( + 'backups/backups-list', + array( + 'backups' => Ai1wm_Backups::get_files(), + 'labels' => Ai1wm_Backups::get_labels(), + 'downloadable' => Ai1wm_Backups::are_downloadable(), + ) + ); + exit; + } + + public static function backup_list_content( $params = array() ) { + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( $_POST ); + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + try { + // Ensure that unauthorized people cannot access backups list action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + try { + $archive = new Ai1wm_Extractor( ai1wm_backup_path( $params ) ); + ai1wm_json_response( $archive->list_files() ); + } catch ( Exception $e ) { + ai1wm_json_response( + array( + 'error' => __( 'Unable to list backup content', AI1WM_PLUGIN_NAME ), + ) + ); + } + + exit; + } + + public static function download_file( $params = array() ) { + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( $_POST ); + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + try { + // Ensure that unauthorized people cannot access backups list action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + $chunk_size = 1024 * 1024; + $read = 0; + + try { + if ( $handle = ai1wm_open( ai1wm_backup_path( $params ), 'r' ) ) { + ai1wm_seek( $handle, $params['offset'] ); + while ( ! feof( $handle ) && $read < $params['file_size'] ) { + $buffer = ai1wm_read( $handle, min( $chunk_size, $params['file_size'] - $read ) ); + echo $buffer; + ob_flush(); + flush(); + $read += strlen( $buffer ); + } + ai1wm_close( $handle ); + } + } catch ( Exception $exception ) { + } + + exit; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-export-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-export-controller.php new file mode 100644 index 0000000..06bb9da --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-export-controller.php @@ -0,0 +1,292 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Controller { + + public static function index() { + Ai1wm_Template::render( 'export/index' ); + } + + public static function export( $params = array() ) { + global $ai1wm_params; + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( array_merge( $_GET, $_POST ) ); + } + + // Set priority + if ( ! isset( $params['priority'] ) ) { + $params['priority'] = 5; + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + try { + // Ensure that unauthorized people cannot access export action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + $ai1wm_params = $params; + + // Loop over filters + if ( ( $filters = ai1wm_get_filters( 'ai1wm_export' ) ) ) { + while ( $hooks = current( $filters ) ) { + if ( intval( $params['priority'] ) === key( $filters ) ) { + foreach ( $hooks as $hook ) { + try { + + // Run function hook + $params = call_user_func_array( $hook['function'], array( $params ) ); + + } catch ( Ai1wm_Database_Exception $e ) { + if ( defined( 'WP_CLI' ) ) { + WP_CLI::error( sprintf( __( 'Unable to export. Error code: %s. %s', AI1WM_PLUGIN_NAME ), $e->getCode(), $e->getMessage() ) ); + } else { + status_header( $e->getCode() ); + ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) ); + } + Ai1wm_Directory::delete( ai1wm_storage_path( $params ) ); + + // Check if export is performed from scheduled event + if ( isset( $params['event_id'] ) ) { + $params['error_message'] = $e->getMessage(); + do_action( 'ai1wm_status_export_fail', $params ); + } + exit; + } catch ( Exception $e ) { + if ( defined( 'WP_CLI' ) ) { + WP_CLI::error( sprintf( __( 'Unable to export: %s', AI1WM_PLUGIN_NAME ), $e->getMessage() ) ); + } else { + Ai1wm_Status::error( __( 'Unable to export', AI1WM_PLUGIN_NAME ), $e->getMessage() ); + Ai1wm_Notification::error( __( 'Unable to export', AI1WM_PLUGIN_NAME ), $e->getMessage() ); + } + Ai1wm_Directory::delete( ai1wm_storage_path( $params ) ); + + // Check if export is performed from scheduled event + if ( isset( $params['event_id'] ) ) { + $params['error_message'] = $e->getMessage(); + do_action( 'ai1wm_status_export_fail', $params ); + } + exit; + } + } + + // Set completed + $completed = true; + if ( isset( $params['completed'] ) ) { + $completed = (bool) $params['completed']; + } + + // Do request + if ( $completed === false || ( $next = next( $filters ) ) && ( $params['priority'] = key( $filters ) ) ) { + if ( defined( 'WP_CLI' ) ) { + if ( ! defined( 'DOING_CRON' ) ) { + continue; + } + } + + if ( isset( $params['ai1wm_manual_export'] ) ) { + ai1wm_json_response( $params ); + exit; + } + + wp_remote_request( + apply_filters( 'ai1wm_http_export_url', add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_export' ) ) ), + array( + 'method' => apply_filters( 'ai1wm_http_export_method', 'POST' ), + 'timeout' => apply_filters( 'ai1wm_http_export_timeout', 10 ), + 'blocking' => apply_filters( 'ai1wm_http_export_blocking', false ), + 'sslverify' => apply_filters( 'ai1wm_http_export_sslverify', false ), + 'headers' => apply_filters( 'ai1wm_http_export_headers', array() ), + 'body' => apply_filters( 'ai1wm_http_export_body', $params ), + ) + ); + exit; + } + } + + next( $filters ); + } + } + + return $params; + } + + public static function buttons() { + $active_filters = array(); + $static_filters = array(); + + // All-in-One WP Migration + if ( defined( 'AI1WM_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_file', Ai1wm_Template::get_content( 'export/button-file' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_file', Ai1wm_Template::get_content( 'export/button-file' ) ); + } + + // Add FTP Extension + if ( defined( 'AI1WMFE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_ftp', Ai1wm_Template::get_content( 'export/button-ftp' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_ftp', Ai1wm_Template::get_content( 'export/button-ftp' ) ); + } + + // Add Dropbox Extension + if ( defined( 'AI1WMDE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_dropbox', Ai1wm_Template::get_content( 'export/button-dropbox' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_dropbox', Ai1wm_Template::get_content( 'export/button-dropbox' ) ); + } + + // Add Google Drive Extension + if ( defined( 'AI1WMGE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_gdrive', Ai1wm_Template::get_content( 'export/button-gdrive' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_gdrive', Ai1wm_Template::get_content( 'export/button-gdrive' ) ); + } + + // Add Amazon S3 Extension + if ( defined( 'AI1WMSE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_s3', Ai1wm_Template::get_content( 'export/button-s3' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_s3', Ai1wm_Template::get_content( 'export/button-s3' ) ); + } + + // Add Backblaze B2 Extension + if ( defined( 'AI1WMAE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_b2', Ai1wm_Template::get_content( 'export/button-b2' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_b2', Ai1wm_Template::get_content( 'export/button-b2' ) ); + } + + // Add OneDrive Extension + if ( defined( 'AI1WMOE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_onedrive', Ai1wm_Template::get_content( 'export/button-onedrive' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_onedrive', Ai1wm_Template::get_content( 'export/button-onedrive' ) ); + } + + // Add Box Extension + if ( defined( 'AI1WMBE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_box', Ai1wm_Template::get_content( 'export/button-box' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_box', Ai1wm_Template::get_content( 'export/button-box' ) ); + } + + // Add Mega Extension + if ( defined( 'AI1WMEE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_mega', Ai1wm_Template::get_content( 'export/button-mega' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_mega', Ai1wm_Template::get_content( 'export/button-mega' ) ); + } + + // Add DigitalOcean Spaces Extension + if ( defined( 'AI1WMIE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_digitalocean', Ai1wm_Template::get_content( 'export/button-digitalocean' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_digitalocean', Ai1wm_Template::get_content( 'export/button-digitalocean' ) ); + } + + // Add Google Cloud Storage Extension + if ( defined( 'AI1WMCE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_gcloud_storage', Ai1wm_Template::get_content( 'export/button-gcloud-storage' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_gcloud_storage', Ai1wm_Template::get_content( 'export/button-gcloud-storage' ) ); + } + + // Add Microsoft Azure Extension + if ( defined( 'AI1WMZE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_azure_storage', Ai1wm_Template::get_content( 'export/button-azure-storage' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_azure_storage', Ai1wm_Template::get_content( 'export/button-azure-storage' ) ); + } + + // Add Amazon Glacier Extension + if ( defined( 'AI1WMRE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_glacier', Ai1wm_Template::get_content( 'export/button-glacier' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_glacier', Ai1wm_Template::get_content( 'export/button-glacier' ) ); + } + + // Add pCloud Extension + if ( defined( 'AI1WMPE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_pcloud', Ai1wm_Template::get_content( 'export/button-pcloud' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_pcloud', Ai1wm_Template::get_content( 'export/button-pcloud' ) ); + } + + // Add WebDAV Extension + if ( defined( 'AI1WMWE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_webdav', Ai1wm_Template::get_content( 'export/button-webdav' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_webdav', Ai1wm_Template::get_content( 'export/button-webdav' ) ); + } + + // Add S3 Client Extension + if ( defined( 'AI1WMNE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_export_s3_client', Ai1wm_Template::get_content( 'export/button-s3-client' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_export_s3_client', Ai1wm_Template::get_content( 'export/button-s3-client' ) ); + } + + return array_merge( $active_filters, $static_filters ); + } + + public static function cleanup() { + try { + // Iterate over storage directory + $iterator = new Ai1wm_Recursive_Directory_Iterator( AI1WM_STORAGE_PATH ); + + // Exclude index.php + $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, array( 'index.php', 'index.html' ) ); + + // Loop over folders and files + foreach ( $iterator as $item ) { + try { + if ( $item->getMTime() < ( time() - AI1WM_MAX_STORAGE_CLEANUP ) ) { + if ( $item->isDir() ) { + Ai1wm_Directory::delete( $item->getPathname() ); + } else { + Ai1wm_File::delete( $item->getPathname() ); + } + } + } catch ( Exception $e ) { + } + } + } catch ( Exception $e ) { + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-feedback-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-feedback-controller.php new file mode 100644 index 0000000..4369628 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-feedback-controller.php @@ -0,0 +1,101 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Feedback_Controller { + + public static function feedback( $params = array() ) { + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( $_POST ); + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + // Set type + $type = null; + if ( isset( $params['ai1wm_type'] ) ) { + $type = trim( $params['ai1wm_type'] ); + } + + // Set e-mail + $email = null; + if ( isset( $params['ai1wm_email'] ) ) { + $email = trim( $params['ai1wm_email'] ); + } + + // Set message + $message = null; + if ( isset( $params['ai1wm_message'] ) ) { + $message = trim( $params['ai1wm_message'] ); + } + + // Set terms + $terms = false; + if ( isset( $params['ai1wm_terms'] ) ) { + $terms = (bool) $params['ai1wm_terms']; + } + + try { + // Ensure that unauthorized people cannot access feedback action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + $extensions = Ai1wm_Extensions::get(); + + // Exclude File Extension + if ( defined( 'AI1WMTE_PLUGIN_NAME' ) ) { + unset( $extensions[ AI1WMTE_PLUGIN_NAME ] ); + } + + $purchases = array(); + foreach ( $extensions as $extension ) { + if ( ( $uuid = get_option( $extension['key'] ) ) ) { + $purchases[] = $uuid; + } + } + + try { + Ai1wm_Feedback::add( $type, $email, $message, $terms, implode( PHP_EOL, $purchases ) ); + } catch ( Ai1wm_Feedback_Exception $e ) { + ai1wm_json_response( array( 'errors' => array( $e->getMessage() ) ) ); + exit; + } + + ai1wm_json_response( array( 'errors' => array() ) ); + exit; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-import-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-import-controller.php new file mode 100644 index 0000000..7da8920 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-import-controller.php @@ -0,0 +1,282 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Controller { + + public static function index() { + Ai1wm_Template::render( 'import/index' ); + } + + public static function import( $params = array() ) { + global $ai1wm_params; + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( array_merge( $_GET, $_POST ) ); + } + + // Set priority + if ( ! isset( $params['priority'] ) ) { + $params['priority'] = 10; + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + try { + // Ensure that unauthorized people cannot access import action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + $ai1wm_params = $params; + + // Loop over filters + if ( ( $filters = ai1wm_get_filters( 'ai1wm_import' ) ) ) { + while ( $hooks = current( $filters ) ) { + if ( intval( $params['priority'] ) === key( $filters ) ) { + foreach ( $hooks as $hook ) { + try { + + // Run function hook + $params = call_user_func_array( $hook['function'], array( $params ) ); + + } catch ( Ai1wm_Import_Retry_Exception $e ) { + if ( defined( 'WP_CLI' ) ) { + WP_CLI::error( sprintf( __( 'Unable to import. Error code: %s. %s', AI1WM_PLUGIN_NAME ), $e->getCode(), $e->getMessage() ) ); + } else { + status_header( $e->getCode() ); + ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) ); + } + exit; + } catch ( Ai1wm_Database_Exception $e ) { + if ( defined( 'WP_CLI' ) ) { + WP_CLI::error( sprintf( __( 'Unable to import. Error code: %s. %s', AI1WM_PLUGIN_NAME ), $e->getCode(), $e->getMessage() ) ); + } else { + status_header( $e->getCode() ); + ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) ); + } + Ai1wm_Directory::delete( ai1wm_storage_path( $params ) ); + exit; + } catch ( Exception $e ) { + if ( defined( 'WP_CLI' ) ) { + WP_CLI::error( sprintf( __( 'Unable to import: %s', AI1WM_PLUGIN_NAME ), $e->getMessage() ) ); + } else { + Ai1wm_Status::error( __( 'Unable to import', AI1WM_PLUGIN_NAME ), $e->getMessage() ); + Ai1wm_Notification::error( __( 'Unable to import', AI1WM_PLUGIN_NAME ), $e->getMessage() ); + } + Ai1wm_Directory::delete( ai1wm_storage_path( $params ) ); + exit; + } + } + + // Set completed + $completed = true; + if ( isset( $params['completed'] ) ) { + $completed = (bool) $params['completed']; + } + + // Do request + if ( $completed === false || ( $next = next( $filters ) ) && ( $params['priority'] = key( $filters ) ) ) { + if ( defined( 'WP_CLI' ) ) { + if ( ! defined( 'DOING_CRON' ) ) { + continue; + } + } + + if ( isset( $params['ai1wm_manual_import'] ) || isset( $params['ai1wm_manual_restore'] ) ) { + ai1wm_json_response( $params ); + exit; + } + + wp_remote_request( + apply_filters( 'ai1wm_http_import_url', add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_import' ) ) ), + array( + 'method' => apply_filters( 'ai1wm_http_import_method', 'POST' ), + 'timeout' => apply_filters( 'ai1wm_http_import_timeout', 10 ), + 'blocking' => apply_filters( 'ai1wm_http_import_blocking', false ), + 'sslverify' => apply_filters( 'ai1wm_http_import_sslverify', false ), + 'headers' => apply_filters( 'ai1wm_http_import_headers', array() ), + 'body' => apply_filters( 'ai1wm_http_import_body', $params ), + ) + ); + exit; + } + } + + next( $filters ); + } + } + + return $params; + } + + public static function buttons() { + $active_filters = array(); + $static_filters = array(); + + // All-in-One WP Migration + if ( defined( 'AI1WM_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_file', Ai1wm_Template::get_content( 'import/button-file' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_file', Ai1wm_Template::get_content( 'import/button-file' ) ); + } + + // Add URL Extension + if ( defined( 'AI1WMLE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_url', Ai1wm_Template::get_content( 'import/button-url' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_url', Ai1wm_Template::get_content( 'import/button-url' ) ); + } + + // Add FTP Extension + if ( defined( 'AI1WMFE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_ftp', Ai1wm_Template::get_content( 'import/button-ftp' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_ftp', Ai1wm_Template::get_content( 'import/button-ftp' ) ); + } + + // Add Dropbox Extension + if ( defined( 'AI1WMDE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_dropbox', Ai1wm_Template::get_content( 'import/button-dropbox' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_dropbox', Ai1wm_Template::get_content( 'import/button-dropbox' ) ); + } + + // Add Google Drive Extension + if ( defined( 'AI1WMGE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_gdrive', Ai1wm_Template::get_content( 'import/button-gdrive' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_gdrive', Ai1wm_Template::get_content( 'import/button-gdrive' ) ); + } + + // Add Amazon S3 Extension + if ( defined( 'AI1WMSE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_s3', Ai1wm_Template::get_content( 'import/button-s3' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_s3', Ai1wm_Template::get_content( 'import/button-s3' ) ); + } + + // Add Backblaze B2 Extension + if ( defined( 'AI1WMAE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_b2', Ai1wm_Template::get_content( 'import/button-b2' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_b2', Ai1wm_Template::get_content( 'import/button-b2' ) ); + } + + // Add OneDrive Extension + if ( defined( 'AI1WMOE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_onedrive', Ai1wm_Template::get_content( 'import/button-onedrive' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_onedrive', Ai1wm_Template::get_content( 'import/button-onedrive' ) ); + } + + // Add Box Extension + if ( defined( 'AI1WMBE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_box', Ai1wm_Template::get_content( 'import/button-box' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_box', Ai1wm_Template::get_content( 'import/button-box' ) ); + } + + // Add Mega Extension + if ( defined( 'AI1WMEE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_mega', Ai1wm_Template::get_content( 'import/button-mega' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_mega', Ai1wm_Template::get_content( 'import/button-mega' ) ); + } + + // Add DigitalOcean Spaces Extension + if ( defined( 'AI1WMIE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_digitalocean', Ai1wm_Template::get_content( 'import/button-digitalocean' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_digitalocean', Ai1wm_Template::get_content( 'import/button-digitalocean' ) ); + } + + // Add Google Cloud Storage Extension + if ( defined( 'AI1WMCE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_gcloud_storage', Ai1wm_Template::get_content( 'import/button-gcloud-storage' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_gcloud_storage', Ai1wm_Template::get_content( 'import/button-gcloud-storage' ) ); + } + + // Add Microsoft Azure Extension + if ( defined( 'AI1WMZE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_azure_storage', Ai1wm_Template::get_content( 'import/button-azure-storage' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_azure_storage', Ai1wm_Template::get_content( 'import/button-azure-storage' ) ); + } + + // Add Amazon Glacier Extension + if ( defined( 'AI1WMRE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_glacier', Ai1wm_Template::get_content( 'import/button-glacier' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_glacier', Ai1wm_Template::get_content( 'import/button-glacier' ) ); + } + + // Add pCloud Extension + if ( defined( 'AI1WMPE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_pcloud', Ai1wm_Template::get_content( 'import/button-pcloud' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_pcloud', Ai1wm_Template::get_content( 'import/button-pcloud' ) ); + } + + // Add WebDAV Extension + if ( defined( 'AI1WMWE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_webdav', Ai1wm_Template::get_content( 'import/button-webdav' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_webdav', Ai1wm_Template::get_content( 'import/button-webdav' ) ); + } + + // Add S3 Client Extension + if ( defined( 'AI1WMNE_PLUGIN_NAME' ) ) { + $active_filters[] = apply_filters( 'ai1wm_import_s3_client', Ai1wm_Template::get_content( 'import/button-s3-client' ) ); + } else { + $static_filters[] = apply_filters( 'ai1wm_import_s3_client', Ai1wm_Template::get_content( 'import/button-s3-client' ) ); + } + + return array_merge( $active_filters, $static_filters ); + } + + public static function pro() { + return Ai1wm_Template::get_content( 'import/pro' ); + } + + public static function max_chunk_size() { + return min( + ai1wm_parse_size( ini_get( 'post_max_size' ), AI1WM_MAX_CHUNK_SIZE ), + ai1wm_parse_size( ini_get( 'upload_max_filesize' ), AI1WM_MAX_CHUNK_SIZE ), + ai1wm_parse_size( AI1WM_MAX_CHUNK_SIZE ) + ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-main-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-main-controller.php new file mode 100644 index 0000000..60decd6 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-main-controller.php @@ -0,0 +1,1380 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Main_Controller { + + /** + * Main Application Controller + * + * @return Ai1wm_Main_Controller + */ + public function __construct() { + register_activation_hook( AI1WM_PLUGIN_BASENAME, array( $this, 'activation_hook' ) ); + + // Activate hooks + $this->activate_actions(); + $this->activate_filters(); + } + + /** + * Activation hook callback + * + * @return void + */ + public function activation_hook() { + if ( extension_loaded( 'litespeed' ) ) { + $this->create_litespeed_htaccess( AI1WM_WORDPRESS_HTACCESS ); + } + + $this->setup_backups_folder(); + $this->setup_storage_folder(); + $this->setup_secret_key(); + } + + /** + * Initializes language domain for the plugin + * + * @return void + */ + public function load_textdomain() { + load_plugin_textdomain( AI1WM_PLUGIN_NAME, false, false ); + } + + /** + * Register listeners for actions + * + * @return void + */ + private function activate_actions() { + // Init + add_action( 'admin_init', array( $this, 'init' ) ); + + // Router + add_action( 'admin_init', array( $this, 'router' ) ); + + // Enable WP importing + add_action( 'admin_init', array( $this, 'wp_importing' ), 5 ); + + // Setup backups folder + add_action( 'admin_init', array( $this, 'setup_backups_folder' ) ); + + // Setup storage folder + add_action( 'admin_init', array( $this, 'setup_storage_folder' ) ); + + // Setup secret key + add_action( 'admin_init', array( $this, 'setup_secret_key' ) ); + + // Check user role capability + add_action( 'admin_init', array( $this, 'check_user_role_capability' ) ); + + // Schedule crons + add_action( 'admin_init', array( $this, 'schedule_crons' ) ); + + // Load text domain + add_action( 'admin_init', array( $this, 'load_textdomain' ) ); + + // Admin header + add_action( 'admin_head', array( $this, 'admin_head' ) ); + + // All-in-One WP Migration + add_action( 'plugins_loaded', array( $this, 'ai1wm_loaded' ), 10 ); + + // Export and import commands + add_action( 'plugins_loaded', array( $this, 'ai1wm_commands' ), 10 ); + + // Export and import buttons + add_action( 'plugins_loaded', array( $this, 'ai1wm_buttons' ), 10 ); + + // WP CLI commands + add_action( 'plugins_loaded', array( $this, 'wp_cli' ), 10 ); + + // Register scripts and styles + add_action( 'admin_enqueue_scripts', array( $this, 'register_scripts_and_styles' ), 5 ); + + // Enqueue export scripts and styles + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_export_scripts_and_styles' ), 5 ); + + // Enqueue import scripts and styles + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_import_scripts_and_styles' ), 5 ); + + // Enqueue backups scripts and styles + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_backups_scripts_and_styles' ), 5 ); + + // Enqueue schedules scripts and styles + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_schedules_scripts_and_styles' ), 5 ); + + // Enqueue reset scripts and styles + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_reset_scripts_and_styles' ), 5 ); + + // Enqueue updater scripts and styles + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_updater_scripts_and_styles' ), 5 ); + } + + /** + * Register listeners for filters + * + * @return void + */ + private function activate_filters() { + // Add links to plugin list page + add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 ); + + // Add custom schedules + add_filter( 'cron_schedules', array( $this, 'add_cron_schedules' ), 9999 ); + } + + /** + * Export and import commands + * + * @return void + */ + public function ai1wm_commands() { + // Add export commands + add_filter( 'ai1wm_export', 'Ai1wm_Export_Init::execute', 5 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Compatibility::execute', 10 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Archive::execute', 30 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Config::execute', 50 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Config_File::execute', 60 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Enumerate_Content::execute', 100 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Enumerate_Media::execute', 110 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Enumerate_Plugins::execute', 120 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Enumerate_Themes::execute', 130 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Enumerate_Tables::execute', 140 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Content::execute', 150 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Media::execute', 160 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Plugins::execute', 170 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Themes::execute', 180 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Database::execute', 200 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Database_File::execute', 220 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Download::execute', 250 ); + add_filter( 'ai1wm_export', 'Ai1wm_Export_Clean::execute', 300 ); + + // Add import commands + add_filter( 'ai1wm_import', 'Ai1wm_Import_Upload::execute', 5 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Compatibility::execute', 10 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Validate::execute', 50 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Check_Encryption::execute', 75 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Check_Decryption_Password::execute', 90 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Confirm::execute', 100 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Blogs::execute', 150 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Permalinks::execute', 170 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Enumerate::execute', 200 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Content::execute', 250 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Mu_Plugins::execute', 270 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Database::execute', 300 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Users::execute', 310 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Options::execute', 330 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Done::execute', 350 ); + add_filter( 'ai1wm_import', 'Ai1wm_Import_Clean::execute', 400 ); + } + + /** + * Export and import buttons + * + * @return void + */ + public function ai1wm_buttons() { + add_filter( 'ai1wm_export_buttons', 'Ai1wm_Export_Controller::buttons' ); + add_filter( 'ai1wm_import_buttons', 'Ai1wm_Import_Controller::buttons' ); + add_filter( 'ai1wm_pro', 'Ai1wm_Import_Controller::pro', 10 ); + } + + /** + * All-in-One WP Migration loaded + * + * @return void + */ + public function ai1wm_loaded() { + if ( ! defined( 'AI1WMME_PLUGIN_NAME' ) ) { + if ( is_multisite() ) { + add_action( 'network_admin_notices', array( $this, 'multisite_notice' ) ); + } else { + add_action( 'admin_menu', array( $this, 'admin_menu' ) ); + } + } else { + if ( is_multisite() ) { + add_action( 'network_admin_menu', array( $this, 'admin_menu' ) ); + } else { + add_action( 'admin_menu', array( $this, 'admin_menu' ) ); + } + } + + // Add in plugin update message + foreach ( Ai1wm_Extensions::get() as $slug => $extension ) { + add_action( "in_plugin_update_message-{$extension['basename']}", 'Ai1wm_Updater_Controller::in_plugin_update_message', 10, 2 ); + } + + // Add automatic plugins update + add_action( 'wp_maybe_auto_update', 'Ai1wm_Updater_Controller::check_for_updates' ); + + // Add HTTP export headers + add_filter( 'ai1wm_http_export_headers', 'ai1wm_auth_headers' ); + + // Add HTTP import headers + add_filter( 'ai1wm_http_import_headers', 'ai1wm_auth_headers' ); + + // Add HTTP reset headers + add_filter( 'ai1wm_http_reset_headers', 'ai1wm_auth_headers' ); + + // Add chunk size limit + add_filter( 'ai1wm_max_chunk_size', 'Ai1wm_Import_Controller::max_chunk_size' ); + + // Add plugins API + add_filter( 'plugins_api', 'Ai1wm_Updater_Controller::plugins_api', 20, 3 ); + + // Add plugins updates + add_filter( 'pre_set_site_transient_update_plugins', 'Ai1wm_Updater_Controller::pre_update_plugins' ); + + // Add plugins metadata + add_filter( 'site_transient_update_plugins', 'Ai1wm_Updater_Controller::update_plugins' ); + + // Add "Check for updates" link to plugin list page + add_filter( 'plugin_row_meta', 'Ai1wm_Updater_Controller::plugin_row_meta', 10, 2 ); + + // Add storage folder daily cleanup cron + add_action( 'ai1wm_storage_cleanup', 'Ai1wm_Export_Controller::cleanup' ); + } + + /** + * WP CLI commands + * + * @return void + */ + public function wp_cli() { + if ( defined( 'WP_CLI' ) ) { + WP_CLI::add_command( 'ai1wm', 'Ai1wm_WP_CLI_Command', array( 'shortdesc' => __( 'All-in-One WP Migration Command', AI1WM_PLUGIN_NAME ) ) ); + } + } + + /** + * Create backups folder with index.php, index.html, .htaccess and web.config files + * + * @return void + */ + public function setup_backups_folder() { + $this->create_backups_folder( AI1WM_BACKUPS_PATH ); + $this->create_backups_htaccess( AI1WM_BACKUPS_HTACCESS ); + $this->create_backups_webconfig( AI1WM_BACKUPS_WEBCONFIG ); + $this->create_backups_index_php( AI1WM_BACKUPS_INDEX_PHP ); + $this->create_backups_index_html( AI1WM_BACKUPS_INDEX_HTML ); + $this->create_backups_robots_txt( AI1WM_BACKUPS_ROBOTS_TXT ); + } + + /** + * Create storage folder with index.php and index.html files + * + * @return void + */ + public function setup_storage_folder() { + $this->create_storage_folder( AI1WM_STORAGE_PATH ); + $this->create_storage_index_php( AI1WM_STORAGE_INDEX_PHP ); + $this->create_storage_index_html( AI1WM_STORAGE_INDEX_HTML ); + } + + /** + * Create secret key if they don't exist yet + * + * @return void + */ + public function setup_secret_key() { + if ( ! get_option( AI1WM_SECRET_KEY ) ) { + update_option( AI1WM_SECRET_KEY, ai1wm_generate_random_string( 12 ) ); + } + } + + /** + * Check user role capability + * + * @return void + */ + public function check_user_role_capability() { + if ( ( $user = wp_get_current_user() ) && in_array( 'administrator', $user->roles ) ) { + if ( ! $user->has_cap( 'export' ) || ! $user->has_cap( 'import' ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'missing_role_capability_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'missing_role_capability_notice' ) ); + } + } + } + } + + /** + * Schedule cron tasks for plugin operation, if not done yet + * + * @return void + */ + public function schedule_crons() { + if ( ! Ai1wm_Cron::exists( 'ai1wm_storage_cleanup' ) ) { + Ai1wm_Cron::add( 'ai1wm_storage_cleanup', 'daily', time() ); + } + + Ai1wm_Cron::clear( 'ai1wm_cleanup_cron' ); + } + + /** + * Create storage folder + * + * @param string Path to folder + * @return void + */ + public function create_storage_folder( $path ) { + if ( ! Ai1wm_Directory::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'storage_path_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'storage_path_notice' ) ); + } + } + } + + /** + * Create backups folder + * + * @param string Path to folder + * @return void + */ + public function create_backups_folder( $path ) { + if ( ! Ai1wm_Directory::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'backups_path_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'backups_path_notice' ) ); + } + } + } + + /** + * Create storage index.php file + * + * @param string Path to file + * @return void + */ + public function create_storage_index_php( $path ) { + if ( ! Ai1wm_File_Index::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'storage_index_php_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'storage_index_php_notice' ) ); + } + } + } + + /** + * Create storage index.html file + * + * @param string Path to file + * @return void + */ + public function create_storage_index_html( $path ) { + if ( ! Ai1wm_File_Index::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'storage_index_html_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'storage_index_html_notice' ) ); + } + } + } + + /** + * Create backups .htaccess file + * + * @param string Path to file + * @return void + */ + public function create_backups_htaccess( $path ) { + if ( ! Ai1wm_File_Htaccess::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'backups_htaccess_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'backups_htaccess_notice' ) ); + } + } + } + + /** + * Create backups web.config file + * + * @param string Path to file + * @return void + */ + public function create_backups_webconfig( $path ) { + if ( ! Ai1wm_File_Webconfig::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'backups_webconfig_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'backups_webconfig_notice' ) ); + } + } + } + + /** + * Create backups index.php file + * + * @param string Path to file + * @return void + */ + public function create_backups_index_php( $path ) { + if ( ! Ai1wm_File_Index::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'backups_index_php_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'backups_index_php_notice' ) ); + } + } + } + + /** + * Create backups index.html file + * + * @param string Path to file + * @return void + */ + public function create_backups_index_html( $path ) { + if ( ! Ai1wm_File_Index::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'backups_index_html_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'backups_index_html_notice' ) ); + } + } + } + + /** + * Create backups robots.txt file + * + * @param string Path to file + * @return void + */ + public function create_backups_robots_txt( $path ) { + if ( ! Ai1wm_File_Robots::create( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'backups_robots_txt_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'backups_robots_txt_notice' ) ); + } + } + } + + /** + * If the "noabort" environment variable has been set, + * the script will continue to run even though the connection has been broken + * + * @return void + */ + public function create_litespeed_htaccess( $path ) { + if ( ! Ai1wm_File_Htaccess::litespeed( $path ) ) { + if ( is_multisite() ) { + return add_action( 'network_admin_notices', array( $this, 'wordpress_htaccess_notice' ) ); + } else { + return add_action( 'admin_notices', array( $this, 'wordpress_htaccess_notice' ) ); + } + } + } + + /** + * Display multisite notice + * + * @return void + */ + public function multisite_notice() { + Ai1wm_Template::render( 'main/multisite-notice' ); + } + + /** + * Display notice for storage directory + * + * @return void + */ + public function storage_path_notice() { + Ai1wm_Template::render( 'main/storage-path-notice' ); + } + + /** + * Display notice for index.php file in storage directory + * + * @return void + */ + public function storage_index_php_notice() { + Ai1wm_Template::render( 'main/storage-index-php-notice' ); + } + + /** + * Display notice for index.html file in storage directory + * + * @return void + */ + public function storage_index_html_notice() { + Ai1wm_Template::render( 'main/storage-index-html-notice' ); + } + + /** + * Display notice for backups directory + * + * @return void + */ + public function backups_path_notice() { + Ai1wm_Template::render( 'main/backups-path-notice' ); + } + + /** + * Display notice for .htaccess file in backups directory + * + * @return void + */ + public function backups_htaccess_notice() { + Ai1wm_Template::render( 'main/backups-htaccess-notice' ); + } + + /** + * Display notice for web.config file in backups directory + * + * @return void + */ + public function backups_webconfig_notice() { + Ai1wm_Template::render( 'main/backups-webconfig-notice' ); + } + + /** + * Display notice for index.php file in backups directory + * + * @return void + */ + public function backups_index_php_notice() { + Ai1wm_Template::render( 'main/backups-index-php-notice' ); + } + + /** + * Display notice for index.html file in backups directory + * + * @return void + */ + public function backups_index_html_notice() { + Ai1wm_Template::render( 'main/backups-index-html-notice' ); + } + + /** + * Display notice for robots.txt file in backups directory + * + * @return void + */ + public function backups_robots_txt_notice() { + Ai1wm_Template::render( 'main/backups-robots-txt-notice' ); + } + + /** + * Display notice for .htaccess file in WordPress directory + * + * @return void + */ + public function wordpress_htaccess_notice() { + Ai1wm_Template::render( 'main/wordpress-htaccess-notice' ); + } + + /** + * Display notice for missing role capability + * + * @return void + */ + public function missing_role_capability_notice() { + Ai1wm_Template::render( 'main/missing-role-capability-notice' ); + } + + /** + * Add links to plugin list page + * + * @return array + */ + public function plugin_row_meta( $links, $file ) { + if ( $file === AI1WM_PLUGIN_BASENAME ) { + $links[] = Ai1wm_Template::get_content( 'main/contact-support' ); + $links[] = Ai1wm_Template::get_content( 'main/translate' ); + } + + return $links; + } + + /** + * Register plugin menus + * + * @return void + */ + public function admin_menu() { + // Top-level WP Migration menu + add_menu_page( + 'All-in-One WP Migration', + 'All-in-One WP Migration', + 'export', + 'ai1wm_export', + 'Ai1wm_Export_Controller::index', + '', + '76.295' + ); + + // Sub-level Export menu + add_submenu_page( + 'ai1wm_export', + __( 'Export', AI1WM_PLUGIN_NAME ), + __( 'Export', AI1WM_PLUGIN_NAME ), + 'export', + 'ai1wm_export', + 'Ai1wm_Export_Controller::index' + ); + + // Sub-level Import menu + add_submenu_page( + 'ai1wm_export', + __( 'Import', AI1WM_PLUGIN_NAME ), + __( 'Import', AI1WM_PLUGIN_NAME ), + 'import', + 'ai1wm_import', + 'Ai1wm_Import_Controller::index' + ); + + // Sub-level Backups menu + add_submenu_page( + 'ai1wm_export', + __( 'Backups', AI1WM_PLUGIN_NAME ), + __( 'Backups', AI1WM_PLUGIN_NAME ) . Ai1wm_Template::get_content( 'main/backups', array( 'count' => Ai1wm_Backups::count_files() ) ), + 'import', + 'ai1wm_backups', + 'Ai1wm_Backups_Controller::index' + ); + + if ( ! defined( 'AI1WMVE_PATH' ) ) { + // Sub-level Reset + add_submenu_page( + 'ai1wm_export', + __( 'Reset Hub', AI1WM_PLUGIN_NAME ), + __( 'Reset Hub', AI1WM_PLUGIN_NAME ) . Ai1wm_Template::get_content( 'main/premium-badge' ), + 'export', + 'ai1wm_reset', + 'Ai1wm_Reset_Controller::index' + ); + // Sub-level Schedules + add_submenu_page( + 'ai1wm_export', + __( 'Schedules', AI1WM_PLUGIN_NAME ), + __( 'Schedules', AI1WM_PLUGIN_NAME ) . Ai1wm_Template::get_content( 'main/premium-badge' ), + 'export', + 'ai1wm_schedules', + 'Ai1wm_Schedules_Controller::index' + ); + } + } + + /** + * Register scripts and styles + * + * @return void + */ + public function register_scripts_and_styles() { + if ( is_rtl() ) { + wp_register_style( + 'ai1wm_servmask', + Ai1wm_Template::asset_link( 'css/servmask.min.rtl.css' ) + ); + } else { + wp_register_style( + 'ai1wm_servmask', + Ai1wm_Template::asset_link( 'css/servmask.min.css' ) + ); + } + + wp_register_script( + 'ai1wm_util', + Ai1wm_Template::asset_link( 'javascript/util.min.js' ), + array( 'jquery' ) + ); + + wp_register_script( + 'ai1wm_settings', + Ai1wm_Template::asset_link( 'javascript/settings.min.js' ), + array( 'ai1wm_util' ) + ); + + wp_localize_script( + 'ai1wm_settings', + 'ai1wm_locale', + array( + 'leave_feedback' => __( 'Leave plugin developers any feedback here', AI1WM_PLUGIN_NAME ), + 'how_may_we_help_you' => __( 'How may we help you?', AI1WM_PLUGIN_NAME ), + 'thanks_for_submitting_your_feedback' => __( 'Thanks for submitting your feedback!', AI1WM_PLUGIN_NAME ), + 'thanks_for_submitting_your_request' => __( 'Thanks for submitting your request!', AI1WM_PLUGIN_NAME ), + ) + ); + } + + /** + * Enqueue scripts and styles for Export Controller + * + * @param string $hook Hook suffix + * @return void + */ + public function enqueue_export_scripts_and_styles( $hook ) { + if ( stripos( 'toplevel_page_ai1wm_export', $hook ) === false ) { + return; + } + + // We don't want heartbeat to occur when exporting + wp_deregister_script( 'heartbeat' ); + + // We don't want auth check for monitoring whether the user is still logged in + remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' ); + + if ( is_rtl() ) { + wp_enqueue_style( + 'ai1wm_export', + Ai1wm_Template::asset_link( 'css/export.min.rtl.css' ) + ); + } else { + wp_enqueue_style( + 'ai1wm_export', + Ai1wm_Template::asset_link( 'css/export.min.css' ) + ); + } + + wp_enqueue_script( + 'ai1wm_export', + Ai1wm_Template::asset_link( 'javascript/export.min.js' ), + array( 'ai1wm_util' ) + ); + + wp_localize_script( + 'ai1wm_export', + 'ai1wm_feedback', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_feedback' ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_export', + 'ai1wm_export', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_export' ) ) ), + ), + 'status' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1, 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_export', + 'ai1wm_locale', + array( + 'stop_exporting_your_website' => __( 'You are about to stop exporting your website, are you sure?', AI1WM_PLUGIN_NAME ), + 'preparing_to_export' => __( 'Preparing to export...', AI1WM_PLUGIN_NAME ), + 'unable_to_export' => __( 'Unable to export', AI1WM_PLUGIN_NAME ), + 'unable_to_start_the_export' => __( 'Unable to start the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_run_the_export' => __( 'Unable to run the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_stop_the_export' => __( 'Unable to stop the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'please_wait_stopping_the_export' => __( 'Please wait, stopping the export...', AI1WM_PLUGIN_NAME ), + 'close_export' => __( 'Close', AI1WM_PLUGIN_NAME ), + 'stop_export' => __( 'Stop export', AI1WM_PLUGIN_NAME ), + 'leave_feedback' => __( 'Leave plugin developers any feedback here', AI1WM_PLUGIN_NAME ), + 'how_may_we_help_you' => __( 'How may we help you?', AI1WM_PLUGIN_NAME ), + 'thanks_for_submitting_your_feedback' => __( 'Thanks for submitting your feedback!', AI1WM_PLUGIN_NAME ), + 'thanks_for_submitting_your_request' => __( 'Thanks for submitting your request!', AI1WM_PLUGIN_NAME ), + 'backups_count_singular' => __( 'You have %d backup', AI1WM_PLUGIN_NAME ), + 'backups_count_plural' => __( 'You have %d backups', AI1WM_PLUGIN_NAME ), + ) + ); + } + + /** + * Enqueue scripts and styles for Import Controller + * + * @param string $hook Hook suffix + * @return void + */ + public function enqueue_import_scripts_and_styles( $hook ) { + if ( stripos( 'all-in-one-wp-migration_page_ai1wm_import', $hook ) === false ) { + return; + } + + // We don't want heartbeat to occur when importing + wp_deregister_script( 'heartbeat' ); + + // We don't want auth check for monitoring whether the user is still logged in + remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' ); + + if ( is_rtl() ) { + wp_enqueue_style( + 'ai1wm_import', + Ai1wm_Template::asset_link( 'css/import.min.rtl.css' ) + ); + } else { + wp_enqueue_style( + 'ai1wm_import', + Ai1wm_Template::asset_link( 'css/import.min.css' ) + ); + } + + wp_enqueue_script( + 'ai1wm_import', + Ai1wm_Template::asset_link( 'javascript/import.min.js' ), + array( 'ai1wm_util' ) + ); + + wp_localize_script( + 'ai1wm_import', + 'ai1wm_feedback', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_feedback' ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_import', + 'ai1wm_uploader', + array( + 'max_file_size' => wp_max_upload_size(), + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_import' ) ) ), + 'params' => array( + 'priority' => 5, + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ), + ) + ); + + wp_localize_script( + 'ai1wm_import', + 'ai1wm_import', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_import' ) ) ), + ), + 'status' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1, 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_import', + 'ai1wm_compatibility', + array( + 'messages' => Ai1wm_Compatibility::get( array() ), + ) + ); + + wp_localize_script( + 'ai1wm_import', + 'ai1wm_disk_space', + array( + 'free' => ai1wm_disk_free_space( AI1WM_STORAGE_PATH ), + 'factor' => AI1WM_DISK_SPACE_FACTOR, + 'extra' => AI1WM_DISK_SPACE_EXTRA, + ) + ); + + wp_localize_script( + 'ai1wm_import', + 'ai1wm_locale', + array( + 'stop_importing_your_website' => __( 'You are about to stop importing your website, are you sure?', AI1WM_PLUGIN_NAME ), + 'preparing_to_import' => __( 'Preparing to import...', AI1WM_PLUGIN_NAME ), + 'unable_to_import' => __( 'Unable to import', AI1WM_PLUGIN_NAME ), + 'unable_to_start_the_import' => __( 'Unable to start the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_confirm_the_import' => __( 'Unable to confirm the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_check_decryption_password' => __( 'Unable to check decryption password. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_prepare_blogs_on_import' => __( 'Unable to prepare blogs on import. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_stop_the_import' => __( 'Unable to stop the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'please_wait_stopping_the_import' => __( 'Please wait, stopping the import...', AI1WM_PLUGIN_NAME ), + 'close_import' => __( 'Close', AI1WM_PLUGIN_NAME ), + 'finish_import' => __( 'Finish', AI1WM_PLUGIN_NAME ), + 'stop_import' => __( 'Stop import', AI1WM_PLUGIN_NAME ), + 'confirm_import' => __( 'Proceed', AI1WM_PLUGIN_NAME ), + 'confirm_disk_space' => __( 'I have enough disk space', AI1WM_PLUGIN_NAME ), + 'continue_import' => __( 'Continue', AI1WM_PLUGIN_NAME ), + 'please_do_not_close_this_browser' => __( 'Please do not close this browser window or your import will fail', AI1WM_PLUGIN_NAME ), + 'leave_feedback' => __( 'Leave plugin developers any feedback here', AI1WM_PLUGIN_NAME ), + 'how_may_we_help_you' => __( 'How may we help you?', AI1WM_PLUGIN_NAME ), + 'thanks_for_submitting_your_feedback' => __( 'Thanks for submitting your feedback!', AI1WM_PLUGIN_NAME ), + 'thanks_for_submitting_your_request' => __( 'Thanks for submitting your request!', AI1WM_PLUGIN_NAME ), + 'backup_encrypted' => __( 'The backup is encrypted', AI1WM_PLUGIN_NAME ), + 'backup_encrypted_message' => __( 'Please enter a password to import the file', AI1WM_PLUGIN_NAME ), + 'submit' => __( 'Submit', AI1WM_PLUGIN_NAME ), + 'enter_password' => __( 'Enter a password', AI1WM_PLUGIN_NAME ), + 'repeat_password' => __( 'Repeat the password', AI1WM_PLUGIN_NAME ), + 'passwords_do_not_match' => __( 'The passwords do not match', AI1WM_PLUGIN_NAME ), + 'import_from_file' => sprintf( + __( + 'Your file exceeds the maximum upload size for this site: %s
%s%s', + AI1WM_PLUGIN_NAME + ), + esc_html( ai1wm_size_format( wp_max_upload_size() ) ), + __( + 'How-to: Increase maximum upload file size or ', + AI1WM_PLUGIN_NAME + ), + __( + 'Get unlimited', + AI1WM_PLUGIN_NAME + ) + ), + 'invalid_archive_extension' => __( + 'The file type that you have tried to upload is not compatible with this plugin. ' . + 'Please ensure that your file is a .wpress file that was created with the All-in-One WP migration plugin. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ), + 'upgrade' => sprintf( + __( + 'The file that you are trying to import is over the maximum upload file size limit of %s.
' . + 'You can remove this restriction by purchasing our ' . + 'Unlimited Extension.', + AI1WM_PLUGIN_NAME + ), + '512MB' + ), + 'out_of_disk_space' => __( + 'There is not enough space available on the disk.
' . + 'Free up %s of disk space.', + AI1WM_PLUGIN_NAME + ), + ) + ); + } + + /** + * Enqueue scripts and styles for Backups Controller + * + * @param string $hook Hook suffix + * @return void + */ + public function enqueue_backups_scripts_and_styles( $hook ) { + if ( stripos( 'all-in-one-wp-migration_page_ai1wm_backups', $hook ) === false ) { + return; + } + + // We don't want heartbeat to occur when restoring + wp_deregister_script( 'heartbeat' ); + + // We don't want auth check for monitoring whether the user is still logged in + remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' ); + + if ( is_rtl() ) { + wp_enqueue_style( + 'ai1wm_backups', + Ai1wm_Template::asset_link( 'css/backups.min.rtl.css' ) + ); + } else { + wp_enqueue_style( + 'ai1wm_backups', + Ai1wm_Template::asset_link( 'css/backups.min.css' ) + ); + } + + wp_enqueue_script( + 'ai1wm_backups', + Ai1wm_Template::asset_link( 'javascript/backups.min.js' ), + array( 'ai1wm_util' ) + ); + + wp_localize_script( + 'ai1wm_backups', + 'ai1wm_feedback', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_feedback' ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_backups', + 'ai1wm_import', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_import' ) ) ), + ), + 'status' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1, 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_backups', + 'ai1wm_export', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_export' ) ) ), + ), + 'status' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1, 'secret_key' => get_option( AI1WM_SECRET_KEY ) ), admin_url( 'admin-ajax.php?action=ai1wm_status' ) ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_backups', + 'ai1wm_backups', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_backups' ) ), + ), + 'backups' => array( + 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_backup_list' ) ), + ), + 'labels' => array( + 'url' => wp_make_link_relative( admin_url( 'admin-ajax.php?action=ai1wm_add_backup_label' ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_backups', + 'ai1wm_disk_space', + array( + 'free' => ai1wm_disk_free_space( AI1WM_STORAGE_PATH ), + 'factor' => AI1WM_DISK_SPACE_FACTOR, + 'extra' => AI1WM_DISK_SPACE_EXTRA, + ) + ); + + wp_localize_script( + 'ai1wm_backups', + 'ai1wm_list', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_backup_list_content' ) ) ), + ), + 'download' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_import' => 1 ), admin_url( 'admin-ajax.php?action=ai1wm_backup_download_file' ) ) ), + ), + 'secret_key' => get_option( AI1WM_SECRET_KEY ), + ) + ); + + wp_localize_script( + 'ai1wm_backups', + 'ai1wm_locale', + array( + 'stop_exporting_your_website' => __( 'You are about to stop exporting your website, are you sure?', AI1WM_PLUGIN_NAME ), + 'preparing_to_export' => __( 'Preparing to export...', AI1WM_PLUGIN_NAME ), + 'unable_to_export' => __( 'Unable to export', AI1WM_PLUGIN_NAME ), + 'unable_to_start_the_export' => __( 'Unable to start the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_run_the_export' => __( 'Unable to run the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_stop_the_export' => __( 'Unable to stop the export. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'please_wait_stopping_the_export' => __( 'Please wait, stopping the export...', AI1WM_PLUGIN_NAME ), + 'close_export' => __( 'Close', AI1WM_PLUGIN_NAME ), + 'stop_export' => __( 'Stop export', AI1WM_PLUGIN_NAME ), + 'stop_importing_your_website' => __( 'You are about to stop importing your website, are you sure?', AI1WM_PLUGIN_NAME ), + 'preparing_to_import' => __( 'Preparing to import...', AI1WM_PLUGIN_NAME ), + 'unable_to_import' => __( 'Unable to import', AI1WM_PLUGIN_NAME ), + 'unable_to_start_the_import' => __( 'Unable to start the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_confirm_the_import' => __( 'Unable to confirm the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_prepare_blogs_on_import' => __( 'Unable to prepare blogs on import. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'unable_to_stop_the_import' => __( 'Unable to stop the import. Refresh the page and try again', AI1WM_PLUGIN_NAME ), + 'please_wait_stopping_the_import' => __( 'Please wait, stopping the import...', AI1WM_PLUGIN_NAME ), + 'finish_import' => __( 'Finish', AI1WM_PLUGIN_NAME ), + 'close_import' => __( 'Close', AI1WM_PLUGIN_NAME ), + 'stop_import' => __( 'Stop import', AI1WM_PLUGIN_NAME ), + 'confirm_import' => __( 'Proceed', AI1WM_PLUGIN_NAME ), + 'confirm_disk_space' => __( 'I have enough disk space', AI1WM_PLUGIN_NAME ), + 'continue_import' => __( 'Continue', AI1WM_PLUGIN_NAME ), + 'please_do_not_close_this_browser' => __( 'Please do not close this browser window or your import will fail', AI1WM_PLUGIN_NAME ), + 'leave_feedback' => __( 'Leave plugin developers any feedback here', AI1WM_PLUGIN_NAME ), + 'how_may_we_help_you' => __( 'How may we help you?', AI1WM_PLUGIN_NAME ), + 'thanks_for_submitting_your_feedback' => __( 'Thanks for submitting your feedback!', AI1WM_PLUGIN_NAME ), + 'thanks_for_submitting_your_request' => __( 'Thanks for submitting your request!', AI1WM_PLUGIN_NAME ), + 'want_to_delete_this_file' => __( 'Are you sure you want to delete this file?', AI1WM_PLUGIN_NAME ), + 'unlimited' => __( 'Restoring a backup is available via Unlimited extension. Get it here', AI1WM_PLUGIN_NAME ), + 'restore_from_file' => __( '"Restore" functionality is available in a paid extension.
You could also download the backup and then use "Import from file".', AI1WM_PLUGIN_NAME ), + 'out_of_disk_space' => __( + 'There is not enough space available on the disk.
' . + 'Free up %s of disk space.', + AI1WM_PLUGIN_NAME + ), + 'backups_count_singular' => __( 'You have %d backup', AI1WM_PLUGIN_NAME ), + 'backups_count_plural' => __( 'You have %d backups', AI1WM_PLUGIN_NAME ), + 'archive_browser_error' => __( 'Error', AI1WM_PLUGIN_NAME ), + 'archive_browser_list_error' => __( 'Error while reading backup content', AI1WM_PLUGIN_NAME ), + 'archive_browser_download_error' => __( 'Error while downloading file', AI1WM_PLUGIN_NAME ), + 'archive_browser_title' => __( 'List the content of the backup', AI1WM_PLUGIN_NAME ), + 'progress_bar_title' => __( 'Reading...', AI1WM_PLUGIN_NAME ), + 'backup_encrypted' => __( 'The backup is encrypted', AI1WM_PLUGIN_NAME ), + 'backup_encrypted_message' => __( 'Please enter a password to import the file', AI1WM_PLUGIN_NAME ), + 'submit' => __( 'Submit', AI1WM_PLUGIN_NAME ), + 'enter_password' => __( 'Enter a password', AI1WM_PLUGIN_NAME ), + 'repeat_password' => __( 'Repeat the password', AI1WM_PLUGIN_NAME ), + 'passwords_do_not_match' => __( 'The passwords do not match', AI1WM_PLUGIN_NAME ), + + ) + ); + } + + /** + * Enqueue scripts and styles for Schedules page + * + * @param string $hook Hook suffix + * @return void + */ + public function enqueue_schedules_scripts_and_styles( $hook ) { + if ( stripos( 'all-in-one-wp-migration_page_ai1wm_schedules', $hook ) === false ) { + return; + } + + // We don't want heartbeat to occur when restoring + wp_deregister_script( 'heartbeat' ); + + // We don't want auth check for monitoring whether the user is still logged in + remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' ); + + if ( is_rtl() ) { + wp_enqueue_style( + 'ai1wm_schedules', + Ai1wm_Template::asset_link( 'css/schedules.min.rtl.css' ) + ); + } else { + wp_enqueue_style( + 'ai1wm_schedules', + Ai1wm_Template::asset_link( 'css/schedules.min.css' ) + ); + } + + wp_enqueue_script( + 'ai1wm_schedules', + Ai1wm_Template::asset_link( 'javascript/schedules.min.js' ) + ); + } + + /** + * Enqueue scripts and styles for Reset page + * + * @param string $hook Hook suffix + * @return void + */ + public function enqueue_reset_scripts_and_styles( $hook ) { + if ( stripos( 'all-in-one-wp-migration_page_ai1wm_reset', $hook ) === false ) { + return; + } + + // We don't want heartbeat to occur when restoring + wp_deregister_script( 'heartbeat' ); + + // We don't want auth check for monitoring whether the user is still logged in + remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' ); + + if ( is_rtl() ) { + wp_enqueue_style( + 'ai1wm_reset', + Ai1wm_Template::asset_link( 'css/reset.min.rtl.css' ) + ); + } else { + wp_enqueue_style( + 'ai1wm_reset', + Ai1wm_Template::asset_link( 'css/reset.min.css' ) + ); + } + + wp_enqueue_script( + 'ai1wm_reset', + Ai1wm_Template::asset_link( 'javascript/reset.min.js' ) + ); + } + + /** + * Enqueue scripts and styles for Updater Controller + * + * @param string $hook Hook suffix + * @return void + */ + public function enqueue_updater_scripts_and_styles( $hook ) { + if ( 'plugins.php' !== strtolower( $hook ) ) { + return; + } + + if ( is_rtl() ) { + wp_enqueue_style( + 'ai1wm_updater', + Ai1wm_Template::asset_link( 'css/updater.min.rtl.css' ) + ); + } else { + wp_enqueue_style( + 'ai1wm_updater', + Ai1wm_Template::asset_link( 'css/updater.min.css' ) + ); + } + + wp_enqueue_script( + 'ai1wm_updater', + Ai1wm_Template::asset_link( 'javascript/updater.min.js' ), + array( 'ai1wm_util' ) + ); + + wp_localize_script( + 'ai1wm_updater', + 'ai1wm_updater', + array( + 'ajax' => array( + 'url' => wp_make_link_relative( add_query_arg( array( 'ai1wm_nonce' => wp_create_nonce( 'ai1wm_updater' ) ), admin_url( 'admin-ajax.php?action=ai1wm_updater' ) ) ), + ), + ) + ); + + wp_localize_script( + 'ai1wm_updater', + 'ai1wm_locale', + array( + 'check_for_updates' => __( 'Check for updates', AI1WM_PLUGIN_NAME ), + 'invalid_purchase_id' => __( 'Your purchase ID is invalid, please contact us', AI1WM_PLUGIN_NAME ), + ) + ); + } + + + + /** + * Outputs menu icon between head tags + * + * @return void + */ + public function admin_head() { + global $wp_version; + + // Admin header + Ai1wm_Template::render( 'main/admin-head', array( 'version' => $wp_version ) ); + } + + /** + * Register initial parameters + * + * @return void + */ + public function init() { + $user = false; + $password = false; + // Set username + if ( isset( $_SERVER['PHP_AUTH_USER'] ) ) { + $user = $_SERVER['PHP_AUTH_USER']; + } elseif ( isset( $_SERVER['REMOTE_USER'] ) ) { + $user = $_SERVER['REMOTE_USER']; + } + + // Set password + if ( isset( $_SERVER['PHP_AUTH_PW'] ) ) { + $password = $_SERVER['PHP_AUTH_PW']; + } + + if ( $user !== false && $password !== false ) { + update_option( AI1WM_AUTH_HEADER, base64_encode( sprintf( '%s:%s', $user, $password ) ) ); + } + + // Check for updates + if ( isset( $_GET['ai1wm_check_for_updates'] ) ) { + if ( check_admin_referer( 'ai1wm_check_for_updates', 'ai1wm_nonce' ) ) { + if ( current_user_can( 'update_plugins' ) ) { + Ai1wm_Updater::check_for_updates(); + } + } + } + } + + /** + * Register initial router + * + * @return void + */ + public function router() { + // Public actions + add_action( 'wp_ajax_nopriv_ai1wm_export', 'Ai1wm_Export_Controller::export' ); + add_action( 'wp_ajax_nopriv_ai1wm_import', 'Ai1wm_Import_Controller::import' ); + add_action( 'wp_ajax_nopriv_ai1wm_status', 'Ai1wm_Status_Controller::status' ); + add_action( 'wp_ajax_nopriv_ai1wm_backups', 'Ai1wm_Backups_Controller::delete' ); + add_action( 'wp_ajax_nopriv_ai1wm_feedback', 'Ai1wm_Feedback_Controller::feedback' ); + add_action( 'wp_ajax_nopriv_ai1wm_add_backup_label', 'Ai1wm_Backups_Controller::add_label' ); + add_action( 'wp_ajax_nopriv_ai1wm_backup_list', 'Ai1wm_Backups_Controller::backup_list' ); + + // Private actions + add_action( 'wp_ajax_ai1wm_export', 'Ai1wm_Export_Controller::export' ); + add_action( 'wp_ajax_ai1wm_import', 'Ai1wm_Import_Controller::import' ); + add_action( 'wp_ajax_ai1wm_status', 'Ai1wm_Status_Controller::status' ); + add_action( 'wp_ajax_ai1wm_backups', 'Ai1wm_Backups_Controller::delete' ); + add_action( 'wp_ajax_ai1wm_feedback', 'Ai1wm_Feedback_Controller::feedback' ); + add_action( 'wp_ajax_ai1wm_add_backup_label', 'Ai1wm_Backups_Controller::add_label' ); + add_action( 'wp_ajax_ai1wm_backup_list', 'Ai1wm_Backups_Controller::backup_list' ); + add_action( 'wp_ajax_ai1wm_backup_list_content', 'Ai1wm_Backups_Controller::backup_list_content' ); + add_action( 'wp_ajax_ai1wm_backup_download_file', 'Ai1wm_Backups_Controller::download_file' ); + + // Update actions + if ( current_user_can( 'update_plugins' ) ) { + add_action( 'wp_ajax_ai1wm_updater', 'Ai1wm_Updater_Controller::updater' ); + } + } + + /** + * Enable WP importing + * + * @return void + */ + public function wp_importing() { + if ( isset( $_GET['ai1wm_import'] ) ) { + if ( ! defined( 'WP_IMPORTING' ) ) { + define( 'WP_IMPORTING', true ); + } + } + } + + /** + * Add custom cron schedules + * + * @param array $schedules List of schedules + * @return array + */ + public function add_cron_schedules( $schedules ) { + $schedules['weekly'] = array( + 'display' => __( 'Weekly', AI1WM_PLUGIN_NAME ), + 'interval' => 60 * 60 * 24 * 7, + ); + $schedules['monthly'] = array( + 'display' => __( 'Monthly', AI1WM_PLUGIN_NAME ), + 'interval' => ( strtotime( '+1 month' ) - time() ), + ); + + return $schedules; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-reset-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-reset-controller.php new file mode 100644 index 0000000..2c7c650 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-reset-controller.php @@ -0,0 +1,34 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Reset_Controller { + public static function index() { + Ai1wm_Template::render( 'reset/index' ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-schedules-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-schedules-controller.php new file mode 100644 index 0000000..5887a34 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-schedules-controller.php @@ -0,0 +1,34 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Schedules_Controller { + public static function index() { + Ai1wm_Template::render( 'schedules/index' ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-status-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-status-controller.php new file mode 100644 index 0000000..9add996 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-status-controller.php @@ -0,0 +1,56 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Status_Controller { + + public static function status( $params = array() ) { + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( $_GET ); + } + + // Set secret key + $secret_key = null; + if ( isset( $params['secret_key'] ) ) { + $secret_key = trim( $params['secret_key'] ); + } + + try { + // Ensure that unauthorized people cannot access status action + ai1wm_verify_secret_key( $secret_key ); + } catch ( Ai1wm_Not_Valid_Secret_Key_Exception $e ) { + exit; + } + + ai1wm_json_response( get_option( AI1WM_STATUS, array() ) ); + exit; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-updater-controller.php b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-updater-controller.php new file mode 100644 index 0000000..7a82e98 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/controller/class-ai1wm-updater-controller.php @@ -0,0 +1,107 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Updater_Controller { + + public static function plugins_api( $result, $action = null, $args = null ) { + return Ai1wm_Updater::plugins_api( $result, $action, $args ); + } + + public static function pre_update_plugins( $transient ) { + if ( empty( $transient->checked ) ) { + return $transient; + } + + // Check for updates every 11 hours + if ( ( $last_check_for_updates = get_site_transient( AI1WM_LAST_CHECK_FOR_UPDATES ) ) ) { + if ( ( time() - $last_check_for_updates ) < 11 * HOUR_IN_SECONDS ) { + return $transient; + } + } + + // Set last check for updates + set_site_transient( AI1WM_LAST_CHECK_FOR_UPDATES, time() ); + + // Check for updates + Ai1wm_Updater::check_for_updates(); + + return $transient; + } + + public static function update_plugins( $transient ) { + return Ai1wm_Updater::update_plugins( $transient ); + } + + public static function check_for_updates() { + return Ai1wm_Updater::check_for_updates(); + } + + public static function plugin_row_meta( $plugin_meta, $plugin_file ) { + return Ai1wm_Updater::plugin_row_meta( $plugin_meta, $plugin_file ); + } + + public static function in_plugin_update_message( $plugin_data, $response ) { + $updater = get_option( AI1WM_UPDATER, array() ); + + // Get updater details + if ( isset( $updater[ $plugin_data['slug'] ]['update_message'] ) ) { + Ai1wm_Template::render( 'updater/update', array( 'message' => $updater[ $plugin_data['slug'] ]['update_message'] ) ); + } + } + + public static function updater( $params = array() ) { + if ( check_ajax_referer( 'ai1wm_updater', 'ai1wm_nonce' ) ) { + ai1wm_setup_environment(); + + // Set params + if ( empty( $params ) ) { + $params = stripslashes_deep( $_POST ); + } + + // Set uuid + $uuid = null; + if ( isset( $params['ai1wm_uuid'] ) ) { + $uuid = trim( $params['ai1wm_uuid'] ); + } + + // Set extension + $extension = null; + if ( isset( $params['ai1wm_extension'] ) ) { + $extension = trim( $params['ai1wm_extension'] ); + } + + $extensions = Ai1wm_Extensions::get(); + + // Verify whether extension exists + if ( isset( $extensions[ $extension ] ) ) { + update_option( $extensions[ $extension ]['key'], $uuid ); + } + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-backups.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-backups.php new file mode 100644 index 0000000..ec1d5a1 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-backups.php @@ -0,0 +1,182 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Backups { + + /** + * Get all backup files + * + * @return array + */ + public static function get_files() { + $backups = array(); + + try { + + // Iterate over directory + $iterator = new Ai1wm_Recursive_Directory_Iterator( AI1WM_BACKUPS_PATH ); + + // Filter by extensions + $iterator = new Ai1wm_Recursive_Extension_Filter( $iterator, array( 'wpress' ) ); + + // Recursively iterate over directory + $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD ); + + // Get backup files + foreach ( $iterator as $item ) { + try { + if ( ai1wm_is_filesize_supported( $item->getPathname() ) ) { + $backups[] = array( + 'path' => $iterator->getSubPath(), + 'filename' => $iterator->getSubPathname(), + 'mtime' => $iterator->getMTime(), + 'size' => $iterator->getSize(), + ); + } else { + $backups[] = array( + 'path' => $iterator->getSubPath(), + 'filename' => $iterator->getSubPathname(), + 'mtime' => $iterator->getMTime(), + 'size' => null, + ); + } + } catch ( Exception $e ) { + $backups[] = array( + 'path' => $iterator->getSubPath(), + 'filename' => $iterator->getSubPathname(), + 'mtime' => null, + 'size' => null, + ); + } + } + + // Sort backups modified date + usort( $backups, 'Ai1wm_Backups::compare' ); + + } catch ( Exception $e ) { + } + + return $backups; + } + + /** + * Count all backup files + * + * @return integer + */ + public static function count_files() { + return count( Ai1wm_Backups::get_files() ); + } + + /** + * Delete backup file + * + * @param string $file File name + * @return boolean + */ + public static function delete_file( $file ) { + if ( ai1wm_is_filename_supported( $file ) ) { + return @unlink( ai1wm_backup_path( array( 'archive' => $file ) ) ); + } + } + + /** + * Get all backup labels + * + * @return array + */ + public static function get_labels() { + return get_option( AI1WM_BACKUPS_LABELS, array() ); + } + + /** + * Set backup label + * + * @param string $file File name + * @param string $label File label + * @return boolean + */ + public static function set_label( $file, $label ) { + if ( ( $labels = get_option( AI1WM_BACKUPS_LABELS, array() ) ) !== false ) { + $labels[ $file ] = $label; + } + + return update_option( AI1WM_BACKUPS_LABELS, $labels ); + } + + /** + * Delete backup label + * + * @param string $file File name + * @return boolean + */ + public static function delete_label( $file ) { + if ( ( $labels = get_option( AI1WM_BACKUPS_LABELS, array() ) ) !== false ) { + unset( $labels[ $file ] ); + } + + return update_option( AI1WM_BACKUPS_LABELS, $labels ); + } + + /** + * Compare backup files by modified time + * + * @param array $a File item A + * @param array $b File item B + * @return integer + */ + public static function compare( $a, $b ) { + if ( $a['mtime'] === $b['mtime'] ) { + return 0; + } + + return ( $a['mtime'] > $b['mtime'] ) ? - 1 : 1; + } + + /** + * Check if backups are downloadable + */ + public static function are_downloadable() { + static $downloadable = null; + if ( is_null( $downloadable ) ) { + $downloadable = Ai1wm_Backups::are_in_wp_content_folder() || strpos( AI1WM_BACKUPS_PATH, untrailingslashit( ABSPATH ) ) === 0; + } + + return $downloadable; + } + + public static function are_in_wp_content_folder() { + static $in_wp_content = null; + if ( is_null( $in_wp_content ) ) { + $in_wp_content = strpos( AI1WM_BACKUPS_PATH, untrailingslashit( WP_CONTENT_DIR ) ) === 0; + } + + return $in_wp_content; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-compatibility.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-compatibility.php new file mode 100644 index 0000000..8e9372c --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-compatibility.php @@ -0,0 +1,69 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Compatibility { + + public static function get( $params ) { + $extensions = Ai1wm_Extensions::get(); + + foreach ( $extensions as $extension_name => $extension_data ) { + if ( ! isset( $params[ $extension_data['short'] ] ) ) { + unset( $extensions[ $extension_name ] ); + } + } + + // If no extension is used, update everything that is available + if ( empty( $extensions ) ) { + $extensions = Ai1wm_Extensions::get(); + } + + $messages = array(); + foreach ( $extensions as $extension_name => $extension_data ) { + if ( ! Ai1wm_Compatibility::check( $extension_data ) ) { + if ( defined( 'WP_CLI' ) ) { + $messages[] = sprintf( __( '%s is not the latest version. You must update the plugin before you can use it. ', AI1WM_PLUGIN_NAME ), $extension_data['title'] ); + } else { + $messages[] = sprintf( __( '%s is not the latest version. You must update the plugin before you can use it.
', AI1WM_PLUGIN_NAME ), $extension_data['title'], network_admin_url( 'plugins.php' ) ); + } + } + } + + return $messages; + } + + public static function check( $extension ) { + if ( $extension['version'] !== 'develop' ) { + if ( version_compare( $extension['version'], $extension['requires'], '<' ) ) { + return false; + } + } + + return true; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-deprecated.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-deprecated.php new file mode 100644 index 0000000..0cfefd1 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-deprecated.php @@ -0,0 +1,32 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Abstract {} +class Ai1wm_Import_Abstract {} +class Ai1wm_Config {} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-extensions.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-extensions.php new file mode 100644 index 0000000..b6fb32a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-extensions.php @@ -0,0 +1,350 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Extensions { + + /** + * Get active extensions + * + * @return array + */ + public static function get() { + $extensions = array(); + + // Add Microsoft Azure Extension + if ( defined( 'AI1WMZE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMZE_PLUGIN_NAME ] = array( + 'key' => AI1WMZE_PLUGIN_KEY, + 'title' => AI1WMZE_PLUGIN_TITLE, + 'about' => AI1WMZE_PLUGIN_ABOUT, + 'check' => AI1WMZE_PLUGIN_CHECK, + 'basename' => AI1WMZE_PLUGIN_BASENAME, + 'version' => AI1WMZE_VERSION, + 'requires' => '1.41', + 'short' => AI1WMZE_PLUGIN_SHORT, + ); + } + + // Add Backblaze B2 Extension + if ( defined( 'AI1WMAE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMAE_PLUGIN_NAME ] = array( + 'key' => AI1WMAE_PLUGIN_KEY, + 'title' => AI1WMAE_PLUGIN_TITLE, + 'about' => AI1WMAE_PLUGIN_ABOUT, + 'check' => AI1WMAE_PLUGIN_CHECK, + 'basename' => AI1WMAE_PLUGIN_BASENAME, + 'version' => AI1WMAE_VERSION, + 'requires' => '1.46', + 'short' => AI1WMAE_PLUGIN_SHORT, + ); + } + + // Add Backup Plugin + if ( defined( 'AI1WMVE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMVE_PLUGIN_NAME ] = array( + 'key' => AI1WMVE_PLUGIN_KEY, + 'title' => AI1WMVE_PLUGIN_TITLE, + 'about' => AI1WMVE_PLUGIN_ABOUT, + 'check' => AI1WMVE_PLUGIN_CHECK, + 'basename' => AI1WMVE_PLUGIN_BASENAME, + 'version' => AI1WMVE_VERSION, + 'requires' => '1.0', + 'short' => AI1WMVE_PLUGIN_SHORT, + ); + } + + // Add Box Extension + if ( defined( 'AI1WMBE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMBE_PLUGIN_NAME ] = array( + 'key' => AI1WMBE_PLUGIN_KEY, + 'title' => AI1WMBE_PLUGIN_TITLE, + 'about' => AI1WMBE_PLUGIN_ABOUT, + 'check' => AI1WMBE_PLUGIN_CHECK, + 'basename' => AI1WMBE_PLUGIN_BASENAME, + 'version' => AI1WMBE_VERSION, + 'requires' => '1.57', + 'short' => AI1WMBE_PLUGIN_SHORT, + ); + } + + // Add DigitalOcean Spaces Extension + if ( defined( 'AI1WMIE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMIE_PLUGIN_NAME ] = array( + 'key' => AI1WMIE_PLUGIN_KEY, + 'title' => AI1WMIE_PLUGIN_TITLE, + 'about' => AI1WMIE_PLUGIN_ABOUT, + 'check' => AI1WMIE_PLUGIN_CHECK, + 'basename' => AI1WMIE_PLUGIN_BASENAME, + 'version' => AI1WMIE_VERSION, + 'requires' => '1.57', + 'short' => AI1WMIE_PLUGIN_SHORT, + ); + } + + // Add Direct Extension + if ( defined( 'AI1WMXE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMXE_PLUGIN_NAME ] = array( + 'key' => AI1WMXE_PLUGIN_KEY, + 'title' => AI1WMXE_PLUGIN_TITLE, + 'about' => AI1WMXE_PLUGIN_ABOUT, + 'check' => AI1WMXE_PLUGIN_CHECK, + 'basename' => AI1WMXE_PLUGIN_BASENAME, + 'version' => AI1WMXE_VERSION, + 'requires' => '1.26', + 'short' => AI1WMXE_PLUGIN_SHORT, + ); + } + + // Add Dropbox Extension + if ( defined( 'AI1WMDE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMDE_PLUGIN_NAME ] = array( + 'key' => AI1WMDE_PLUGIN_KEY, + 'title' => AI1WMDE_PLUGIN_TITLE, + 'about' => AI1WMDE_PLUGIN_ABOUT, + 'check' => AI1WMDE_PLUGIN_CHECK, + 'basename' => AI1WMDE_PLUGIN_BASENAME, + 'version' => AI1WMDE_VERSION, + 'requires' => '3.81', + 'short' => AI1WMDE_PLUGIN_SHORT, + ); + } + + // Add File Extension + if ( defined( 'AI1WMTE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMTE_PLUGIN_NAME ] = array( + 'key' => AI1WMTE_PLUGIN_KEY, + 'title' => AI1WMTE_PLUGIN_TITLE, + 'about' => AI1WMTE_PLUGIN_ABOUT, + 'check' => AI1WMTE_PLUGIN_CHECK, + 'basename' => AI1WMTE_PLUGIN_BASENAME, + 'version' => AI1WMTE_VERSION, + 'requires' => '1.5', + 'short' => AI1WMTE_PLUGIN_SHORT, + ); + } + + // Add FTP Extension + if ( defined( 'AI1WMFE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMFE_PLUGIN_NAME ] = array( + 'key' => AI1WMFE_PLUGIN_KEY, + 'title' => AI1WMFE_PLUGIN_TITLE, + 'about' => AI1WMFE_PLUGIN_ABOUT, + 'check' => AI1WMFE_PLUGIN_CHECK, + 'basename' => AI1WMFE_PLUGIN_BASENAME, + 'version' => AI1WMFE_VERSION, + 'requires' => '2.80', + 'short' => AI1WMFE_PLUGIN_SHORT, + ); + } + + // Add Google Cloud Storage Extension + if ( defined( 'AI1WMCE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMCE_PLUGIN_NAME ] = array( + 'key' => AI1WMCE_PLUGIN_KEY, + 'title' => AI1WMCE_PLUGIN_TITLE, + 'about' => AI1WMCE_PLUGIN_ABOUT, + 'check' => AI1WMCE_PLUGIN_CHECK, + 'basename' => AI1WMCE_PLUGIN_BASENAME, + 'version' => AI1WMCE_VERSION, + 'requires' => '1.49', + 'short' => AI1WMCE_PLUGIN_SHORT, + ); + } + + // Add Google Drive Extension + if ( defined( 'AI1WMGE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMGE_PLUGIN_NAME ] = array( + 'key' => AI1WMGE_PLUGIN_KEY, + 'title' => AI1WMGE_PLUGIN_TITLE, + 'about' => AI1WMGE_PLUGIN_ABOUT, + 'check' => AI1WMGE_PLUGIN_CHECK, + 'basename' => AI1WMGE_PLUGIN_BASENAME, + 'version' => AI1WMGE_VERSION, + 'requires' => '2.85', + 'short' => AI1WMGE_PLUGIN_SHORT, + ); + } + + // Add Amazon Glacier Extension + if ( defined( 'AI1WMRE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMRE_PLUGIN_NAME ] = array( + 'key' => AI1WMRE_PLUGIN_KEY, + 'title' => AI1WMRE_PLUGIN_TITLE, + 'about' => AI1WMRE_PLUGIN_ABOUT, + 'check' => AI1WMRE_PLUGIN_CHECK, + 'basename' => AI1WMRE_PLUGIN_BASENAME, + 'version' => AI1WMRE_VERSION, + 'requires' => '1.43', + 'short' => AI1WMRE_PLUGIN_SHORT, + ); + } + + // Add Mega Extension + if ( defined( 'AI1WMEE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMEE_PLUGIN_NAME ] = array( + 'key' => AI1WMEE_PLUGIN_KEY, + 'title' => AI1WMEE_PLUGIN_TITLE, + 'about' => AI1WMEE_PLUGIN_ABOUT, + 'check' => AI1WMEE_PLUGIN_CHECK, + 'basename' => AI1WMEE_PLUGIN_BASENAME, + 'version' => AI1WMEE_VERSION, + 'requires' => '1.50', + 'short' => AI1WMEE_PLUGIN_SHORT, + ); + } + + // Add Multisite Extension + if ( defined( 'AI1WMME_PLUGIN_NAME' ) ) { + $extensions[ AI1WMME_PLUGIN_NAME ] = array( + 'key' => AI1WMME_PLUGIN_KEY, + 'title' => AI1WMME_PLUGIN_TITLE, + 'about' => AI1WMME_PLUGIN_ABOUT, + 'check' => AI1WMME_PLUGIN_CHECK, + 'basename' => AI1WMME_PLUGIN_BASENAME, + 'version' => AI1WMME_VERSION, + 'requires' => '4.33', + 'short' => AI1WMME_PLUGIN_SHORT, + ); + } + + // Add OneDrive Extension + if ( defined( 'AI1WMOE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMOE_PLUGIN_NAME ] = array( + 'key' => AI1WMOE_PLUGIN_KEY, + 'title' => AI1WMOE_PLUGIN_TITLE, + 'about' => AI1WMOE_PLUGIN_ABOUT, + 'check' => AI1WMOE_PLUGIN_CHECK, + 'basename' => AI1WMOE_PLUGIN_BASENAME, + 'version' => AI1WMOE_VERSION, + 'requires' => '1.70', + 'short' => AI1WMOE_PLUGIN_SHORT, + ); + } + + // Add pCloud Extension + if ( defined( 'AI1WMPE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMPE_PLUGIN_NAME ] = array( + 'key' => AI1WMPE_PLUGIN_KEY, + 'title' => AI1WMPE_PLUGIN_TITLE, + 'about' => AI1WMPE_PLUGIN_ABOUT, + 'check' => AI1WMPE_PLUGIN_CHECK, + 'basename' => AI1WMPE_PLUGIN_BASENAME, + 'version' => AI1WMPE_VERSION, + 'requires' => '1.44', + 'short' => AI1WMPE_PLUGIN_SHORT, + ); + } + + // Add Pro Plugin + if ( defined( 'AI1WMKE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMKE_PLUGIN_NAME ] = array( + 'key' => AI1WMKE_PLUGIN_KEY, + 'title' => AI1WMKE_PLUGIN_TITLE, + 'about' => AI1WMKE_PLUGIN_ABOUT, + 'check' => AI1WMKE_PLUGIN_CHECK, + 'basename' => AI1WMKE_PLUGIN_BASENAME, + 'version' => AI1WMKE_VERSION, + 'requires' => '1.0', + 'short' => AI1WMKE_PLUGIN_SHORT, + ); + } + + // Add S3 Client Extension + if ( defined( 'AI1WMNE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMNE_PLUGIN_NAME ] = array( + 'key' => AI1WMNE_PLUGIN_KEY, + 'title' => AI1WMNE_PLUGIN_TITLE, + 'about' => AI1WMNE_PLUGIN_ABOUT, + 'check' => AI1WMNE_PLUGIN_CHECK, + 'basename' => AI1WMNE_PLUGIN_BASENAME, + 'version' => AI1WMNE_VERSION, + 'requires' => '1.41', + 'short' => AI1WMNE_PLUGIN_SHORT, + ); + } + + // Add Amazon S3 Extension + if ( defined( 'AI1WMSE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMSE_PLUGIN_NAME ] = array( + 'key' => AI1WMSE_PLUGIN_KEY, + 'title' => AI1WMSE_PLUGIN_TITLE, + 'about' => AI1WMSE_PLUGIN_ABOUT, + 'check' => AI1WMSE_PLUGIN_CHECK, + 'basename' => AI1WMSE_PLUGIN_BASENAME, + 'version' => AI1WMSE_VERSION, + 'requires' => '3.81', + 'short' => AI1WMSE_PLUGIN_SHORT, + ); + } + + // Add Unlimited Extension + if ( defined( 'AI1WMUE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMUE_PLUGIN_NAME ] = array( + 'key' => AI1WMUE_PLUGIN_KEY, + 'title' => AI1WMUE_PLUGIN_TITLE, + 'about' => AI1WMUE_PLUGIN_ABOUT, + 'check' => AI1WMUE_PLUGIN_CHECK, + 'basename' => AI1WMUE_PLUGIN_BASENAME, + 'version' => AI1WMUE_VERSION, + 'requires' => '2.55', + 'short' => AI1WMUE_PLUGIN_SHORT, + ); + } + + // Add URL Extension + if ( defined( 'AI1WMLE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMLE_PLUGIN_NAME ] = array( + 'key' => AI1WMLE_PLUGIN_KEY, + 'title' => AI1WMLE_PLUGIN_TITLE, + 'about' => AI1WMLE_PLUGIN_ABOUT, + 'check' => AI1WMLE_PLUGIN_CHECK, + 'basename' => AI1WMLE_PLUGIN_BASENAME, + 'version' => AI1WMLE_VERSION, + 'requires' => '2.67', + 'short' => AI1WMLE_PLUGIN_SHORT, + ); + } + + // Add WebDAV Extension + if ( defined( 'AI1WMWE_PLUGIN_NAME' ) ) { + $extensions[ AI1WMWE_PLUGIN_NAME ] = array( + 'key' => AI1WMWE_PLUGIN_KEY, + 'title' => AI1WMWE_PLUGIN_TITLE, + 'about' => AI1WMWE_PLUGIN_ABOUT, + 'check' => AI1WMWE_PLUGIN_CHECK, + 'basename' => AI1WMWE_PLUGIN_BASENAME, + 'version' => AI1WMWE_VERSION, + 'requires' => '1.38', + 'short' => AI1WMWE_PLUGIN_SHORT, + ); + } + + return $extensions; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-feedback.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-feedback.php new file mode 100644 index 0000000..290f9ef --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-feedback.php @@ -0,0 +1,83 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Feedback { + + /** + * Submit customer feedback to servmask.com + * + * @param string $type Feedback type + * @param string $email User e-mail + * @param string $message User message + * @param integer $terms User accept terms + * @param string $purchases Purchases IDs + * + * @return array + */ + public static function add( $type, $email, $message, $terms, $purchases ) { + // Validate email + if ( filter_var( $email, FILTER_VALIDATE_EMAIL ) === false ) { + throw new Ai1wm_Feedback_Exception( __( 'Your email is not valid.', AI1WM_PLUGIN_NAME ) ); + } + + // Validate type + if ( empty( $type ) ) { + throw new Ai1wm_Feedback_Exception( __( 'Feedback type is not valid.', AI1WM_PLUGIN_NAME ) ); + } + + // Validate message + if ( empty( $message ) ) { + throw new Ai1wm_Feedback_Exception( __( 'Please enter comments in the text area.', AI1WM_PLUGIN_NAME ) ); + } + + // Validate terms + if ( empty( $terms ) ) { + throw new Ai1wm_Feedback_Exception( __( 'Please accept feedback term conditions.', AI1WM_PLUGIN_NAME ) ); + } + + $response = wp_remote_post( + AI1WM_FEEDBACK_URL, + array( + 'timeout' => 15, + 'body' => array( + 'type' => $type, + 'email' => $email, + 'message' => $message, + 'purchases' => $purchases, + ), + ) + ); + + if ( is_wp_error( $response ) ) { + throw new Ai1wm_Feedback_Exception( sprintf( __( 'Something went wrong: %s', AI1WM_PLUGIN_NAME ), $response->get_error_message() ) ); + } + + return $response; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-handler.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-handler.php new file mode 100644 index 0000000..1f97cc3 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-handler.php @@ -0,0 +1,62 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Handler { + + /** + * Error handler + * + * @param integer $errno Error level + * @param string $errstr Error message + * @param string $errfile Error file + * @param integer $errline Error line + * @return void + */ + public static function error( $errno, $errstr, $errfile, $errline ) { + Ai1wm_Log::error( + array( + 'Number' => $errno, + 'Message' => $errstr, + 'File' => $errfile, + 'Line' => $errline, + ) + ); + } + + /** + * Shutdown handler + * + * @return void + */ + public static function shutdown() { + if ( ( $error = error_get_last() ) ) { + Ai1wm_Log::error( $error ); + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-log.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-log.php new file mode 100644 index 0000000..ced2246 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-log.php @@ -0,0 +1,50 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Log { + + public static function error( $params ) { + $data = array(); + + // Add date + $data[] = date( 'M d Y H:i:s' ); + + // Add params + $data[] = json_encode( $params ); + + // Add empty line + $data[] = PHP_EOL; + + // Write log data + if ( $handle = ai1wm_open( ai1wm_error_path(), 'a' ) ) { + ai1wm_write( $handle, implode( PHP_EOL, $data ) ); + ai1wm_close( $handle ); + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-message.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-message.php new file mode 100644 index 0000000..f4e76e4 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-message.php @@ -0,0 +1,63 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Message { + + public static function flash( $type, $message ) { + if ( ( $messages = get_option( AI1WM_MESSAGES, array() ) ) !== false ) { + return update_option( AI1WM_MESSAGES, array_merge( $messages, array( $type => $message ) ) ); + } + + return false; + } + + public static function has( $type ) { + if ( ( $messages = get_option( AI1WM_MESSAGES, array() ) ) ) { + if ( isset( $messages[ $type ] ) ) { + return true; + } + } + + return false; + } + + public static function get( $type ) { + $message = null; + if ( ( $messages = get_option( AI1WM_MESSAGES, array() ) ) ) { + if ( isset( $messages[ $type ] ) && ( $message = $messages[ $type ] ) ) { + unset( $messages[ $type ] ); + } + + // Set messages + update_option( AI1WM_MESSAGES, $messages ); + } + + return $message; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-notification.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-notification.php new file mode 100644 index 0000000..1d39977 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-notification.php @@ -0,0 +1,85 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Notification { + + public static function ok( $subject, $message ) { + // Enable notifications + if ( ! apply_filters( 'ai1wm_notification_ok_toggle', false ) ) { + return; + } + + // Set email + if ( ! ( $email = apply_filters( 'ai1wm_notification_ok_email', get_option( 'admin_email', false ) ) ) ) { + return; + } + + // Set subject + if ( ! ( $subject = apply_filters( 'ai1wm_notification_ok_subject', $subject ) ) ) { + return; + } + + // Set message + if ( ! ( $message = apply_filters( 'ai1wm_notification_ok_message', $message ) ) ) { + return; + } + + // Send email + if ( ai1wm_is_scheduled_backup() ) { + wp_mail( $email, $subject, $message, array( 'Content-Type: text/html; charset=UTF-8' ) ); + } + } + + public static function error( $subject, $message ) { + // Enable notifications + if ( ! apply_filters( 'ai1wm_notification_error_toggle', false ) ) { + return; + } + + // Set email + if ( ! ( $email = apply_filters( 'ai1wm_notification_error_email', get_option( 'admin_email', false ) ) ) ) { + return; + } + + // Set subject + if ( ! ( $subject = apply_filters( 'ai1wm_notification_error_subject', $subject ) ) ) { + return; + } + + // Set message + if ( ! ( $message = apply_filters( 'ai1wm_notification_error_message', $message ) ) ) { + return; + } + + // Send email + if ( ai1wm_is_scheduled_backup() ) { + wp_mail( $email, $subject, $message, array( 'Content-Type: text/html; charset=UTF-8' ) ); + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-status.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-status.php new file mode 100644 index 0000000..b35bddb --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-status.php @@ -0,0 +1,77 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Status { + + public static function error( $title, $message ) { + self::log( array( 'type' => 'error', 'title' => $title, 'message' => $message ) ); + } + + public static function info( $message ) { + self::log( array( 'type' => 'info', 'message' => $message ) ); + } + + public static function download( $message ) { + self::log( array( 'type' => 'download', 'message' => $message ) ); + } + + public static function disk_space_confirm( $message ) { + self::log( array( 'type' => 'disk_space_confirm', 'message' => $message ) ); + } + + public static function confirm( $message ) { + self::log( array( 'type' => 'confirm', 'message' => $message ) ); + } + + public static function done( $title, $message = null ) { + self::log( array( 'type' => 'done', 'title' => $title, 'message' => $message ) ); + } + + public static function blogs( $title, $message ) { + self::log( array( 'type' => 'blogs', 'title' => $title, 'message' => $message ) ); + } + + public static function progress( $percent ) { + self::log( array( 'type' => 'progress', 'percent' => $percent ) ); + } + + public static function backup_is_encrypted( $error ) { + self::log( array( 'type' => 'backup_is_encrypted', 'error' => $error ) ); + } + + public static function server_cannot_decrypt( $message ) { + self::log( array( 'type' => 'server_cannot_decrypt', 'message' => $message ) ); + } + + public static function log( $data ) { + if ( ! ai1wm_is_scheduled_backup() ) { + update_option( AI1WM_STATUS, $data ); + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-template.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-template.php new file mode 100644 index 0000000..a9cfa8d --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-template.php @@ -0,0 +1,66 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Template extends Bandar { + + /** + * Renders a file and returns its contents + * + * @param string $view View to render + * @param array $args Set of arguments + * @param string|bool $path Path to template + * @return string Rendered view + */ + public static function render( $view, $args = array(), $path = false ) { + parent::render( $view, $args, $path ); + } + + /** + * Returns link to an asset file + * + * @param string $asset Asset file + * @param string $prefix Asset prefix + * @return string Asset URL + */ + public static function asset_link( $asset, $prefix = 'AI1WM' ) { + return constant( $prefix . '_URL' ) . '/lib/view/assets/' . $asset . '?v=' . constant( $prefix . '_VERSION' ); + } + + /** + * Renders a file and gets its contents + * + * @param string $view View to render + * @param array $args Set of arguments + * @param string|bool $path Path to template + * @return string Rendered view + */ + public static function get_content( $view, $args = array(), $path = false ) { + return parent::getTemplateContent( $view, $args, $path ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-updater.php b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-updater.php new file mode 100644 index 0000000..211b2dd --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/class-ai1wm-updater.php @@ -0,0 +1,214 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Updater { + + /** + * Retrieve plugin installer pages from WordPress Plugins API. + * + * @param mixed $result + * @param string $action + * @param array|object $args + * @return mixed + */ + public static function plugins_api( $result, $action = null, $args = null ) { + if ( empty( $args->slug ) ) { + return $result; + } + + // Get extensions + $extensions = Ai1wm_Extensions::get(); + + // View details page + if ( isset( $extensions[ $args->slug ] ) && $action === 'plugin_information' ) { + $updater = get_option( AI1WM_UPDATER, array() ); + + // Plugin details + if ( isset( $updater[ $args->slug ] ) ) { + return (object) $updater[ $args->slug ]; + } + } + + return $result; + } + + /** + * Update WordPress plugin list page. + * + * @param object $transient + * @return object + */ + public static function update_plugins( $transient ) { + global $wp_version; + + // Creating default object from empty value + if ( ! is_object( $transient ) ) { + $transient = (object) array(); + } + + // Get extensions + $extensions = Ai1wm_Extensions::get(); + + // Get current updates + $updater = get_option( AI1WM_UPDATER, array() ); + + // Get extension updates + foreach ( $updater as $slug => $update ) { + if ( isset( $extensions[ $slug ], $update['version'], $update['homepage'], $update['download_link'], $update['icons'] ) ) { + if ( ( $purchase_id = get_option( $extensions[ $slug ]['key'] ) ) ) { + + // Get download URL + if ( $slug === 'all-in-one-wp-migration-file-extension' ) { + $download_url = add_query_arg( array( 'siteurl' => get_site_url() ), sprintf( '%s', $update['download_link'] ) ); + } else { + $download_url = add_query_arg( array( 'siteurl' => get_site_url() ), sprintf( '%s/%s', $update['download_link'], $purchase_id ) ); + } + + // Set plugin details + $plugin_details = (object) array( + 'slug' => $slug, + 'new_version' => $update['version'], + 'url' => $update['homepage'], + 'plugin' => $extensions[ $slug ]['basename'], + 'package' => $download_url, + 'tested' => $wp_version, + 'icons' => $update['icons'], + ); + + // Enable auto updates + if ( version_compare( $extensions[ $slug ]['version'], $update['version'], '<' ) ) { + $transient->response[ $extensions[ $slug ]['basename'] ] = $plugin_details; + } else { + $transient->no_update[ $extensions[ $slug ]['basename'] ] = $plugin_details; + } + } + } + } + + return $transient; + } + + /** + * Check for extension updates + * + * @return boolean + */ + public static function check_for_updates() { + $updater = get_option( AI1WM_UPDATER, array() ); + + // Get extension updates + foreach ( Ai1wm_Extensions::get() as $slug => $extension ) { + $about = wp_remote_get( + $extension['about'], + array( + 'timeout' => 15, + 'headers' => array( 'Accept' => 'application/json' ), + ) + ); + + // Add plugin updates + if ( is_wp_error( $about ) ) { + $updater[ $slug ]['error_message'] = $about->get_error_message(); + } else { + $body = wp_remote_retrieve_body( $about ); + if ( ( $data = json_decode( $body, true ) ) ) { + if ( isset( $data['slug'], $data['version'], $data['homepage'], $data['download_link'], $data['icons'] ) ) { + $updater[ $slug ] = $data; + } + } + + // Add plugin messages + if ( $slug !== 'all-in-one-wp-migration-file-extension' ) { + if ( ( $purchase_id = get_option( $extension['key'] ) ) ) { + $check = wp_remote_get( + add_query_arg( array( 'site_url' => get_site_url(), 'admin_email' => get_option( 'admin_email' ) ), sprintf( '%s/%s', $extension['check'], $purchase_id ) ), + array( + 'timeout' => 15, + 'headers' => array( 'Accept' => 'application/json' ), + ) + ); + + // Add plugin checks + if ( is_wp_error( $check ) ) { + $updater[ $slug ]['error_message'] = $check->get_error_message(); + } else { + $body = wp_remote_retrieve_body( $check ); + if ( ( $data = json_decode( $body, true ) ) ) { + if ( isset( $updater[ $slug ], $data['message'] ) ) { + $updater[ $slug ]['update_message'] = $data['message']; + } + } + } + } + } + } + } + + return update_option( AI1WM_UPDATER, $updater ); + } + + /** + * Add "Check for updates" link + * + * @param array $plugin_meta An array of the plugin's metadata, including the version, author, author URI, and plugin URI + * @param string $plugin_file Path to the plugin file relative to the plugins directory + * @return array + */ + public static function plugin_row_meta( $plugin_meta, $plugin_file ) { + $modal_index = 0; + + // Get current updates + $updater = get_option( AI1WM_UPDATER, array() ); + + // Add link for each extension + foreach ( Ai1wm_Extensions::get() as $slug => $extension ) { + $modal_index++; + + // Get plugin details + if ( $plugin_file === $extension['basename'] ) { + + // Get updater URL + $updater_url = add_query_arg( array( 'ai1wm_check_for_updates' => 1, 'ai1wm_nonce' => wp_create_nonce( 'ai1wm_check_for_updates' ) ), network_admin_url( 'plugins.php' ) ); + + // Check purchase ID + if ( get_option( $extension['key'] ) ) { + $plugin_meta[] = Ai1wm_Template::get_content( 'updater/check', array( 'url' => $updater_url ) ); + } else { + $plugin_meta[] = Ai1wm_Template::get_content( 'updater/modal', array( 'url' => $updater_url, 'modal' => $modal_index ) ); + } + // Check error message + if ( isset( $updater[ $slug ]['error_message'] ) ) { + $plugin_meta[] = Ai1wm_Template::get_content( 'updater/error', array( 'message' => $updater[ $slug ]['error_message'] ) ); + } + } + } + + return $plugin_meta; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-archive.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-archive.php new file mode 100644 index 0000000..af0edc2 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-archive.php @@ -0,0 +1,46 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Archive { + + public static function execute( $params ) { + + // Set progress + Ai1wm_Status::info( __( 'Creating an empty archive...', AI1WM_PLUGIN_NAME ) ); + + // Create empty archive file + $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); + $archive->close(); + + // Set progress + Ai1wm_Status::info( __( 'Done creating an empty archive.', AI1WM_PLUGIN_NAME ) ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-clean.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-clean.php new file mode 100644 index 0000000..bd2aeb9 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-clean.php @@ -0,0 +1,44 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Clean { + + public static function execute( $params ) { + + // Delete storage files + Ai1wm_Directory::delete( ai1wm_storage_path( $params ) ); + + // Exit in console + if ( defined( 'WP_CLI' ) ) { + return $params; + } + + exit; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-compatibility.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-compatibility.php new file mode 100644 index 0000000..0ce3fac --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-compatibility.php @@ -0,0 +1,48 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Compatibility { + + public static function execute( $params ) { + + // Set progress + Ai1wm_Status::info( __( 'Checking extensions compatibility...', AI1WM_PLUGIN_NAME ) ); + + // Get messages + $messages = Ai1wm_Compatibility::get( $params ); + + // Set messages + if ( empty( $messages ) ) { + return $params; + } + + // Error message + throw new Ai1wm_Compatibility_Exception( implode( $messages ) ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-config-file.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-config-file.php new file mode 100644 index 0000000..640e8a0 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-config-file.php @@ -0,0 +1,119 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Config_File { + + public static function execute( $params ) { + + $package_bytes_written = 0; + + // Set archive bytes offset + if ( isset( $params['archive_bytes_offset'] ) ) { + $archive_bytes_offset = (int) $params['archive_bytes_offset']; + } else { + $archive_bytes_offset = ai1wm_archive_bytes( $params ); + } + + // Set package bytes offset + if ( isset( $params['package_bytes_offset'] ) ) { + $package_bytes_offset = (int) $params['package_bytes_offset']; + } else { + $package_bytes_offset = 0; + } + + // Get total package size + if ( isset( $params['total_package_size'] ) ) { + $total_package_size = (int) $params['total_package_size']; + } else { + $total_package_size = ai1wm_package_bytes( $params ); + } + + // What percent of package have we processed? + $progress = (int) min( ( $package_bytes_offset / $total_package_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving configuration file...
%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) ); + + // Open the archive file for writing + $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); + + // Set the file pointer to the one that we have saved + $archive->set_file_pointer( $archive_bytes_offset ); + + // Add package.json to archive + if ( $archive->add_file( ai1wm_package_path( $params ), AI1WM_PACKAGE_NAME, $package_bytes_written, $package_bytes_offset ) ) { + + // Set progress + Ai1wm_Status::info( __( 'Done archiving configuration file.', AI1WM_PLUGIN_NAME ) ); + + // Unset archive bytes offset + unset( $params['archive_bytes_offset'] ); + + // Unset package bytes offset + unset( $params['package_bytes_offset'] ); + + // Unset total package size + unset( $params['total_package_size'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // Get archive bytes offset + $archive_bytes_offset = $archive->get_file_pointer(); + + // What percent of package have we processed? + $progress = (int) min( ( $package_bytes_offset / $total_package_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving configuration file...
%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) ); + + // Set archive bytes offset + $params['archive_bytes_offset'] = $archive_bytes_offset; + + // Set package bytes offset + $params['package_bytes_offset'] = $package_bytes_offset; + + // Set total package size + $params['total_package_size'] = $total_package_size; + + // Set completed flag + $params['completed'] = false; + } + + // Truncate the archive file + $archive->truncate(); + + // Close the archive file + $archive->close(); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-config.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-config.php new file mode 100644 index 0000000..5bb9b00 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-config.php @@ -0,0 +1,184 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Config { + + public static function execute( $params ) { + global $table_prefix, $wp_version; + + // Set progress + Ai1wm_Status::info( __( 'Preparing configuration file...', AI1WM_PLUGIN_NAME ) ); + + // Get options + $options = wp_load_alloptions(); + + // Get database client + $mysql = Ai1wm_Database_Utility::create_client(); + + $config = array(); + + // Set site URL + $config['SiteURL'] = site_url(); + + // Set home URL + $config['HomeURL'] = home_url(); + + // Set internal site URL + if ( isset( $options['siteurl'] ) ) { + $config['InternalSiteURL'] = $options['siteurl']; + } + + // Set internal home URL + if ( isset( $options['home'] ) ) { + $config['InternalHomeURL'] = $options['home']; + } + + // Set replace old and new values + if ( isset( $params['options']['replace'] ) && ( $replace = $params['options']['replace'] ) ) { + for ( $i = 0; $i < count( $replace['old_value'] ); $i++ ) { + if ( ! empty( $replace['old_value'][ $i ] ) && ! empty( $replace['new_value'][ $i ] ) ) { + $config['Replace']['OldValues'][] = $replace['old_value'][ $i ]; + $config['Replace']['NewValues'][] = $replace['new_value'][ $i ]; + } + } + } + + // Set no spam comments + if ( isset( $params['options']['no_spam_comments'] ) ) { + $config['NoSpamComments'] = true; + } + + // Set no post revisions + if ( isset( $params['options']['no_post_revisions'] ) ) { + $config['NoPostRevisions'] = true; + } + + // Set no media + if ( isset( $params['options']['no_media'] ) ) { + $config['NoMedia'] = true; + } + + // Set no themes + if ( isset( $params['options']['no_themes'] ) ) { + $config['NoThemes'] = true; + } + + // Set no inactive themes + if ( isset( $params['options']['no_inactive_themes'] ) ) { + $config['NoInactiveThemes'] = true; + } + + // Set no must-use plugins + if ( isset( $params['options']['no_muplugins'] ) ) { + $config['NoMustUsePlugins'] = true; + } + + // Set no plugins + if ( isset( $params['options']['no_plugins'] ) ) { + $config['NoPlugins'] = true; + } + + // Set no inactive plugins + if ( isset( $params['options']['no_inactive_plugins'] ) ) { + $config['NoInactivePlugins'] = true; + } + + // Set no cache + if ( isset( $params['options']['no_cache'] ) ) { + $config['NoCache'] = true; + } + + // Set no database + if ( isset( $params['options']['no_database'] ) ) { + $config['NoDatabase'] = true; + } + + // Set no email replace + if ( isset( $params['options']['no_email_replace'] ) ) { + $config['NoEmailReplace'] = true; + } + + // Set plugin version + $config['Plugin'] = array( 'Version' => AI1WM_VERSION ); + + // Set WordPress version and content + $config['WordPress'] = array( 'Version' => $wp_version, 'Content' => WP_CONTENT_DIR, 'Plugins' => ai1wm_get_plugins_dir(), 'Themes' => ai1wm_get_themes_dirs(), 'Uploads' => ai1wm_get_uploads_dir(), 'UploadsURL' => ai1wm_get_uploads_url() ); + + // Set database version + $config['Database'] = array( + 'Version' => $mysql->version(), + 'Charset' => defined( 'DB_CHARSET' ) ? DB_CHARSET : 'undefined', + 'Collate' => defined( 'DB_COLLATE' ) ? DB_COLLATE : 'undefined', + 'Prefix' => $table_prefix, + ); + + // Exclude selected db tables + if ( isset( $params['options']['exclude_db_tables'], $params['excluded_db_tables'] ) ) { + if ( ( $excluded_db_tables = explode( ',', $params['excluded_db_tables'] ) ) ) { + $config['Database']['ExcludedTables'] = $excluded_db_tables; + } + } + + // Set PHP version + $config['PHP'] = array( 'Version' => PHP_VERSION, 'System' => PHP_OS, 'Integer' => PHP_INT_SIZE ); + + // Set active plugins + $config['Plugins'] = array_values( array_diff( ai1wm_active_plugins(), ai1wm_active_servmask_plugins() ) ); + + // Set active template + $config['Template'] = ai1wm_active_template(); + + // Set active stylesheet + $config['Stylesheet'] = ai1wm_active_stylesheet(); + + // Set upload path + $config['Uploads'] = get_option( 'upload_path' ); + + // Set upload URL path + $config['UploadsURL'] = get_option( 'upload_url_path' ); + + // Set server info + $config['Server'] = array( '.htaccess' => base64_encode( ai1wm_get_htaccess() ), 'web.config' => base64_encode( ai1wm_get_webconfig() ) ); + + if ( isset( $params['options']['encrypt_backups'] ) ) { + $config['Encrypted'] = true; + $config['EncryptedSignature'] = base64_encode( ai1wm_encrypt_string( AI1WM_SIGN_TEXT, $params['options']['encrypt_password'] ) ); + } + + // Save package.json file + $handle = ai1wm_open( ai1wm_package_path( $params ), 'w' ); + ai1wm_write( $handle, json_encode( $config ) ); + ai1wm_close( $handle ); + + // Set progress + Ai1wm_Status::info( __( 'Done preparing configuration file.', AI1WM_PLUGIN_NAME ) ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-content.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-content.php new file mode 100644 index 0000000..84b9b47 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-content.php @@ -0,0 +1,193 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Content { + + public static function execute( $params ) { + + // Set archive bytes offset + if ( isset( $params['archive_bytes_offset'] ) ) { + $archive_bytes_offset = (int) $params['archive_bytes_offset']; + } else { + $archive_bytes_offset = ai1wm_archive_bytes( $params ); + } + + // Set file bytes offset + if ( isset( $params['file_bytes_offset'] ) ) { + $file_bytes_offset = (int) $params['file_bytes_offset']; + } else { + $file_bytes_offset = 0; + } + + // Set content bytes offset + if ( isset( $params['content_bytes_offset'] ) ) { + $content_bytes_offset = (int) $params['content_bytes_offset']; + } else { + $content_bytes_offset = 0; + } + + // Get processed files size + if ( isset( $params['processed_files_size'] ) ) { + $processed_files_size = (int) $params['processed_files_size']; + } else { + $processed_files_size = 0; + } + + // Get total content files size + if ( isset( $params['total_content_files_size'] ) ) { + $total_content_files_size = (int) $params['total_content_files_size']; + } else { + $total_content_files_size = 1; + } + + // Get total content files count + if ( isset( $params['total_content_files_count'] ) ) { + $total_content_files_count = (int) $params['total_content_files_count']; + } else { + $total_content_files_count = 1; + } + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_content_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving %d content files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_content_files_count, $progress ) ); + + // Flag to hold if file data has been processed + $completed = true; + + // Start time + $start = microtime( true ); + + // Get content list file + $content_list = ai1wm_open( ai1wm_content_list_path( $params ), 'r' ); + + // Set the file pointer at the current index + if ( fseek( $content_list, $content_bytes_offset ) !== -1 ) { + + // Open the archive file for writing + $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); + + // Set the file pointer to the one that we have saved + $archive->set_file_pointer( $archive_bytes_offset ); + + // Loop over files + while ( list( $file_abspath, $file_relpath, $file_size, $file_mtime ) = fgetcsv( $content_list ) ) { + $file_bytes_written = 0; + + // Add file to archive + if ( ( $completed = $archive->add_file( $file_abspath, $file_relpath, $file_bytes_written, $file_bytes_offset ) ) ) { + $file_bytes_offset = 0; + + // Get content bytes offset + $content_bytes_offset = ftell( $content_list ); + } + + // Increment processed files size + $processed_files_size += $file_bytes_written; + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_content_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving %d content files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_content_files_count, $progress ) ); + + // More than 10 seconds have passed, break and do another request + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + + // Get archive bytes offset + $archive_bytes_offset = $archive->get_file_pointer(); + + // Truncate the archive file + $archive->truncate(); + + // Close the archive file + $archive->close(); + } + + // End of the content list? + if ( feof( $content_list ) ) { + + // Unset archive bytes offset + unset( $params['archive_bytes_offset'] ); + + // Unset file bytes offset + unset( $params['file_bytes_offset'] ); + + // Unset content bytes offset + unset( $params['content_bytes_offset'] ); + + // Unset processed files size + unset( $params['processed_files_size'] ); + + // Unset total content files size + unset( $params['total_content_files_size'] ); + + // Unset total content files count + unset( $params['total_content_files_count'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // Set archive bytes offset + $params['archive_bytes_offset'] = $archive_bytes_offset; + + // Set file bytes offset + $params['file_bytes_offset'] = $file_bytes_offset; + + // Set content bytes offset + $params['content_bytes_offset'] = $content_bytes_offset; + + // Set processed files size + $params['processed_files_size'] = $processed_files_size; + + // Set total content files size + $params['total_content_files_size'] = $total_content_files_size; + + // Set total content files count + $params['total_content_files_count'] = $total_content_files_count; + + // Set completed flag + $params['completed'] = $completed; + } + + // Close the content list file + ai1wm_close( $content_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-database-file.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-database-file.php new file mode 100644 index 0000000..d33a2c9 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-database-file.php @@ -0,0 +1,124 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Database_File { + + public static function execute( $params ) { + + // Set exclude database + if ( isset( $params['options']['no_database'] ) ) { + return $params; + } + + $database_bytes_written = 0; + + // Set archive bytes offset + if ( isset( $params['archive_bytes_offset'] ) ) { + $archive_bytes_offset = (int) $params['archive_bytes_offset']; + } else { + $archive_bytes_offset = ai1wm_archive_bytes( $params ); + } + + // Set database bytes offset + if ( isset( $params['database_bytes_offset'] ) ) { + $database_bytes_offset = (int) $params['database_bytes_offset']; + } else { + $database_bytes_offset = 0; + } + + // Get total database size + if ( isset( $params['total_database_size'] ) ) { + $total_database_size = (int) $params['total_database_size']; + } else { + $total_database_size = ai1wm_database_bytes( $params ); + } + + // What percent of database have we processed? + $progress = (int) min( ( $database_bytes_offset / $total_database_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving database...
%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) ); + + // Open the archive file for writing + $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); + + // Set the file pointer to the one that we have saved + $archive->set_file_pointer( $archive_bytes_offset ); + + // Add database.sql to archive + if ( $archive->add_file( ai1wm_database_path( $params ), AI1WM_DATABASE_NAME, $database_bytes_written, $database_bytes_offset ) ) { + + // Set progress + Ai1wm_Status::info( __( 'Done archiving database.', AI1WM_PLUGIN_NAME ) ); + + // Unset archive bytes offset + unset( $params['archive_bytes_offset'] ); + + // Unset database bytes offset + unset( $params['database_bytes_offset'] ); + + // Unset total database size + unset( $params['total_database_size'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // Get archive bytes offset + $archive_bytes_offset = $archive->get_file_pointer(); + + // What percent of database have we processed? + $progress = (int) min( ( $database_bytes_offset / $total_database_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving database...
%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) ); + + // Set archive bytes offset + $params['archive_bytes_offset'] = $archive_bytes_offset; + + // Set database bytes offset + $params['database_bytes_offset'] = $database_bytes_offset; + + // Set total database size + $params['total_database_size'] = $total_database_size; + + // Set completed flag + $params['completed'] = false; + } + + // Truncate the archive file + $archive->truncate(); + + // Close the archive file + $archive->close(); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-database.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-database.php new file mode 100644 index 0000000..f6bd36e --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-database.php @@ -0,0 +1,208 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Database { + + public static function execute( $params ) { + // Set exclude database + if ( isset( $params['options']['no_database'] ) ) { + return $params; + } + + // Set query offset + if ( isset( $params['query_offset'] ) ) { + $query_offset = (int) $params['query_offset']; + } else { + $query_offset = 0; + } + + // Set table index + if ( isset( $params['table_index'] ) ) { + $table_index = (int) $params['table_index']; + } else { + $table_index = 0; + } + + // Set table offset + if ( isset( $params['table_offset'] ) ) { + $table_offset = (int) $params['table_offset']; + } else { + $table_offset = 0; + } + + // Set table rows + if ( isset( $params['table_rows'] ) ) { + $table_rows = (int) $params['table_rows']; + } else { + $table_rows = 0; + } + + // Set total tables count + if ( isset( $params['total_tables_count'] ) ) { + $total_tables_count = (int) $params['total_tables_count']; + } else { + $total_tables_count = 1; + } + + // What percent of tables have we processed? + $progress = (int) ( ( $table_index / $total_tables_count ) * 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Exporting database...
%d%% complete
%s records saved', AI1WM_PLUGIN_NAME ), $progress, number_format_i18n( $table_rows ) ) ); + + // Get tables list file + $tables_list = ai1wm_open( ai1wm_tables_list_path( $params ), 'r' ); + + // Loop over tables + $tables = array(); + while ( list( $table_name ) = fgetcsv( $tables_list ) ) { + $tables[] = $table_name; + } + + // Close the tables list file + ai1wm_close( $tables_list ); + + // Get database client + $mysql = Ai1wm_Database_Utility::create_client(); + + // Exclude spam comments + if ( isset( $params['options']['no_spam_comments'] ) ) { + $mysql->set_table_where_query( ai1wm_table_prefix() . 'comments', "`comment_approved` != 'spam'" ) + ->set_table_where_query( ai1wm_table_prefix() . 'commentmeta', sprintf( "`comment_ID` IN ( SELECT `comment_ID` FROM `%s` WHERE `comment_approved` != 'spam' )", ai1wm_table_prefix() . 'comments' ) ); + } + + // Exclude post revisions + if ( isset( $params['options']['no_post_revisions'] ) ) { + $mysql->set_table_where_query( ai1wm_table_prefix() . 'posts', "`post_type` != 'revision'" ); + } + + $old_table_prefixes = $old_column_prefixes = array(); + $new_table_prefixes = $new_column_prefixes = array(); + + // Set table prefixes + if ( ai1wm_table_prefix() ) { + $old_table_prefixes[] = ai1wm_table_prefix(); + $new_table_prefixes[] = ai1wm_servmask_prefix(); + } else { + foreach ( $tables as $table_name ) { + $old_table_prefixes[] = $table_name; + $new_table_prefixes[] = ai1wm_servmask_prefix() . $table_name; + } + } + + // Set column prefixes + if ( strlen( ai1wm_table_prefix() ) > 1 ) { + $old_column_prefixes[] = ai1wm_table_prefix(); + $new_column_prefixes[] = ai1wm_servmask_prefix(); + } else { + foreach ( array( 'user_roles', 'capabilities', 'user_level', 'dashboard_quick_press_last_post_id', 'user-settings', 'user-settings-time' ) as $column_prefix ) { + $old_column_prefixes[] = ai1wm_table_prefix() . $column_prefix; + $new_column_prefixes[] = ai1wm_servmask_prefix() . $column_prefix; + } + } + + $mysql->set_tables( $tables ) + ->set_old_table_prefixes( $old_table_prefixes ) + ->set_new_table_prefixes( $new_table_prefixes ) + ->set_old_column_prefixes( $old_column_prefixes ) + ->set_new_column_prefixes( $new_column_prefixes ); + + // Exclude column prefixes + $mysql->set_reserved_column_prefixes( array( 'wp_force_deactivated_plugins', 'wp_page_for_privacy_policy' ) ); + + // Exclude site options + $mysql->set_table_where_query( ai1wm_table_prefix() . 'options', sprintf( "`option_name` NOT IN ('%s', '%s', '%s', '%s', '%s', '%s', '%s')", AI1WM_STATUS, AI1WM_SECRET_KEY, AI1WM_AUTH_USER, AI1WM_AUTH_PASSWORD, AI1WM_AUTH_HEADER, AI1WM_BACKUPS_LABELS, AI1WM_SITES_LINKS ) ); + + // Set table select columns + if ( ( $column_names = $mysql->get_column_names( ai1wm_table_prefix() . 'options' ) ) ) { + if ( isset( $column_names['option_name'], $column_names['option_value'] ) ) { + $column_names['option_value'] = sprintf( "(CASE WHEN option_name = '%s' THEN 'a:0:{}' WHEN (option_name = '%s' OR option_name = '%s') THEN '' ELSE option_value END) AS option_value", AI1WM_ACTIVE_PLUGINS, AI1WM_ACTIVE_TEMPLATE, AI1WM_ACTIVE_STYLESHEET ); + } + + $mysql->set_table_select_columns( ai1wm_table_prefix() . 'options', $column_names ); + } + + // Set table prefix columns + $mysql->set_table_prefix_columns( ai1wm_table_prefix() . 'options', array( 'option_name' ) ) + ->set_table_prefix_columns( ai1wm_table_prefix() . 'usermeta', array( 'meta_key' ) ); + + // Export database + if ( $mysql->export( ai1wm_database_path( $params ), $query_offset, $table_index, $table_offset, $table_rows ) ) { + + // Set progress + Ai1wm_Status::info( __( 'Done exporting database.', AI1WM_PLUGIN_NAME ) ); + + // Unset query offset + unset( $params['query_offset'] ); + + // Unset table index + unset( $params['table_index'] ); + + // Unset table offset + unset( $params['table_offset'] ); + + // Unset table rows + unset( $params['table_rows'] ); + + // Unset total tables count + unset( $params['total_tables_count'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // What percent of tables have we processed? + $progress = (int) ( ( $table_index / $total_tables_count ) * 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Exporting database...
%d%% complete
%s records saved', AI1WM_PLUGIN_NAME ), $progress, number_format_i18n( $table_rows ) ) ); + + // Set query offset + $params['query_offset'] = $query_offset; + + // Set table index + $params['table_index'] = $table_index; + + // Set table offset + $params['table_offset'] = $table_offset; + + // Set table rows + $params['table_rows'] = $table_rows; + + // Set total tables count + $params['total_tables_count'] = $total_tables_count; + + // Set completed flag + $params['completed'] = false; + } + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-download.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-download.php new file mode 100644 index 0000000..a8ac308 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-download.php @@ -0,0 +1,84 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Download { + + public static function execute( $params ) { + + // Set progress + Ai1wm_Status::info( __( 'Renaming exported file...', AI1WM_PLUGIN_NAME ) ); + + // Open the archive file for writing + $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); + + // Append EOF block + $archive->close( true ); + + // Rename archive file + if ( rename( ai1wm_archive_path( $params ), ai1wm_backup_path( $params ) ) ) { + + $blog_id = null; + + // Get subsite Blog ID + if ( isset( $params['options']['sites'] ) && ( $sites = $params['options']['sites'] ) ) { + if ( count( $sites ) === 1 ) { + $blog_id = array_shift( $sites ); + } + } + + // Set archive details + $file = ai1wm_archive_name( $params ); + $link = ai1wm_backup_url( $params ); + $size = ai1wm_backup_size( $params ); + $name = ai1wm_site_name( $blog_id ); + + // Set progress + Ai1wm_Status::download( + sprintf( + __( + '' . + 'Download %s' . + 'Size: %s' . + '', + AI1WM_PLUGIN_NAME + ), + $link, + $name, + $file, + $name, + $size + ) + ); + } + + do_action( 'ai1wm_status_export_done', $params ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-content.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-content.php new file mode 100644 index 0000000..d6785d2 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-content.php @@ -0,0 +1,119 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Enumerate_Content { + + public static function execute( $params ) { + + $exclude_filters = array_merge( array( ai1wm_get_uploads_dir(), ai1wm_get_plugins_dir() ), ai1wm_get_themes_dirs() ); + + // Get total content files count + if ( isset( $params['total_content_files_count'] ) ) { + $total_content_files_count = (int) $params['total_content_files_count']; + } else { + $total_content_files_count = 1; + } + + // Get total content files size + if ( isset( $params['total_content_files_size'] ) ) { + $total_content_files_size = (int) $params['total_content_files_size']; + } else { + $total_content_files_size = 1; + } + + // Set progress + Ai1wm_Status::info( __( 'Retrieving a list of WordPress content files...', AI1WM_PLUGIN_NAME ) ); + + // Exclude cache + if ( isset( $params['options']['no_cache'] ) ) { + $exclude_filters[] = 'cache'; + } + + // Exclude must-use plugins + if ( isset( $params['options']['no_muplugins'] ) ) { + $exclude_filters[] = 'mu-plugins'; + } + + // Exclude media + if ( isset( $params['options']['no_media'] ) ) { + $exclude_filters[] = 'blogs.dir'; + } + + // Exclude selected files + if ( isset( $params['options']['exclude_files'], $params['excluded_files'] ) ) { + if ( ( $excluded_files = explode( ',', $params['excluded_files'] ) ) ) { + foreach ( $excluded_files as $excluded_path ) { + $exclude_filters[] = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . untrailingslashit( $excluded_path ); + } + } + } + + // Create content list file + $content_list = ai1wm_open( ai1wm_content_list_path( $params ), 'w' ); + + // Enumerate over content directory + if ( isset( $params['options']['no_themes'], $params['options']['no_muplugins'], $params['options']['no_plugins'] ) === false ) { + + // Iterate over content directory + $iterator = new Ai1wm_Recursive_Directory_Iterator( WP_CONTENT_DIR ); + + // Exclude content files + $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, apply_filters( 'ai1wm_exclude_content_from_export', ai1wm_content_filters( $exclude_filters ) ) ); + + // Recursively iterate over content directory + $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD ); + + // Write path line + foreach ( $iterator as $item ) { + if ( $item->isFile() ) { + if ( ai1wm_putcsv( $content_list, array( $iterator->getPathname(), $iterator->getSubPathname(), $iterator->getSize(), $iterator->getMTime() ) ) ) { + $total_content_files_count++; + + // Add current file size + $total_content_files_size += $iterator->getSize(); + } + } + } + } + + // Set progress + Ai1wm_Status::info( __( 'Done retrieving a list of WordPress content files.', AI1WM_PLUGIN_NAME ) ); + + // Set total content files count + $params['total_content_files_count'] = $total_content_files_count; + + // Set total content files size + $params['total_content_files_size'] = $total_content_files_size; + + // Close the content list file + ai1wm_close( $content_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-media.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-media.php new file mode 100644 index 0000000..3ba00f5 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-media.php @@ -0,0 +1,106 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Enumerate_Media { + + public static function execute( $params ) { + + $exclude_filters = array(); + + // Get total media files count + if ( isset( $params['total_media_files_count'] ) ) { + $total_media_files_count = (int) $params['total_media_files_count']; + } else { + $total_media_files_count = 1; + } + + // Get total media files size + if ( isset( $params['total_media_files_size'] ) ) { + $total_media_files_size = (int) $params['total_media_files_size']; + } else { + $total_media_files_size = 1; + } + + // Set progress + Ai1wm_Status::info( __( 'Retrieving a list of WordPress media files...', AI1WM_PLUGIN_NAME ) ); + + // Exclude selected files + if ( isset( $params['options']['exclude_files'], $params['excluded_files'] ) ) { + if ( ( $excluded_files = explode( ',', $params['excluded_files'] ) ) ) { + foreach ( $excluded_files as $excluded_path ) { + $exclude_filters[] = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . untrailingslashit( $excluded_path ); + } + } + } + + // Create media list file + $media_list = ai1wm_open( ai1wm_media_list_path( $params ), 'w' ); + + // Enumerate over media directory + if ( isset( $params['options']['no_media'] ) === false ) { + if ( is_dir( ai1wm_get_uploads_dir() ) ) { + + // Iterate over media directory + $iterator = new Ai1wm_Recursive_Directory_Iterator( ai1wm_get_uploads_dir() ); + + // Exclude media files + $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, apply_filters( 'ai1wm_exclude_media_from_export', ai1wm_media_filters( $exclude_filters ) ) ); + + // Recursively iterate over content directory + $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD ); + + // Write path line + foreach ( $iterator as $item ) { + if ( $item->isFile() ) { + if ( ai1wm_putcsv( $media_list, array( $iterator->getPathname(), $iterator->getSubPathname(), $iterator->getSize(), $iterator->getMTime() ) ) ) { + $total_media_files_count++; + + // Add current file size + $total_media_files_size += $iterator->getSize(); + } + } + } + } + } + + // Set progress + Ai1wm_Status::info( __( 'Done retrieving a list of WordPress media files.', AI1WM_PLUGIN_NAME ) ); + + // Set total media files count + $params['total_media_files_count'] = $total_media_files_count; + + // Set total media files size + $params['total_media_files_size'] = $total_media_files_size; + + // Close the media list file + ai1wm_close( $media_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-plugins.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-plugins.php new file mode 100644 index 0000000..2fdf8f4 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-plugins.php @@ -0,0 +1,113 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Enumerate_Plugins { + + public static function execute( $params ) { + + $exclude_filters = array(); + + // Get total plugins files count + if ( isset( $params['total_plugins_files_count'] ) ) { + $total_plugins_files_count = (int) $params['total_plugins_files_count']; + } else { + $total_plugins_files_count = 1; + } + + // Get total plugins files size + if ( isset( $params['total_plugins_files_size'] ) ) { + $total_plugins_files_size = (int) $params['total_plugins_files_size']; + } else { + $total_plugins_files_size = 1; + } + + // Set progress + Ai1wm_Status::info( __( 'Retrieving a list of WordPress plugin files...', AI1WM_PLUGIN_NAME ) ); + + // Exclude inactive plugins + if ( isset( $params['options']['no_inactive_plugins'] ) ) { + foreach ( get_plugins() as $plugin_name => $plugin_info ) { + if ( is_plugin_inactive( $plugin_name ) ) { + $exclude_filters[] = ( dirname( $plugin_name ) === '.' ? basename( $plugin_name ) : dirname( $plugin_name ) ); + } + } + } + + // Exclude selected files + if ( isset( $params['options']['exclude_files'], $params['excluded_files'] ) ) { + if ( ( $excluded_files = explode( ',', $params['excluded_files'] ) ) ) { + foreach ( $excluded_files as $excluded_path ) { + $exclude_filters[] = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . untrailingslashit( $excluded_path ); + } + } + } + + // Create plugins list file + $plugins_list = ai1wm_open( ai1wm_plugins_list_path( $params ), 'w' ); + + // Enumerate over plugins directory + if ( isset( $params['options']['no_plugins'] ) === false ) { + + // Iterate over plugins directory + $iterator = new Ai1wm_Recursive_Directory_Iterator( ai1wm_get_plugins_dir() ); + + // Exclude plugins files + $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, apply_filters( 'ai1wm_exclude_plugins_from_export', ai1wm_plugin_filters( $exclude_filters ) ) ); + + // Recursively iterate over plugins directory + $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD ); + + // Write path line + foreach ( $iterator as $item ) { + if ( $item->isFile() ) { + if ( ai1wm_putcsv( $plugins_list, array( $iterator->getPathname(), $iterator->getSubPathname(), $iterator->getSize(), $iterator->getMTime() ) ) ) { + $total_plugins_files_count++; + + // Add current file size + $total_plugins_files_size += $iterator->getSize(); + } + } + } + } + + // Set progress + Ai1wm_Status::info( __( 'Done retrieving a list of WordPress plugin files.', AI1WM_PLUGIN_NAME ) ); + + // Set total plugins files count + $params['total_plugins_files_count'] = $total_plugins_files_count; + + // Set total plugins files size + $params['total_plugins_files_size'] = $total_plugins_files_size; + + // Close the plugins list file + ai1wm_close( $plugins_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-tables.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-tables.php new file mode 100644 index 0000000..0e52e29 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-tables.php @@ -0,0 +1,90 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Enumerate_Tables { + + public static function execute( $params, Ai1wm_Database $mysql = null ) { + // Set exclude database + if ( isset( $params['options']['no_database'] ) ) { + return $params; + } + + // Get total tables count + if ( isset( $params['total_tables_count'] ) ) { + $total_tables_count = (int) $params['total_tables_count']; + } else { + $total_tables_count = 1; + } + + // Set progress + Ai1wm_Status::info( __( 'Retrieving a list of WordPress database tables...', AI1WM_PLUGIN_NAME ) ); + + // Get database client + if ( is_null( $mysql ) ) { + $mysql = Ai1wm_Database_Utility::create_client(); + } + + // Include table prefixes + if ( ai1wm_table_prefix() ) { + $mysql->add_table_prefix_filter( ai1wm_table_prefix() ); + + // Include table prefixes (Webba Booking) + foreach ( array( 'wbk_services', 'wbk_days_on_off', 'wbk_locked_time_slots', 'wbk_appointments', 'wbk_cancelled_appointments', 'wbk_email_templates', 'wbk_service_categories', 'wbk_gg_calendars', 'wbk_coupons' ) as $table_name ) { + $mysql->add_table_prefix_filter( $table_name ); + } + } + + // Create tables list file + $tables_list = ai1wm_open( ai1wm_tables_list_path( $params ), 'w' ); + + // Exclude selected db tables + $excluded_db_tables = array(); + if ( isset( $params['options']['exclude_db_tables'], $params['excluded_db_tables'] ) ) { + $excluded_db_tables = explode( ',', $params['excluded_db_tables'] ); + } + + // Write table line + foreach ( $mysql->get_tables() as $table_name ) { + if ( ! in_array( $table_name, $excluded_db_tables ) && ai1wm_putcsv( $tables_list, array( $table_name ) ) ) { + $total_tables_count++; + } + } + + // Set progress + Ai1wm_Status::info( __( 'Done retrieving a list of WordPress database tables.', AI1WM_PLUGIN_NAME ) ); + + // Set total tables count + $params['total_tables_count'] = $total_tables_count; + + // Close the tables list file + ai1wm_close( $tables_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-themes.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-themes.php new file mode 100644 index 0000000..231f588 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-enumerate-themes.php @@ -0,0 +1,119 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Enumerate_Themes { + + public static function execute( $params ) { + + $exclude_filters = array(); + + // Get total themes files count + if ( isset( $params['total_themes_files_count'] ) ) { + $total_themes_files_count = (int) $params['total_themes_files_count']; + } else { + $total_themes_files_count = 1; + } + + // Get total themes files size + if ( isset( $params['total_themes_files_size'] ) ) { + $total_themes_files_size = (int) $params['total_themes_files_size']; + } else { + $total_themes_files_size = 1; + } + + // Set progress + Ai1wm_Status::info( __( 'Retrieving a list of WordPress theme files...', AI1WM_PLUGIN_NAME ) ); + + // Exclude inactive themes + if ( isset( $params['options']['no_inactive_themes'] ) ) { + foreach ( search_theme_directories() as $theme_name => $theme_info ) { + if ( ! in_array( $theme_name, array( get_template(), get_stylesheet() ) ) ) { + if ( isset( $theme_info['theme_root'] ) ) { + $exclude_filters[] = $theme_info['theme_root'] . DIRECTORY_SEPARATOR . $theme_name; + } + } + } + } + + // Exclude selected files + if ( isset( $params['options']['exclude_files'], $params['excluded_files'] ) ) { + if ( ( $excluded_files = explode( ',', $params['excluded_files'] ) ) ) { + foreach ( $excluded_files as $excluded_path ) { + $exclude_filters[] = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . untrailingslashit( $excluded_path ); + } + } + } + + // Create themes list file + $themes_list = ai1wm_open( ai1wm_themes_list_path( $params ), 'w' ); + + // Enumerate over themes directory + if ( isset( $params['options']['no_themes'] ) === false ) { + foreach ( ai1wm_get_themes_dirs() as $theme_dir ) { + if ( is_dir( $theme_dir ) ) { + + // Iterate over themes directory + $iterator = new Ai1wm_Recursive_Directory_Iterator( $theme_dir ); + + // Exclude themes files + $iterator = new Ai1wm_Recursive_Exclude_Filter( $iterator, apply_filters( 'ai1wm_exclude_themes_from_export', ai1wm_theme_filters( $exclude_filters ) ) ); + + // Recursively iterate over themes directory + $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD ); + + // Write path line + foreach ( $iterator as $item ) { + if ( $item->isFile() ) { + if ( ai1wm_putcsv( $themes_list, array( $iterator->getPathname(), $iterator->getSubPathname(), $iterator->getSize(), $iterator->getMTime() ) ) ) { + $total_themes_files_count++; + + // Add current file size + $total_themes_files_size += $iterator->getSize(); + } + } + } + } + } + } + + // Set progress + Ai1wm_Status::info( __( 'Done retrieving a list of WordPress theme files.', AI1WM_PLUGIN_NAME ) ); + + // Set total themes files count + $params['total_themes_files_count'] = $total_themes_files_count; + + // Set total themes files size + $params['total_themes_files_size'] = $total_themes_files_size; + + // Close the themes list file + ai1wm_close( $themes_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-init.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-init.php new file mode 100644 index 0000000..1987f08 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-init.php @@ -0,0 +1,57 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Init { + + public static function execute( $params ) { + $blog_id = null; + + // Get subsite Blog ID + if ( isset( $params['options']['sites'] ) && ( $sites = $params['options']['sites'] ) ) { + if ( count( $sites ) === 1 ) { + $blog_id = array_shift( $sites ); + } + } + + // Set progress + Ai1wm_Status::info( __( 'Preparing to export...', AI1WM_PLUGIN_NAME ) ); + + // Set archive + if ( empty( $params['archive'] ) ) { + $params['archive'] = ai1wm_archive_file( $blog_id ); + } + + // Set storage + if ( empty( $params['storage'] ) ) { + $params['storage'] = ai1wm_storage_folder(); + } + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-media.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-media.php new file mode 100644 index 0000000..a18d810 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-media.php @@ -0,0 +1,193 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Media { + + public static function execute( $params ) { + + // Set archive bytes offset + if ( isset( $params['archive_bytes_offset'] ) ) { + $archive_bytes_offset = (int) $params['archive_bytes_offset']; + } else { + $archive_bytes_offset = ai1wm_archive_bytes( $params ); + } + + // Set file bytes offset + if ( isset( $params['file_bytes_offset'] ) ) { + $file_bytes_offset = (int) $params['file_bytes_offset']; + } else { + $file_bytes_offset = 0; + } + + // Set media bytes offset + if ( isset( $params['media_bytes_offset'] ) ) { + $media_bytes_offset = (int) $params['media_bytes_offset']; + } else { + $media_bytes_offset = 0; + } + + // Get processed files size + if ( isset( $params['processed_files_size'] ) ) { + $processed_files_size = (int) $params['processed_files_size']; + } else { + $processed_files_size = 0; + } + + // Get total media files size + if ( isset( $params['total_media_files_size'] ) ) { + $total_media_files_size = (int) $params['total_media_files_size']; + } else { + $total_media_files_size = 1; + } + + // Get total media files count + if ( isset( $params['total_media_files_count'] ) ) { + $total_media_files_count = (int) $params['total_media_files_count']; + } else { + $total_media_files_count = 1; + } + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_media_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving %d media files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_media_files_count, $progress ) ); + + // Flag to hold if file data has been processed + $completed = true; + + // Start time + $start = microtime( true ); + + // Get media list file + $media_list = ai1wm_open( ai1wm_media_list_path( $params ), 'r' ); + + // Set the file pointer at the current index + if ( fseek( $media_list, $media_bytes_offset ) !== -1 ) { + + // Open the archive file for writing + $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); + + // Set the file pointer to the one that we have saved + $archive->set_file_pointer( $archive_bytes_offset ); + + // Loop over files + while ( list( $file_abspath, $file_relpath, $file_size, $file_mtime ) = fgetcsv( $media_list ) ) { + $file_bytes_written = 0; + + // Add file to archive + if ( ( $completed = $archive->add_file( $file_abspath, 'uploads' . DIRECTORY_SEPARATOR . $file_relpath, $file_bytes_written, $file_bytes_offset ) ) ) { + $file_bytes_offset = 0; + + // Get media bytes offset + $media_bytes_offset = ftell( $media_list ); + } + + // Increment processed files size + $processed_files_size += $file_bytes_written; + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_media_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving %d media files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_media_files_count, $progress ) ); + + // More than 10 seconds have passed, break and do another request + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + + // Get archive bytes offset + $archive_bytes_offset = $archive->get_file_pointer(); + + // Truncate the archive file + $archive->truncate(); + + // Close the archive file + $archive->close(); + } + + // End of the media list? + if ( feof( $media_list ) ) { + + // Unset archive bytes offset + unset( $params['archive_bytes_offset'] ); + + // Unset file bytes offset + unset( $params['file_bytes_offset'] ); + + // Unset media bytes offset + unset( $params['media_bytes_offset'] ); + + // Unset processed files size + unset( $params['processed_files_size'] ); + + // Unset total media files size + unset( $params['total_media_files_size'] ); + + // Unset total media files count + unset( $params['total_media_files_count'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // Set archive bytes offset + $params['archive_bytes_offset'] = $archive_bytes_offset; + + // Set file bytes offset + $params['file_bytes_offset'] = $file_bytes_offset; + + // Set media bytes offset + $params['media_bytes_offset'] = $media_bytes_offset; + + // Set processed files size + $params['processed_files_size'] = $processed_files_size; + + // Set total media files size + $params['total_media_files_size'] = $total_media_files_size; + + // Set total media files count + $params['total_media_files_count'] = $total_media_files_count; + + // Set completed flag + $params['completed'] = $completed; + } + + // Close the media list file + ai1wm_close( $media_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-plugins.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-plugins.php new file mode 100644 index 0000000..160c20a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-plugins.php @@ -0,0 +1,193 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Plugins { + + public static function execute( $params ) { + + // Set archive bytes offset + if ( isset( $params['archive_bytes_offset'] ) ) { + $archive_bytes_offset = (int) $params['archive_bytes_offset']; + } else { + $archive_bytes_offset = ai1wm_archive_bytes( $params ); + } + + // Set file bytes offset + if ( isset( $params['file_bytes_offset'] ) ) { + $file_bytes_offset = (int) $params['file_bytes_offset']; + } else { + $file_bytes_offset = 0; + } + + // Set plugins bytes offset + if ( isset( $params['plugins_bytes_offset'] ) ) { + $plugins_bytes_offset = (int) $params['plugins_bytes_offset']; + } else { + $plugins_bytes_offset = 0; + } + + // Get processed files size + if ( isset( $params['processed_files_size'] ) ) { + $processed_files_size = (int) $params['processed_files_size']; + } else { + $processed_files_size = 0; + } + + // Get total plugins files size + if ( isset( $params['total_plugins_files_size'] ) ) { + $total_plugins_files_size = (int) $params['total_plugins_files_size']; + } else { + $total_plugins_files_size = 1; + } + + // Get total plugins files count + if ( isset( $params['total_plugins_files_count'] ) ) { + $total_plugins_files_count = (int) $params['total_plugins_files_count']; + } else { + $total_plugins_files_count = 1; + } + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_plugins_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving %d plugin files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_plugins_files_count, $progress ) ); + + // Flag to hold if file data has been processed + $completed = true; + + // Start time + $start = microtime( true ); + + // Get plugins list file + $plugins_list = ai1wm_open( ai1wm_plugins_list_path( $params ), 'r' ); + + // Set the file pointer at the current index + if ( fseek( $plugins_list, $plugins_bytes_offset ) !== -1 ) { + + // Open the archive file for writing + $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); + + // Set the file pointer to the one that we have saved + $archive->set_file_pointer( $archive_bytes_offset ); + + // Loop over files + while ( list( $file_abspath, $file_relpath, $file_size, $file_mtime ) = fgetcsv( $plugins_list ) ) { + $file_bytes_written = 0; + + // Add file to archive + if ( ( $completed = $archive->add_file( $file_abspath, 'plugins' . DIRECTORY_SEPARATOR . $file_relpath, $file_bytes_written, $file_bytes_offset ) ) ) { + $file_bytes_offset = 0; + + // Get plugins bytes offset + $plugins_bytes_offset = ftell( $plugins_list ); + } + + // Increment processed files size + $processed_files_size += $file_bytes_written; + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_plugins_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving %d plugin files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_plugins_files_count, $progress ) ); + + // More than 10 seconds have passed, break and do another request + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + + // Get archive bytes offset + $archive_bytes_offset = $archive->get_file_pointer(); + + // Truncate the archive file + $archive->truncate(); + + // Close the archive file + $archive->close(); + } + + // End of the plugins list? + if ( feof( $plugins_list ) ) { + + // Unset archive bytes offset + unset( $params['archive_bytes_offset'] ); + + // Unset file bytes offset + unset( $params['file_bytes_offset'] ); + + // Unset plugins bytes offset + unset( $params['plugins_bytes_offset'] ); + + // Unset processed files size + unset( $params['processed_files_size'] ); + + // Unset total plugins files size + unset( $params['total_plugins_files_size'] ); + + // Unset total plugins files count + unset( $params['total_plugins_files_count'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // Set archive bytes offset + $params['archive_bytes_offset'] = $archive_bytes_offset; + + // Set file bytes offset + $params['file_bytes_offset'] = $file_bytes_offset; + + // Set plugins bytes offset + $params['plugins_bytes_offset'] = $plugins_bytes_offset; + + // Set processed files size + $params['processed_files_size'] = $processed_files_size; + + // Set total plugins files size + $params['total_plugins_files_size'] = $total_plugins_files_size; + + // Set total plugins files count + $params['total_plugins_files_count'] = $total_plugins_files_count; + + // Set completed flag + $params['completed'] = $completed; + } + + // Close the plugins list file + ai1wm_close( $plugins_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-themes.php b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-themes.php new file mode 100644 index 0000000..2d3ef2e --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/export/class-ai1wm-export-themes.php @@ -0,0 +1,193 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Export_Themes { + + public static function execute( $params ) { + + // Set archive bytes offset + if ( isset( $params['archive_bytes_offset'] ) ) { + $archive_bytes_offset = (int) $params['archive_bytes_offset']; + } else { + $archive_bytes_offset = ai1wm_archive_bytes( $params ); + } + + // Set file bytes offset + if ( isset( $params['file_bytes_offset'] ) ) { + $file_bytes_offset = (int) $params['file_bytes_offset']; + } else { + $file_bytes_offset = 0; + } + + // Set themes bytes offset + if ( isset( $params['themes_bytes_offset'] ) ) { + $themes_bytes_offset = (int) $params['themes_bytes_offset']; + } else { + $themes_bytes_offset = 0; + } + + // Get processed files size + if ( isset( $params['processed_files_size'] ) ) { + $processed_files_size = (int) $params['processed_files_size']; + } else { + $processed_files_size = 0; + } + + // Get total themes files size + if ( isset( $params['total_themes_files_size'] ) ) { + $total_themes_files_size = (int) $params['total_themes_files_size']; + } else { + $total_themes_files_size = 1; + } + + // Get total themes files count + if ( isset( $params['total_themes_files_count'] ) ) { + $total_themes_files_count = (int) $params['total_themes_files_count']; + } else { + $total_themes_files_count = 1; + } + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_themes_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving %d theme files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_themes_files_count, $progress ) ); + + // Flag to hold if file data has been processed + $completed = true; + + // Start time + $start = microtime( true ); + + // Get themes list file + $themes_list = ai1wm_open( ai1wm_themes_list_path( $params ), 'r' ); + + // Set the file pointer at the current index + if ( fseek( $themes_list, $themes_bytes_offset ) !== -1 ) { + + // Open the archive file for writing + $archive = new Ai1wm_Compressor( ai1wm_archive_path( $params ) ); + + // Set the file pointer to the one that we have saved + $archive->set_file_pointer( $archive_bytes_offset ); + + // Loop over files + while ( list( $file_abspath, $file_relpath, $file_size, $file_mtime ) = fgetcsv( $themes_list ) ) { + $file_bytes_written = 0; + + // Add file to archive + if ( ( $completed = $archive->add_file( $file_abspath, 'themes' . DIRECTORY_SEPARATOR . $file_relpath, $file_bytes_written, $file_bytes_offset ) ) ) { + $file_bytes_offset = 0; + + // Get themes bytes offset + $themes_bytes_offset = ftell( $themes_list ); + } + + // Increment processed files size + $processed_files_size += $file_bytes_written; + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_themes_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Archiving %d theme files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_themes_files_count, $progress ) ); + + // More than 10 seconds have passed, break and do another request + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + + // Get archive bytes offset + $archive_bytes_offset = $archive->get_file_pointer(); + + // Truncate the archive file + $archive->truncate(); + + // Close the archive file + $archive->close(); + } + + // End of the themes list? + if ( feof( $themes_list ) ) { + + // Unset archive bytes offset + unset( $params['archive_bytes_offset'] ); + + // Unset file bytes offset + unset( $params['file_bytes_offset'] ); + + // Unset themes bytes offset + unset( $params['themes_bytes_offset'] ); + + // Unset processed files size + unset( $params['processed_files_size'] ); + + // Unset total themes files size + unset( $params['total_themes_files_size'] ); + + // Unset total themes files count + unset( $params['total_themes_files_count'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // Set archive bytes offset + $params['archive_bytes_offset'] = $archive_bytes_offset; + + // Set file bytes offset + $params['file_bytes_offset'] = $file_bytes_offset; + + // Set themes bytes offset + $params['themes_bytes_offset'] = $themes_bytes_offset; + + // Set processed files size + $params['processed_files_size'] = $processed_files_size; + + // Set total themes files size + $params['total_themes_files_size'] = $total_themes_files_size; + + // Set total themes files count + $params['total_themes_files_count'] = $total_themes_files_count; + + // Set completed flag + $params['completed'] = $completed; + } + + // Close the themes list file + ai1wm_close( $themes_list ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-blogs.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-blogs.php new file mode 100644 index 0000000..ce83f41 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-blogs.php @@ -0,0 +1,154 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Blogs { + + public static function execute( $params ) { + + // Set progress + Ai1wm_Status::info( __( 'Preparing blogs...', AI1WM_PLUGIN_NAME ) ); + + $blogs = array(); + + // Check multisite.json file + if ( true === is_file( ai1wm_multisite_path( $params ) ) ) { + + // Read multisite.json file + $handle = ai1wm_open( ai1wm_multisite_path( $params ), 'r' ); + + // Parse multisite.json file + $multisite = ai1wm_read( $handle, filesize( ai1wm_multisite_path( $params ) ) ); + $multisite = json_decode( $multisite, true ); + + // Close handle + ai1wm_close( $handle ); + + // Validate + if ( empty( $multisite['Network'] ) ) { + if ( isset( $multisite['Sites'] ) && ( $sites = $multisite['Sites'] ) ) { + if ( count( $sites ) === 1 && ( $subsite = current( $sites ) ) ) { + + // Set internal Site URL (backward compatibility) + if ( empty( $subsite['InternalSiteURL'] ) ) { + $subsite['InternalSiteURL'] = null; + } + + // Set internal Home URL (backward compatibility) + if ( empty( $subsite['InternalHomeURL'] ) ) { + $subsite['InternalHomeURL'] = null; + } + + // Set active plugins (backward compatibility) + if ( empty( $subsite['Plugins'] ) ) { + $subsite['Plugins'] = array(); + } + + // Set active template (backward compatibility) + if ( empty( $subsite['Template'] ) ) { + $subsite['Template'] = null; + } + + // Set active stylesheet (backward compatibility) + if ( empty( $subsite['Stylesheet'] ) ) { + $subsite['Stylesheet'] = null; + } + + // Set uploads path (backward compatibility) + if ( empty( $subsite['Uploads'] ) ) { + $subsite['Uploads'] = null; + } + + // Set uploads URL path (backward compatibility) + if ( empty( $subsite['UploadsURL'] ) ) { + $subsite['UploadsURL'] = null; + } + + // Set uploads path (backward compatibility) + if ( empty( $subsite['WordPress']['Uploads'] ) ) { + $subsite['WordPress']['Uploads'] = null; + } + + // Set uploads URL path (backward compatibility) + if ( empty( $subsite['WordPress']['UploadsURL'] ) ) { + $subsite['WordPress']['UploadsURL'] = null; + } + + // Set blog items + $blogs[] = array( + 'Old' => array( + 'BlogID' => $subsite['BlogID'], + 'SiteURL' => $subsite['SiteURL'], + 'HomeURL' => $subsite['HomeURL'], + 'InternalSiteURL' => $subsite['InternalSiteURL'], + 'InternalHomeURL' => $subsite['InternalHomeURL'], + 'Plugins' => $subsite['Plugins'], + 'Template' => $subsite['Template'], + 'Stylesheet' => $subsite['Stylesheet'], + 'Uploads' => $subsite['Uploads'], + 'UploadsURL' => $subsite['UploadsURL'], + 'WordPress' => $subsite['WordPress'], + ), + 'New' => array( + 'BlogID' => null, + 'SiteURL' => site_url(), + 'HomeURL' => home_url(), + 'InternalSiteURL' => site_url(), + 'InternalHomeURL' => home_url(), + 'Plugins' => $subsite['Plugins'], + 'Template' => $subsite['Template'], + 'Stylesheet' => $subsite['Stylesheet'], + 'Uploads' => get_option( 'upload_path' ), + 'UploadsURL' => get_option( 'upload_url_path' ), + 'WordPress' => array( + 'UploadsURL' => ai1wm_get_uploads_url(), + ), + ), + ); + } else { + throw new Ai1wm_Import_Exception( __( 'The archive should contain Single WordPress site! Please revisit your export settings.', AI1WM_PLUGIN_NAME ) ); + } + } else { + throw new Ai1wm_Import_Exception( __( 'At least one WordPress site should be presented in the archive.', AI1WM_PLUGIN_NAME ) ); + } + } else { + throw new Ai1wm_Import_Exception( __( 'Unable to import WordPress Network into WordPress Single site.', AI1WM_PLUGIN_NAME ) ); + } + } + + // Write blogs.json file + $handle = ai1wm_open( ai1wm_blogs_path( $params ), 'w' ); + ai1wm_write( $handle, json_encode( $blogs ) ); + ai1wm_close( $handle ); + + // Set progress + Ai1wm_Status::info( __( 'Done preparing blogs.', AI1WM_PLUGIN_NAME ) ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-check-decryption-password.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-check-decryption-password.php new file mode 100644 index 0000000..5517d25 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-check-decryption-password.php @@ -0,0 +1,71 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Check_Decryption_Password { + + public static function execute( $params ) { + global $ai1wm_params; + + // Read package.json file + $handle = ai1wm_open( ai1wm_package_path( $params ), 'r' ); + + // Parse package.json file + $package = ai1wm_read( $handle, filesize( ai1wm_package_path( $params ) ) ); + $package = json_decode( $package, true ); + + // Close handle + ai1wm_close( $handle ); + + if ( ! empty( $params['decryption_password'] ) ) { + if ( ai1wm_is_decryption_password_valid( $package['EncryptedSignature'], $params['decryption_password'] ) ) { + $params['is_decryption_password_valid'] = true; + + $archive = new Ai1wm_Extractor( ai1wm_archive_path( $params ), $params['decryption_password'] ); + $archive->extract_by_files_array( ai1wm_storage_path( $params ), array( AI1WM_MULTISITE_NAME, AI1WM_DATABASE_NAME ), array(), array() ); + + Ai1wm_Status::info( __( 'Done validating the decryption password.', AI1WM_PLUGIN_NAME ) ); + + $ai1wm_params = $params; + + return $params; + } + + $decryption_password_error = __( 'The decryption password is not valid.', AI1WM_PLUGIN_NAME ); + + if ( defined( 'WP_CLI' ) ) { + WP_CLI::error( $decryption_password_error ); + } else { + Ai1wm_Status::backup_is_encrypted( $decryption_password_error ); + exit; + } + } + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-check-encryption.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-check-encryption.php new file mode 100644 index 0000000..24053f3 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-check-encryption.php @@ -0,0 +1,72 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Check_Encryption { + + public static function execute( $params ) { + // Read package.json file + $handle = ai1wm_open( ai1wm_package_path( $params ), 'r' ); + + // Parse package.json file + $package = ai1wm_read( $handle, filesize( ai1wm_package_path( $params ) ) ); + $package = json_decode( $package, true ); + + // Close handle + ai1wm_close( $handle ); + + if ( empty( $package['Encrypted'] ) || empty( $package['EncryptedSignature'] ) || ! empty( $params['is_decryption_password_valid'] ) ) { + return $params; + } + + if ( ! ai1wm_can_decrypt() ) { + $message = __( 'Importing an encrypted backup is not supported on this server. Technical details', AI1WM_PLUGIN_NAME ); + + if ( defined( 'WP_CLI' ) ) { + WP_CLI::error( $message ); + } else { + Ai1wm_Status::server_cannot_decrypt( $message ); + exit; + } + } + + if ( defined( 'WP_CLI' ) ) { + $message = __( + 'Backup is encrypted. Please provide decryption password: ', + AI1WM_PLUGIN_NAME + ); + + $params['decryption_password'] = readline( $message ); + + return $params; + } + + Ai1wm_Status::backup_is_encrypted( null ); + exit; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-clean.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-clean.php new file mode 100644 index 0000000..569e4b5 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-clean.php @@ -0,0 +1,50 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Clean { + + public static function execute( $params ) { + // Get database client + $mysql = Ai1wm_Database_Utility::create_client(); + + // Flush mainsite tables + $mysql->add_table_prefix_filter( ai1wm_table_prefix( 'mainsite' ) ); + $mysql->flush(); + + // Delete storage files + Ai1wm_Directory::delete( ai1wm_storage_path( $params ) ); + + // Exit in console + if ( defined( 'WP_CLI' ) ) { + return $params; + } + + exit; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-compatibility.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-compatibility.php new file mode 100644 index 0000000..c53c768 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-compatibility.php @@ -0,0 +1,48 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Compatibility { + + public static function execute( $params ) { + + // Set progress + Ai1wm_Status::info( __( 'Checking extensions compatibility...', AI1WM_PLUGIN_NAME ) ); + + // Get messages + $messages = Ai1wm_Compatibility::get( $params ); + + // Set messages + if ( empty( $messages ) ) { + return $params; + } + + // Error message + throw new Ai1wm_Compatibility_Exception( implode( $messages ) ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-confirm.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-confirm.php new file mode 100644 index 0000000..afa8dbe --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-confirm.php @@ -0,0 +1,115 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Confirm { + + public static function execute( $params ) { + + $messages = array(); + + // Read package.json file + $handle = ai1wm_open( ai1wm_package_path( $params ), 'r' ); + + // Parse package.json file + $package = ai1wm_read( $handle, filesize( ai1wm_package_path( $params ) ) ); + $package = json_decode( $package, true ); + + // Close handle + ai1wm_close( $handle ); + + // Confirm message + if ( defined( 'WP_CLI' ) ) { + $messages[] = __( + 'The import process will overwrite your website including the database, media, plugins, and themes. ' . + 'Are you sure to proceed?', + AI1WM_PLUGIN_NAME + ); + } else { + $messages[] = __( + 'The import process will overwrite your website including the database, media, plugins, and themes. ' . + 'Please ensure that you have a backup of your data before proceeding to the next step.', + AI1WM_PLUGIN_NAME + ); + } + + // Check compatibility of PHP versions + if ( isset( $package['PHP']['Version'] ) ) { + // Extract major and minor version numbers + $source_versions = explode( '.', $package['PHP']['Version'] ); + $target_versions = explode( '.', PHP_VERSION ); + + $source_major_version = intval( $source_versions[0] ); + $source_minor_version = intval( isset( $source_versions[1] ) ? $source_versions[1] : 0 ); + + $target_major_version = intval( $target_versions[0] ); + $target_minor_version = intval( isset( $target_versions[1] ) ? $target_versions[1] : 0 ); + + if ( $source_major_version !== $target_major_version ) { + $from_php = $source_major_version; + $to_php = $target_major_version; + } elseif ( $source_minor_version !== $target_minor_version ) { + $from_php = sprintf( '%s.%s', $source_major_version, $source_minor_version ); + $to_php = sprintf( '%s.%s', $target_major_version, $target_minor_version ); + } + + if ( isset( $from_php, $to_php ) ) { + if ( defined( 'WP_CLI' ) ) { + $message = __( + 'Your backup is from a PHP %s but the site that you are importing to is PHP %s. ' . + 'This could cause the import to fail. Technical details: https://help.servmask.com/knowledgebase/migrate-wordpress-from-php-5-to-php-7/', + AI1WM_PLUGIN_NAME + ); + } else { + $message = __( + 'Your backup is from a PHP %s but the site that you are importing to is PHP %s. ' . + 'This could cause the import to fail. Technical details', + AI1WM_PLUGIN_NAME + ); + } + + $messages[] = sprintf( $message, $from_php, $to_php ); + } + } + + if ( defined( 'WP_CLI' ) ) { + $assoc_args = array(); + if ( isset( $params['cli_args'] ) ) { + $assoc_args = $params['cli_args']; + } + + WP_CLI::confirm( implode( PHP_EOL, $messages ), $assoc_args ); + + return $params; + } + + // Set progress + Ai1wm_Status::confirm( implode( $messages ) ); + exit; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-content.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-content.php new file mode 100644 index 0000000..51f268c --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-content.php @@ -0,0 +1,264 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Content { + + public static function execute( $params ) { + + // Set archive bytes offset + if ( isset( $params['archive_bytes_offset'] ) ) { + $archive_bytes_offset = (int) $params['archive_bytes_offset']; + } else { + $archive_bytes_offset = 0; + } + + // Set file bytes offset + if ( isset( $params['file_bytes_offset'] ) ) { + $file_bytes_offset = (int) $params['file_bytes_offset']; + } else { + $file_bytes_offset = 0; + } + + // Get processed files size + if ( isset( $params['processed_files_size'] ) ) { + $processed_files_size = (int) $params['processed_files_size']; + } else { + $processed_files_size = 0; + } + + // Get total files size + if ( isset( $params['total_files_size'] ) ) { + $total_files_size = (int) $params['total_files_size']; + } else { + $total_files_size = 1; + } + + // Get total files count + if ( isset( $params['total_files_count'] ) ) { + $total_files_count = (int) $params['total_files_count']; + } else { + $total_files_count = 1; + } + + // Read blogs.json file + $handle = ai1wm_open( ai1wm_blogs_path( $params ), 'r' ); + + // Parse blogs.json file + $blogs = ai1wm_read( $handle, filesize( ai1wm_blogs_path( $params ) ) ); + $blogs = json_decode( $blogs, true ); + + // Close handle + ai1wm_close( $handle ); + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Restoring %d files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_files_count, $progress ) ); + + // Flag to hold if file data has been processed + $completed = true; + + // Start time + $start = microtime( true ); + + // Open the archive file for reading + $archive = new Ai1wm_Extractor( ai1wm_archive_path( $params ) ); + + // Set the file pointer to the one that we have saved + $archive->set_file_pointer( $archive_bytes_offset ); + + $old_paths = array( 'plugins', 'themes' ); + $new_paths = array( ai1wm_get_plugins_dir(), get_theme_root() ); + + // Set extract paths + foreach ( $blogs as $blog ) { + if ( ai1wm_is_mainsite( $blog['Old']['BlogID'] ) === false ) { + if ( defined( 'UPLOADBLOGSDIR' ) ) { + // Old files dir style + $old_paths[] = ai1wm_blog_files_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_files_abspath( $blog['New']['BlogID'] ); + + // Old blogs.dir style + $old_paths[] = ai1wm_blog_blogsdir_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_blogsdir_abspath( $blog['New']['BlogID'] ); + + // New sites dir style + $old_paths[] = ai1wm_blog_sites_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_files_abspath( $blog['New']['BlogID'] ); + } else { + // Old files dir style + $old_paths[] = ai1wm_blog_files_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_sites_abspath( $blog['New']['BlogID'] ); + + // Old blogs.dir style + $old_paths[] = ai1wm_blog_blogsdir_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_sites_abspath( $blog['New']['BlogID'] ); + + // New sites dir style + $old_paths[] = ai1wm_blog_sites_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_sites_abspath( $blog['New']['BlogID'] ); + } + } + } + + // Set base site extract paths (should be added at the end of arrays) + foreach ( $blogs as $blog ) { + if ( ai1wm_is_mainsite( $blog['Old']['BlogID'] ) === true ) { + if ( defined( 'UPLOADBLOGSDIR' ) ) { + // Old files dir style + $old_paths[] = ai1wm_blog_files_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_files_abspath( $blog['New']['BlogID'] ); + + // Old blogs.dir style + $old_paths[] = ai1wm_blog_blogsdir_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_blogsdir_abspath( $blog['New']['BlogID'] ); + + // New sites dir style + $old_paths[] = ai1wm_blog_sites_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_files_abspath( $blog['New']['BlogID'] ); + } else { + // Old files dir style + $old_paths[] = ai1wm_blog_files_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_sites_abspath( $blog['New']['BlogID'] ); + + // Old blogs.dir style + $old_paths[] = ai1wm_blog_blogsdir_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_sites_abspath( $blog['New']['BlogID'] ); + + // New sites dir style + $old_paths[] = ai1wm_blog_sites_relpath( $blog['Old']['BlogID'] ); + $new_paths[] = ai1wm_blog_sites_abspath( $blog['New']['BlogID'] ); + } + } + } + + $old_paths[] = ai1wm_blog_sites_relpath(); + $new_paths[] = ai1wm_blog_sites_abspath(); + + while ( $archive->has_not_reached_eof() ) { + $file_bytes_written = 0; + + // Exclude WordPress files + $exclude_files = array_keys( _get_dropins() ); + + // Exclude plugin files + $exclude_files = array_merge( + $exclude_files, + array( + AI1WM_PACKAGE_NAME, + AI1WM_MULTISITE_NAME, + AI1WM_DATABASE_NAME, + AI1WM_MUPLUGINS_NAME, + ) + ); + + // Exclude theme files + $exclude_files = array_merge( $exclude_files, array( AI1WM_THEMES_FUNCTIONS_NAME ) ); + + // Exclude Elementor files + $exclude_files = array_merge( $exclude_files, array( AI1WM_ELEMENTOR_CSS_NAME ) ); + + // Exclude content extensions + $exclude_extensions = array( AI1WM_LESS_CACHE_NAME ); + + // Extract a file from archive to WP_CONTENT_DIR + if ( ( $completed = $archive->extract_one_file_to( WP_CONTENT_DIR, $exclude_files, $exclude_extensions, $old_paths, $new_paths, $file_bytes_written, $file_bytes_offset ) ) ) { + $file_bytes_offset = 0; + } + + // Get archive bytes offset + $archive_bytes_offset = $archive->get_file_pointer(); + + // Increment processed files size + $processed_files_size += $file_bytes_written; + + // What percent of files have we processed? + $progress = (int) min( ( $processed_files_size / $total_files_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Restoring %d files...
%d%% complete', AI1WM_PLUGIN_NAME ), $total_files_count, $progress ) ); + + // More than 10 seconds have passed, break and do another request + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + + // End of the archive? + if ( $archive->has_reached_eof() ) { + + // Unset archive bytes offset + unset( $params['archive_bytes_offset'] ); + + // Unset file bytes offset + unset( $params['file_bytes_offset'] ); + + // Unset processed files size + unset( $params['processed_files_size'] ); + + // Unset total files size + unset( $params['total_files_size'] ); + + // Unset total files count + unset( $params['total_files_count'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // Set archive bytes offset + $params['archive_bytes_offset'] = $archive_bytes_offset; + + // Set file bytes offset + $params['file_bytes_offset'] = $file_bytes_offset; + + // Set processed files size + $params['processed_files_size'] = $processed_files_size; + + // Set total files size + $params['total_files_size'] = $total_files_size; + + // Set total files count + $params['total_files_count'] = $total_files_count; + + // Set completed flag + $params['completed'] = $completed; + } + + // Close the archive file + $archive->close(); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-database.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-database.php new file mode 100644 index 0000000..e9ecaea --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-database.php @@ -0,0 +1,1063 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Database { + + public static function execute( $params, Ai1wm_Database $mysql = null ) { + global $wpdb; + + // Skip database import + if ( ! is_file( ai1wm_database_path( $params ) ) ) { + return $params; + } + + // Set query offset + if ( isset( $params['query_offset'] ) ) { + $query_offset = (int) $params['query_offset']; + } else { + $query_offset = 0; + } + + // Set total queries size + if ( isset( $params['total_queries_size'] ) ) { + $total_queries_size = (int) $params['total_queries_size']; + } else { + $total_queries_size = 1; + } + + // Read blogs.json file + $handle = ai1wm_open( ai1wm_blogs_path( $params ), 'r' ); + + // Parse blogs.json file + $blogs = ai1wm_read( $handle, filesize( ai1wm_blogs_path( $params ) ) ); + $blogs = json_decode( $blogs, true ); + + // Close handle + ai1wm_close( $handle ); + + // Read package.json file + $handle = ai1wm_open( ai1wm_package_path( $params ), 'r' ); + + // Parse package.json file + $config = ai1wm_read( $handle, filesize( ai1wm_package_path( $params ) ) ); + $config = json_decode( $config, true ); + + // Close handle + ai1wm_close( $handle ); + + // What percent of queries have we processed? + $progress = (int) ( ( $query_offset / $total_queries_size ) * 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Restoring database...
%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) ); + + $old_replace_values = $old_replace_raw_values = array(); + $new_replace_values = $new_replace_raw_values = array(); + + // Get Blog URLs + foreach ( $blogs as $blog ) { + + // Handle old and new sites dir style + if ( defined( 'UPLOADBLOGSDIR' ) ) { + + // Get plain Files Path + if ( ! in_array( ai1wm_blog_files_url( $blog['Old']['BlogID'] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_blog_files_url( $blog['Old']['BlogID'] ); + $new_replace_values[] = ai1wm_blog_files_url( $blog['New']['BlogID'] ); + } + + // Get URL encoded Files Path + if ( ! in_array( urlencode( ai1wm_blog_files_url( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_blog_files_url( $blog['Old']['BlogID'] ) ); + $new_replace_values[] = urlencode( ai1wm_blog_files_url( $blog['New']['BlogID'] ) ); + } + + // Get URL raw encoded Files Path + if ( ! in_array( rawurlencode( ai1wm_blog_files_url( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_blog_files_url( $blog['Old']['BlogID'] ) ); + $new_replace_values[] = rawurlencode( ai1wm_blog_files_url( $blog['New']['BlogID'] ) ); + } + + // Get JSON escaped Files Path + if ( ! in_array( addcslashes( ai1wm_blog_files_url( $blog['Old']['BlogID'] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_blog_files_url( $blog['Old']['BlogID'] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_blog_files_url( $blog['New']['BlogID'] ), '/' ); + } + + // Get plain Sites Path + if ( ! in_array( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_blog_sites_url( $blog['Old']['BlogID'] ); + $new_replace_values[] = ai1wm_blog_files_url( $blog['New']['BlogID'] ); + } + + // Get URL encoded Sites Path + if ( ! in_array( urlencode( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ) ); + $new_replace_values[] = urlencode( ai1wm_blog_files_url( $blog['New']['BlogID'] ) ); + } + + // Get URL raw encoded Sites Path + if ( ! in_array( rawurlencode( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ) ); + $new_replace_values[] = rawurlencode( ai1wm_blog_files_url( $blog['New']['BlogID'] ) ); + } + + // Get JSON escaped Sites Path + if ( ! in_array( addcslashes( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_blog_files_url( $blog['New']['BlogID'] ), '/' ); + } + } else { + + // Get plain Files Path + if ( ! in_array( ai1wm_blog_files_url( $blog['Old']['BlogID'] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_blog_files_url( $blog['Old']['BlogID'] ); + $new_replace_values[] = ai1wm_blog_uploads_url( $blog['New']['BlogID'] ); + } + + // Get URL encoded Files Path + if ( ! in_array( urlencode( ai1wm_blog_files_url( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_blog_files_url( $blog['Old']['BlogID'] ) ); + $new_replace_values[] = urlencode( ai1wm_blog_uploads_url( $blog['New']['BlogID'] ) ); + } + + // Get URL raw encoded Files Path + if ( ! in_array( rawurlencode( ai1wm_blog_files_url( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_blog_files_url( $blog['Old']['BlogID'] ) ); + $new_replace_values[] = rawurlencode( ai1wm_blog_uploads_url( $blog['New']['BlogID'] ) ); + } + + // Get JSON escaped Files Path + if ( ! in_array( addcslashes( ai1wm_blog_files_url( $blog['Old']['BlogID'] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_blog_files_url( $blog['Old']['BlogID'] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_blog_uploads_url( $blog['New']['BlogID'] ), '/' ); + } + + // Get plain Sites Path + if ( ! in_array( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_blog_sites_url( $blog['Old']['BlogID'] ); + $new_replace_values[] = ai1wm_blog_uploads_url( $blog['New']['BlogID'] ); + } + + // Get URL encoded Sites Path + if ( ! in_array( urlencode( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ) ); + $new_replace_values[] = urlencode( ai1wm_blog_uploads_url( $blog['New']['BlogID'] ) ); + } + + // Get URL raw encoded Sites Path + if ( ! in_array( rawurlencode( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ) ); + $new_replace_values[] = rawurlencode( ai1wm_blog_uploads_url( $blog['New']['BlogID'] ) ); + } + + // Get JSON escaped Sites Path + if ( ! in_array( addcslashes( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_blog_sites_url( $blog['Old']['BlogID'] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_blog_uploads_url( $blog['New']['BlogID'] ), '/' ); + } + } + + $site_urls = array(); + + // Add Site URL + if ( ! empty( $blog['Old']['SiteURL'] ) ) { + $site_urls[] = $blog['Old']['SiteURL']; + } + + // Add Internal Site URL + if ( ! empty( $blog['Old']['InternalSiteURL'] ) ) { + if ( parse_url( $blog['Old']['InternalSiteURL'], PHP_URL_SCHEME ) && parse_url( $blog['Old']['InternalSiteURL'], PHP_URL_HOST ) ) { + $site_urls[] = $blog['Old']['InternalSiteURL']; + } + } + + // Get Site URL + foreach ( $site_urls as $site_url ) { + + // Get www URL + if ( stripos( $site_url, '//www.' ) !== false ) { + $site_url_www_inversion = str_ireplace( '//www.', '//', $site_url ); + } else { + $site_url_www_inversion = str_ireplace( '//', '//www.', $site_url ); + } + + // Replace Site URL + foreach ( array( $site_url, $site_url_www_inversion ) as $url ) { + + // Get domain + $old_domain = parse_url( $url, PHP_URL_HOST ); + $new_domain = parse_url( $blog['New']['SiteURL'], PHP_URL_HOST ); + + // Get path + $old_path = parse_url( $url, PHP_URL_PATH ); + $new_path = parse_url( $blog['New']['SiteURL'], PHP_URL_PATH ); + + // Get scheme + $new_scheme = parse_url( $blog['New']['SiteURL'], PHP_URL_SCHEME ); + + // Add domain and path + if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_replace_raw_values ) ) { + $old_replace_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ); + $new_replace_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) ); + } + + // Add domain and path with single quote + if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) ); + } + + // Add domain and path with double quote + if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) ); + } + + // Add Site URL scheme + $old_schemes = array( 'http', 'https', '' ); + $new_schemes = array( $new_scheme, $new_scheme, '' ); + + // Replace Site URL scheme + for ( $i = 0; $i < count( $old_schemes ); $i++ ) { + + // Handle old and new sites dir style + if ( ! defined( 'UPLOADBLOGSDIR' ) ) { + + // Add plain Uploads URL + if ( ! in_array( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ); + $new_replace_values[] = ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ); + } + + // Add URL encoded Uploads URL + if ( ! in_array( urlencode( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ) ); + $new_replace_values[] = urlencode( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ) ); + } + + // Add URL raw encoded Uploads URL + if ( ! in_array( rawurlencode( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ) ); + $new_replace_values[] = rawurlencode( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ) ); + } + + // Add JSON escaped Uploads URL + if ( ! in_array( addcslashes( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ), '/' ); + } + } + + // Add plain Site URL + if ( ! in_array( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ); + $new_replace_values[] = ai1wm_url_scheme( untrailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ); + } + + // Add URL encoded Site URL + if ( ! in_array( urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ); + $new_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ) ); + } + + // Add URL raw encoded Site URL + if ( ! in_array( rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ); + $new_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ) ); + } + + // Add JSON escaped Site URL + if ( ! in_array( addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $blog['New']['SiteURL'] ), $new_schemes[ $i ] ), '/' ); + } + } + + // Add email + if ( ! isset( $config['NoEmailReplace'] ) ) { + if ( ! in_array( sprintf( '@%s', $old_domain ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '@%s', $old_domain ); + $new_replace_values[] = str_ireplace( '@www.', '@', sprintf( '@%s', $new_domain ) ); + } + } + } + } + + $home_urls = array(); + + // Add Home URL + if ( ! empty( $blog['Old']['HomeURL'] ) ) { + $home_urls[] = $blog['Old']['HomeURL']; + } + + // Add Internal Home URL + if ( ! empty( $blog['Old']['InternalHomeURL'] ) ) { + if ( parse_url( $blog['Old']['InternalHomeURL'], PHP_URL_SCHEME ) && parse_url( $blog['Old']['InternalHomeURL'], PHP_URL_HOST ) ) { + $home_urls[] = $blog['Old']['InternalHomeURL']; + } + } + + // Get Home URL + foreach ( $home_urls as $home_url ) { + + // Get www URL + if ( stripos( $home_url, '//www.' ) !== false ) { + $home_url_www_inversion = str_ireplace( '//www.', '//', $home_url ); + } else { + $home_url_www_inversion = str_ireplace( '//', '//www.', $home_url ); + } + + // Replace Home URL + foreach ( array( $home_url, $home_url_www_inversion ) as $url ) { + + // Get domain + $old_domain = parse_url( $url, PHP_URL_HOST ); + $new_domain = parse_url( $blog['New']['HomeURL'], PHP_URL_HOST ); + + // Get path + $old_path = parse_url( $url, PHP_URL_PATH ); + $new_path = parse_url( $blog['New']['HomeURL'], PHP_URL_PATH ); + + // Get scheme + $new_scheme = parse_url( $blog['New']['HomeURL'], PHP_URL_SCHEME ); + + // Add domain and path + if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_replace_raw_values ) ) { + $old_replace_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ); + $new_replace_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) ); + } + + // Add domain and path with single quote + if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) ); + } + + // Add domain and path with double quote + if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) ); + } + + // Set Home URL scheme + $old_schemes = array( 'http', 'https', '' ); + $new_schemes = array( $new_scheme, $new_scheme, '' ); + + // Replace Home URL scheme + for ( $i = 0; $i < count( $old_schemes ); $i++ ) { + + // Handle old and new sites dir style + if ( ! defined( 'UPLOADBLOGSDIR' ) ) { + + // Add plain Uploads URL + if ( ! in_array( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ); + $new_replace_values[] = ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ); + } + + // Add URL encoded Uploads URL + if ( ! in_array( urlencode( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ) ); + $new_replace_values[] = urlencode( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ) ); + } + + // Add URL raw encoded Uploads URL + if ( ! in_array( rawurlencode( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ) ); + $new_replace_values[] = rawurlencode( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ) ); + } + + // Add JSON escaped Uploads URL + if ( ! in_array( addcslashes( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_url_scheme( sprintf( '%s/files/', untrailingslashit( $url ) ), $old_schemes[ $i ] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ), '/' ); + } + } + + // Add plain Home URL + if ( ! in_array( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ); + $new_replace_values[] = ai1wm_url_scheme( untrailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ); + } + + // Add URL encoded Home URL + if ( ! in_array( urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ); + $new_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ) ); + } + + // Add URL raw encoded Home URL + if ( ! in_array( rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ); + $new_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ) ); + } + + // Add JSON escaped Home URL + if ( ! in_array( addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $blog['New']['HomeURL'] ), $new_schemes[ $i ] ), '/' ); + } + } + + // Add email + if ( ! isset( $config['NoEmailReplace'] ) ) { + if ( ! in_array( sprintf( '@%s', $old_domain ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '@%s', $old_domain ); + $new_replace_values[] = str_ireplace( '@www.', '@', sprintf( '@%s', $new_domain ) ); + } + } + } + } + + $uploads_urls = array(); + + // Add Uploads URL + if ( ! empty( $blog['Old']['WordPress']['UploadsURL'] ) ) { + $uploads_urls[] = $blog['Old']['WordPress']['UploadsURL']; + } + + // Get Uploads URL + foreach ( $uploads_urls as $uploads_url ) { + + // Get www URL + if ( stripos( $uploads_url, '//www.' ) !== false ) { + $uploads_url_www_inversion = str_ireplace( '//www.', '//', $uploads_url ); + } else { + $uploads_url_www_inversion = str_ireplace( '//', '//www.', $uploads_url ); + } + + // Replace Uploads URL + foreach ( array( $uploads_url, $uploads_url_www_inversion ) as $url ) { + + // Get path + $old_path = parse_url( $url, PHP_URL_PATH ); + $new_path = parse_url( $blog['New']['WordPress']['UploadsURL'], PHP_URL_PATH ); + + // Get scheme + $new_scheme = parse_url( $blog['New']['WordPress']['UploadsURL'], PHP_URL_SCHEME ); + + // Replace Uploads URL Path + if ( basename( $old_path ) ) { + + // Add path with single quote + if ( ! in_array( sprintf( "='%s", trailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( "='%s", trailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( "='%s", trailingslashit( $new_path ) ); + } + + // Add path with double quote + if ( ! in_array( sprintf( '="%s', trailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '="%s', trailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( '="%s', trailingslashit( $new_path ) ); + } + } + + // Set Uploads URL scheme + $old_schemes = array( 'http', 'https', '' ); + $new_schemes = array( $new_scheme, $new_scheme, '' ); + + // Replace Uploads URL scheme + for ( $i = 0; $i < count( $old_schemes ); $i++ ) { + + // Add plain Uploads URL + if ( ! in_array( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_url_scheme( $url, $old_schemes[ $i ] ); + $new_replace_values[] = ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ); + } + + // Add URL encoded Uploads URL + if ( ! in_array( urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ); + $new_replace_values[] = urlencode( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ) ); + } + + // Add URL raw encoded Uploads URL + if ( ! in_array( rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ); + $new_replace_values[] = rawurlencode( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ) ); + } + + // Add JSON escaped Uploads URL + if ( ! in_array( addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_url_scheme( $blog['New']['WordPress']['UploadsURL'], $new_schemes[ $i ] ), '/' ); + } + } + } + } + } + + // Get plain Sites Path + if ( ! in_array( ai1wm_blog_sites_url(), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_blog_sites_url(); + $new_replace_values[] = ai1wm_blog_uploads_url(); + } + + // Get URL encoded Sites Path + if ( ! in_array( urlencode( ai1wm_blog_sites_url() ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_blog_sites_url() ); + $new_replace_values[] = urlencode( ai1wm_blog_uploads_url() ); + } + + // Get URL raw encoded Sites Path + if ( ! in_array( rawurlencode( ai1wm_blog_sites_url() ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_blog_sites_url() ); + $new_replace_values[] = rawurlencode( ai1wm_blog_uploads_url() ); + } + + // Get JSON escaped Sites Path + if ( ! in_array( addcslashes( ai1wm_blog_sites_url(), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_blog_sites_url(), '/' ); + $new_replace_values[] = addcslashes( ai1wm_blog_uploads_url(), '/' ); + } + + $site_urls = array(); + + // Add Site URL + if ( ! empty( $config['SiteURL'] ) ) { + $site_urls[] = $config['SiteURL']; + } + + // Add Internal Site URL + if ( ! empty( $config['InternalSiteURL'] ) ) { + if ( parse_url( $config['InternalSiteURL'], PHP_URL_SCHEME ) && parse_url( $config['InternalSiteURL'], PHP_URL_HOST ) ) { + $site_urls[] = $config['InternalSiteURL']; + } + } + + // Get Site URL + foreach ( $site_urls as $site_url ) { + + // Get www URL + if ( stripos( $site_url, '//www.' ) !== false ) { + $site_url_www_inversion = str_ireplace( '//www.', '//', $site_url ); + } else { + $site_url_www_inversion = str_ireplace( '//', '//www.', $site_url ); + } + + // Replace Site URL + foreach ( array( $site_url, $site_url_www_inversion ) as $url ) { + + // Get domain + $old_domain = parse_url( $url, PHP_URL_HOST ); + $new_domain = parse_url( site_url(), PHP_URL_HOST ); + + // Get path + $old_path = parse_url( $url, PHP_URL_PATH ); + $new_path = parse_url( site_url(), PHP_URL_PATH ); + + // Get scheme + $new_scheme = parse_url( site_url(), PHP_URL_SCHEME ); + + // Add domain and path + if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_replace_raw_values ) ) { + $old_replace_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ); + $new_replace_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) ); + } + + // Add domain and path with single quote + if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) ); + } + + // Add domain and path with double quote + if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) ); + } + + // Set Site URL scheme + $old_schemes = array( 'http', 'https', '' ); + $new_schemes = array( $new_scheme, $new_scheme, '' ); + + // Replace Site URL scheme + for ( $i = 0; $i < count( $old_schemes ); $i++ ) { + + // Add plain Site URL + if ( ! in_array( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ); + $new_replace_values[] = ai1wm_url_scheme( untrailingslashit( site_url() ), $new_schemes[ $i ] ); + } + + // Add URL encoded Site URL + if ( ! in_array( urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ); + $new_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( site_url() ), $new_schemes[ $i ] ) ); + } + + // Add URL raw encoded Site URL + if ( ! in_array( rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ); + $new_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( site_url() ), $new_schemes[ $i ] ) ); + } + + // Add JSON escaped Site URL + if ( ! in_array( addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( site_url() ), $new_schemes[ $i ] ), '/' ); + } + } + + // Add email + if ( ! isset( $config['NoEmailReplace'] ) ) { + if ( ! in_array( sprintf( '@%s', $old_domain ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '@%s', $old_domain ); + $new_replace_values[] = str_ireplace( '@www.', '@', sprintf( '@%s', $new_domain ) ); + } + } + } + } + + $home_urls = array(); + + // Add Home URL + if ( ! empty( $config['HomeURL'] ) ) { + $home_urls[] = $config['HomeURL']; + } + + // Add Internal Home URL + if ( ! empty( $config['InternalHomeURL'] ) ) { + if ( parse_url( $config['InternalHomeURL'], PHP_URL_SCHEME ) && parse_url( $config['InternalHomeURL'], PHP_URL_HOST ) ) { + $home_urls[] = $config['InternalHomeURL']; + } + } + + // Get Home URL + foreach ( $home_urls as $home_url ) { + + // Get www URL + if ( stripos( $home_url, '//www.' ) !== false ) { + $home_url_www_inversion = str_ireplace( '//www.', '//', $home_url ); + } else { + $home_url_www_inversion = str_ireplace( '//', '//www.', $home_url ); + } + + // Replace Home URL + foreach ( array( $home_url, $home_url_www_inversion ) as $url ) { + + // Get domain + $old_domain = parse_url( $url, PHP_URL_HOST ); + $new_domain = parse_url( home_url(), PHP_URL_HOST ); + + // Get path + $old_path = parse_url( $url, PHP_URL_PATH ); + $new_path = parse_url( home_url(), PHP_URL_PATH ); + + // Get scheme + $new_scheme = parse_url( home_url(), PHP_URL_SCHEME ); + + // Add domain and path + if ( ! in_array( sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ), $old_replace_raw_values ) ) { + $old_replace_raw_values[] = sprintf( "'%s','%s'", $old_domain, trailingslashit( $old_path ) ); + $new_replace_raw_values[] = sprintf( "'%s','%s'", $new_domain, trailingslashit( $new_path ) ); + } + + // Add domain and path with single quote + if ( ! in_array( sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( "='%s%s", $old_domain, untrailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( "='%s%s", $new_domain, untrailingslashit( $new_path ) ); + } + + // Add domain and path with double quote + if ( ! in_array( sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '="%s%s', $old_domain, untrailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( '="%s%s', $new_domain, untrailingslashit( $new_path ) ); + } + + // Add Home URL scheme + $old_schemes = array( 'http', 'https', '' ); + $new_schemes = array( $new_scheme, $new_scheme, '' ); + + // Replace Home URL scheme + for ( $i = 0; $i < count( $old_schemes ); $i++ ) { + + // Add plain Home URL + if ( ! in_array( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ); + $new_replace_values[] = ai1wm_url_scheme( untrailingslashit( home_url() ), $new_schemes[ $i ] ); + } + + // Add URL encoded Home URL + if ( ! in_array( urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ); + $new_replace_values[] = urlencode( ai1wm_url_scheme( untrailingslashit( home_url() ), $new_schemes[ $i ] ) ); + } + + // Add URL raw encoded Home URL + if ( ! in_array( rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ) ); + $new_replace_values[] = rawurlencode( ai1wm_url_scheme( untrailingslashit( home_url() ), $new_schemes[ $i ] ) ); + } + + // Add JSON escaped Home URL + if ( ! in_array( addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( $url ), $old_schemes[ $i ] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_url_scheme( untrailingslashit( home_url() ), $new_schemes[ $i ] ), '/' ); + } + } + + // Add email + if ( ! isset( $config['NoEmailReplace'] ) ) { + if ( ! in_array( sprintf( '@%s', $old_domain ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '@%s', $old_domain ); + $new_replace_values[] = str_ireplace( '@www.', '@', sprintf( '@%s', $new_domain ) ); + } + } + } + } + + $uploads_urls = array(); + + // Add Uploads URL + if ( ! empty( $config['WordPress']['UploadsURL'] ) ) { + $uploads_urls[] = $config['WordPress']['UploadsURL']; + } + + // Get Uploads URL + foreach ( $uploads_urls as $uploads_url ) { + + // Get www URL + if ( stripos( $uploads_url, '//www.' ) !== false ) { + $uploads_url_www_inversion = str_ireplace( '//www.', '//', $uploads_url ); + } else { + $uploads_url_www_inversion = str_ireplace( '//', '//www.', $uploads_url ); + } + + // Replace Uploads URL + foreach ( array( $uploads_url, $uploads_url_www_inversion ) as $url ) { + + // Get path + $old_path = parse_url( $url, PHP_URL_PATH ); + $new_path = parse_url( ai1wm_get_uploads_url(), PHP_URL_PATH ); + + // Get scheme + $new_scheme = parse_url( ai1wm_get_uploads_url(), PHP_URL_SCHEME ); + + // Replace Uploads URL Path + if ( basename( $old_path ) ) { + + // Add path with single quote + if ( ! in_array( sprintf( "='%s", trailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( "='%s", trailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( "='%s", trailingslashit( $new_path ) ); + } + + // Add path with double quote + if ( ! in_array( sprintf( '="%s', trailingslashit( $old_path ) ), $old_replace_values ) ) { + $old_replace_values[] = sprintf( '="%s', trailingslashit( $old_path ) ); + $new_replace_values[] = sprintf( '="%s', trailingslashit( $new_path ) ); + } + } + + // Add Uploads URL scheme + $old_schemes = array( 'http', 'https', '' ); + $new_schemes = array( $new_scheme, $new_scheme, '' ); + + // Replace Uploads URL scheme + for ( $i = 0; $i < count( $old_schemes ); $i++ ) { + + // Add plain Uploads URL + if ( ! in_array( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = ai1wm_url_scheme( $url, $old_schemes[ $i ] ); + $new_replace_values[] = ai1wm_url_scheme( ai1wm_get_uploads_url(), $new_schemes[ $i ] ); + } + + // Add URL encoded Uploads URL + if ( ! in_array( urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ); + $new_replace_values[] = urlencode( ai1wm_url_scheme( ai1wm_get_uploads_url(), $new_schemes[ $i ] ) ); + } + + // Add URL raw encoded Uploads URL + if ( ! in_array( rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( ai1wm_url_scheme( $url, $old_schemes[ $i ] ) ); + $new_replace_values[] = rawurlencode( ai1wm_url_scheme( ai1wm_get_uploads_url(), $new_schemes[ $i ] ) ); + } + + // Add JSON escaped Uploads URL + if ( ! in_array( addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( ai1wm_url_scheme( $url, $old_schemes[ $i ] ), '/' ); + $new_replace_values[] = addcslashes( ai1wm_url_scheme( ai1wm_get_uploads_url(), $new_schemes[ $i ] ), '/' ); + } + } + } + } + + // Get WordPress Content Dir + if ( isset( $config['WordPress']['Content'] ) && ( $content_dir = $config['WordPress']['Content'] ) ) { + + // Add plain WordPress Content + if ( ! in_array( $content_dir, $old_replace_values ) ) { + $old_replace_values[] = $content_dir; + $new_replace_values[] = WP_CONTENT_DIR; + } + + // Add URL encoded WordPress Content + if ( ! in_array( urlencode( $content_dir ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( $content_dir ); + $new_replace_values[] = urlencode( WP_CONTENT_DIR ); + } + + // Add URL raw encoded WordPress Content + if ( ! in_array( rawurlencode( $content_dir ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( $content_dir ); + $new_replace_values[] = rawurlencode( WP_CONTENT_DIR ); + } + + // Add JSON escaped WordPress Content + if ( ! in_array( addcslashes( $content_dir, '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( $content_dir, '/' ); + $new_replace_values[] = addcslashes( WP_CONTENT_DIR, '/' ); + } + } + + // Get replace old and new values + if ( isset( $config['Replace'] ) && ( $replace = $config['Replace'] ) ) { + for ( $i = 0; $i < count( $replace['OldValues'] ); $i++ ) { + if ( ! empty( $replace['OldValues'][ $i ] ) && ! empty( $replace['NewValues'][ $i ] ) ) { + + // Add plain replace values + if ( ! in_array( $replace['OldValues'][ $i ], $old_replace_values ) ) { + $old_replace_values[] = $replace['OldValues'][ $i ]; + $new_replace_values[] = $replace['NewValues'][ $i ]; + } + + // Add URL encoded replace values + if ( ! in_array( urlencode( $replace['OldValues'][ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = urlencode( $replace['OldValues'][ $i ] ); + $new_replace_values[] = urlencode( $replace['NewValues'][ $i ] ); + } + + // Add URL raw encoded replace values + if ( ! in_array( rawurlencode( $replace['OldValues'][ $i ] ), $old_replace_values ) ) { + $old_replace_values[] = rawurlencode( $replace['OldValues'][ $i ] ); + $new_replace_values[] = rawurlencode( $replace['NewValues'][ $i ] ); + } + + // Add JSON Escaped replace values + if ( ! in_array( addcslashes( $replace['OldValues'][ $i ], '/' ), $old_replace_values ) ) { + $old_replace_values[] = addcslashes( $replace['OldValues'][ $i ], '/' ); + $new_replace_values[] = addcslashes( $replace['NewValues'][ $i ], '/' ); + } + } + } + } + + // Get site URL + $site_url = get_option( AI1WM_SITE_URL ); + + // Get home URL + $home_url = get_option( AI1WM_HOME_URL ); + + // Get secret key + $secret_key = get_option( AI1WM_SECRET_KEY ); + + // Get HTTP user + $auth_user = get_option( AI1WM_AUTH_USER ); + + // Get HTTP password + $auth_password = get_option( AI1WM_AUTH_PASSWORD ); + + // Get auth header + $auth_header = get_option( AI1WM_AUTH_HEADER ); + + // Get Uploads Path + $uploads_path = get_option( AI1WM_UPLOADS_PATH ); + + // Get Uploads URL Path + $uploads_url_path = get_option( AI1WM_UPLOADS_URL_PATH ); + + // Get backups labels + $backups_labels = get_option( AI1WM_BACKUPS_LABELS, array() ); + + // Get sites links + $sites_links = get_option( AI1WM_SITES_LINKS, array() ); + + $old_table_prefixes = array(); + $new_table_prefixes = array(); + + // Set site table prefixes + foreach ( $blogs as $blog ) { + if ( ai1wm_is_mainsite( $blog['Old']['BlogID'] ) === false ) { + $old_table_prefixes[] = ai1wm_servmask_prefix( $blog['Old']['BlogID'] ); + $new_table_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] ); + } + } + + // Set global table prefixes + foreach ( $wpdb->global_tables as $table_name ) { + $old_table_prefixes[] = ai1wm_servmask_prefix( 'mainsite' ) . $table_name; + $new_table_prefixes[] = ai1wm_table_prefix() . $table_name; + } + + // Set BuddyPress table prefixes + if ( ai1wm_validate_plugin_basename( 'buddyboss-platform/bp-loader.php' ) || ai1wm_validate_plugin_basename( 'buddypress/bp-loader.php' ) ) { + foreach ( array( 'signups', 'bp_activity', 'bp_activity_meta', 'bp_friends', 'bp_groups', 'bp_groups_groupmeta', 'bp_groups_members', 'bp_invitations', 'bp_messages_messages', 'bp_messages_meta', 'bp_messages_notices', 'bp_messages_recipients', 'bp_notifications', 'bp_notifications_meta', 'bp_optouts', 'bp_user_blogs', 'bp_user_blogs_blogmeta', 'bp_xprofile_data', 'bp_xprofile_fields', 'bp_xprofile_groups', 'bp_xprofile_meta' ) as $table_name ) { + $old_table_prefixes[] = ai1wm_servmask_prefix( 'mainsite' ) . $table_name; + $new_table_prefixes[] = ai1wm_table_prefix() . $table_name; + } + } + + // Set base table prefixes + foreach ( $blogs as $blog ) { + if ( ai1wm_is_mainsite( $blog['Old']['BlogID'] ) === true ) { + $old_table_prefixes[] = ai1wm_servmask_prefix( 'basesite' ); + $new_table_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] ); + } + } + + // Set main table prefixes + foreach ( $blogs as $blog ) { + if ( ai1wm_is_mainsite( $blog['Old']['BlogID'] ) === true ) { + $old_table_prefixes[] = ai1wm_servmask_prefix( $blog['Old']['BlogID'] ); + $new_table_prefixes[] = ai1wm_table_prefix( $blog['New']['BlogID'] ); + } + } + + // Set table prefixes + $old_table_prefixes[] = ai1wm_servmask_prefix(); + $new_table_prefixes[] = ai1wm_table_prefix(); + + // Get database client + if ( is_null( $mysql ) ) { + $mysql = Ai1wm_Database_Utility::create_client(); + } + + // Set database options + $mysql->set_old_table_prefixes( $old_table_prefixes ) + ->set_new_table_prefixes( $new_table_prefixes ) + ->set_old_replace_values( $old_replace_values ) + ->set_new_replace_values( $new_replace_values ) + ->set_old_replace_raw_values( $old_replace_raw_values ) + ->set_new_replace_raw_values( $new_replace_raw_values ); + + // Set atomic tables (do not stop current request for all listed tables if timeout has been exceeded) + $mysql->set_atomic_tables( array( ai1wm_table_prefix() . 'options' ) ); + + // Set empty tables (do not populate current data for all listed tables) + $mysql->set_empty_tables( array( ai1wm_table_prefix() . 'eum_logs' ) ); + + // Set Visual Composer + $mysql->set_visual_composer( ai1wm_validate_plugin_basename( 'js_composer/js_composer.php' ) ); + + // Set Oxygen Builder + $mysql->set_oxygen_builder( ai1wm_validate_plugin_basename( 'oxygen/functions.php' ) ); + + // Set Optimize Press + $mysql->set_optimize_press( ai1wm_validate_plugin_basename( 'optimizePressPlugin/optimizepress.php' ) ); + + // Set Avada Fusion Builder + $mysql->set_avada_fusion_builder( ai1wm_validate_plugin_basename( 'fusion-builder/fusion-builder.php' ) ); + + // Set BeTheme Responsive + $mysql->set_betheme_responsive( ai1wm_validate_theme_basename( 'betheme/style.css' ) ); + + // Import database + if ( $mysql->import( ai1wm_database_path( $params ), $query_offset ) ) { + + // Set progress + Ai1wm_Status::info( __( 'Done restoring database.', AI1WM_PLUGIN_NAME ) ); + + // Unset query offset + unset( $params['query_offset'] ); + + // Unset total queries size + unset( $params['total_queries_size'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // Get total queries size + $total_queries_size = ai1wm_database_bytes( $params ); + + // What percent of queries have we processed? + $progress = (int) ( ( $query_offset / $total_queries_size ) * 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Restoring database...
%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) ); + + // Set query offset + $params['query_offset'] = $query_offset; + + // Set total queries size + $params['total_queries_size'] = $total_queries_size; + + // Set completed flag + $params['completed'] = false; + } + + // Flush WP cache + ai1wm_cache_flush(); + + // Reset active plugins + update_option( AI1WM_ACTIVE_PLUGINS, array() ); + + // Activate plugins + ai1wm_activate_plugins( ai1wm_active_servmask_plugins() ); + + // Set the new site URL + update_option( AI1WM_SITE_URL, $site_url ); + + // Set the new home URL + update_option( AI1WM_HOME_URL, $home_url ); + + // Set the new secret key value + update_option( AI1WM_SECRET_KEY, $secret_key ); + + // Set the new HTTP user + update_option( AI1WM_AUTH_USER, $auth_user ); + + // Set the new HTTP password + update_option( AI1WM_AUTH_PASSWORD, $auth_password ); + + // Set the new auth header + update_option( AI1WM_AUTH_HEADER, $auth_header ); + + // Set the new Uploads Path + update_option( AI1WM_UPLOADS_PATH, $uploads_path ); + + // Set the new Uploads URL Path + update_option( AI1WM_UPLOADS_URL_PATH, $uploads_url_path ); + + // Set the new backups labels + update_option( AI1WM_BACKUPS_LABELS, $backups_labels ); + + // Set the new sites links + update_option( AI1WM_SITES_LINKS, $sites_links ); + + // Set new backups path + update_option( AI1WM_BACKUPS_PATH_OPTION, AI1WM_BACKUPS_PATH ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-done.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-done.php new file mode 100644 index 0000000..9c4c2e8 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-done.php @@ -0,0 +1,374 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Done { + + public static function execute( $params ) { + global $wp_rewrite; + + // Check multisite.json file + if ( is_file( ai1wm_multisite_path( $params ) ) ) { + + // Read multisite.json file + $handle = ai1wm_open( ai1wm_multisite_path( $params ), 'r' ); + + // Parse multisite.json file + $multisite = ai1wm_read( $handle, filesize( ai1wm_multisite_path( $params ) ) ); + $multisite = json_decode( $multisite, true ); + + // Close handle + ai1wm_close( $handle ); + + // Activate WordPress plugins + if ( isset( $multisite['Plugins'] ) && ( $plugins = $multisite['Plugins'] ) ) { + ai1wm_activate_plugins( $plugins ); + } + + // Deactivate WordPress SSL plugins + if ( ! is_ssl() ) { + ai1wm_deactivate_plugins( + array( + ai1wm_discover_plugin_basename( 'really-simple-ssl/rlrsssl-really-simple-ssl.php' ), + ai1wm_discover_plugin_basename( 'wordpress-https/wordpress-https.php' ), + ai1wm_discover_plugin_basename( 'wp-force-ssl/wp-force-ssl.php' ), + ai1wm_discover_plugin_basename( 'force-https-littlebizzy/force-https.php' ), + ) + ); + + ai1wm_woocommerce_force_ssl( false ); + } + + // Deactivate WordPress plugins + ai1wm_deactivate_plugins( + array( + ai1wm_discover_plugin_basename( 'invisible-recaptcha/invisible-recaptcha.php' ), + ai1wm_discover_plugin_basename( 'wps-hide-login/wps-hide-login.php' ), + ai1wm_discover_plugin_basename( 'hide-my-wp/index.php' ), + ai1wm_discover_plugin_basename( 'hide-my-wordpress/index.php' ), + ai1wm_discover_plugin_basename( 'mycustomwidget/my_custom_widget.php' ), + ai1wm_discover_plugin_basename( 'lockdown-wp-admin/lockdown-wp-admin.php' ), + ai1wm_discover_plugin_basename( 'rename-wp-login/rename-wp-login.php' ), + ai1wm_discover_plugin_basename( 'wp-simple-firewall/icwp-wpsf.php' ), + ai1wm_discover_plugin_basename( 'join-my-multisite/joinmymultisite.php' ), + ai1wm_discover_plugin_basename( 'multisite-clone-duplicator/multisite-clone-duplicator.php' ), + ai1wm_discover_plugin_basename( 'wordpress-mu-domain-mapping/domain_mapping.php' ), + ai1wm_discover_plugin_basename( 'wordpress-starter/siteground-wizard.php' ), + ai1wm_discover_plugin_basename( 'pro-sites/pro-sites.php' ), + ai1wm_discover_plugin_basename( 'wpide/WPide.php' ), + ai1wm_discover_plugin_basename( 'page-optimize/page-optimize.php' ), + ai1wm_discover_plugin_basename( 'update-services/update-services.php' ), + ) + ); + + // Deactivate Swift Optimizer rules + ai1wm_deactivate_swift_optimizer_rules( + array( + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration/all-in-one-wp-migration.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-azure-storage-extension/all-in-one-wp-migration-azure-storage-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-b2-extension/all-in-one-wp-migration-b2-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-backup/all-in-one-wp-migration-backup.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-box-extension/all-in-one-wp-migration-box-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-digitalocean-extension/all-in-one-wp-migration-digitalocean-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-direct-extension/all-in-one-wp-migration-direct-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-dropbox-extension/all-in-one-wp-migration-dropbox-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-file-extension/all-in-one-wp-migration-file-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-ftp-extension/all-in-one-wp-migration-ftp-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gcloud-storage-extension/all-in-one-wp-migration-gcloud-storage-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gdrive-extension/all-in-one-wp-migration-gdrive-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-glacier-extension/all-in-one-wp-migration-glacier-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-mega-extension/all-in-one-wp-migration-mega-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-multisite-extension/all-in-one-wp-migration-multisite-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-onedrive-extension/all-in-one-wp-migration-onedrive-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pcloud-extension/all-in-one-wp-migration-pcloud-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pro/all-in-one-wp-migration-pro.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-client-extension/all-in-one-wp-migration-s3-client-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-extension/all-in-one-wp-migration-s3-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-unlimited-extension/all-in-one-wp-migration-unlimited-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-url-extension/all-in-one-wp-migration-url-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-webdav-extension/all-in-one-wp-migration-webdav-extension.php' ), + ) + ); + + // Deactivate Revolution Slider + ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) ); + + // Deactivate Jetpack modules + ai1wm_deactivate_jetpack_modules( array( 'photon', 'sso' ) ); + + // Flush Elementor cache + ai1wm_elementor_cache_flush(); + + // Initial DB version + ai1wm_initial_db_version(); + + } else { + + // Check package.json file + if ( is_file( ai1wm_package_path( $params ) ) ) { + + // Read package.json file + $handle = ai1wm_open( ai1wm_package_path( $params ), 'r' ); + + // Parse package.json file + $package = ai1wm_read( $handle, filesize( ai1wm_package_path( $params ) ) ); + $package = json_decode( $package, true ); + + // Close handle + ai1wm_close( $handle ); + + // Activate WordPress plugins + if ( isset( $package['Plugins'] ) && ( $plugins = $package['Plugins'] ) ) { + ai1wm_activate_plugins( $plugins ); + } + + // Activate WordPress template + if ( isset( $package['Template'] ) && ( $template = $package['Template'] ) ) { + ai1wm_activate_template( $template ); + } + + // Activate WordPress stylesheet + if ( isset( $package['Stylesheet'] ) && ( $stylesheet = $package['Stylesheet'] ) ) { + ai1wm_activate_stylesheet( $stylesheet ); + } + + // Deactivate WordPress SSL plugins + if ( ! is_ssl() ) { + ai1wm_deactivate_plugins( + array( + ai1wm_discover_plugin_basename( 'really-simple-ssl/rlrsssl-really-simple-ssl.php' ), + ai1wm_discover_plugin_basename( 'wordpress-https/wordpress-https.php' ), + ai1wm_discover_plugin_basename( 'wp-force-ssl/wp-force-ssl.php' ), + ai1wm_discover_plugin_basename( 'force-https-littlebizzy/force-https.php' ), + ) + ); + + ai1wm_woocommerce_force_ssl( false ); + } + + // Deactivate WordPress plugins + ai1wm_deactivate_plugins( + array( + ai1wm_discover_plugin_basename( 'invisible-recaptcha/invisible-recaptcha.php' ), + ai1wm_discover_plugin_basename( 'wps-hide-login/wps-hide-login.php' ), + ai1wm_discover_plugin_basename( 'hide-my-wp/index.php' ), + ai1wm_discover_plugin_basename( 'hide-my-wordpress/index.php' ), + ai1wm_discover_plugin_basename( 'mycustomwidget/my_custom_widget.php' ), + ai1wm_discover_plugin_basename( 'lockdown-wp-admin/lockdown-wp-admin.php' ), + ai1wm_discover_plugin_basename( 'rename-wp-login/rename-wp-login.php' ), + ai1wm_discover_plugin_basename( 'wp-simple-firewall/icwp-wpsf.php' ), + ai1wm_discover_plugin_basename( 'join-my-multisite/joinmymultisite.php' ), + ai1wm_discover_plugin_basename( 'multisite-clone-duplicator/multisite-clone-duplicator.php' ), + ai1wm_discover_plugin_basename( 'wordpress-mu-domain-mapping/domain_mapping.php' ), + ai1wm_discover_plugin_basename( 'wordpress-starter/siteground-wizard.php' ), + ai1wm_discover_plugin_basename( 'pro-sites/pro-sites.php' ), + ai1wm_discover_plugin_basename( 'wpide/WPide.php' ), + ai1wm_discover_plugin_basename( 'page-optimize/page-optimize.php' ), + ai1wm_discover_plugin_basename( 'update-services/update-services.php' ), + ) + ); + + // Deactivate Swift Optimizer rules + ai1wm_deactivate_swift_optimizer_rules( + array( + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration/all-in-one-wp-migration.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-azure-storage-extension/all-in-one-wp-migration-azure-storage-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-b2-extension/all-in-one-wp-migration-b2-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-backup/all-in-one-wp-migration-backup.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-box-extension/all-in-one-wp-migration-box-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-digitalocean-extension/all-in-one-wp-migration-digitalocean-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-direct-extension/all-in-one-wp-migration-direct-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-dropbox-extension/all-in-one-wp-migration-dropbox-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-file-extension/all-in-one-wp-migration-file-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-ftp-extension/all-in-one-wp-migration-ftp-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gcloud-storage-extension/all-in-one-wp-migration-gcloud-storage-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gdrive-extension/all-in-one-wp-migration-gdrive-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-glacier-extension/all-in-one-wp-migration-glacier-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-mega-extension/all-in-one-wp-migration-mega-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-multisite-extension/all-in-one-wp-migration-multisite-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-onedrive-extension/all-in-one-wp-migration-onedrive-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pcloud-extension/all-in-one-wp-migration-pcloud-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pro/all-in-one-wp-migration-pro.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-client-extension/all-in-one-wp-migration-s3-client-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-extension/all-in-one-wp-migration-s3-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-unlimited-extension/all-in-one-wp-migration-unlimited-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-url-extension/all-in-one-wp-migration-url-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-webdav-extension/all-in-one-wp-migration-webdav-extension.php' ), + ) + ); + + // Deactivate Revolution Slider + ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) ); + + // Deactivate Jetpack modules + ai1wm_deactivate_jetpack_modules( array( 'photon', 'sso' ) ); + + // Flush Elementor cache + ai1wm_elementor_cache_flush(); + + // Initial DB version + ai1wm_initial_db_version(); + } + } + + // Check blogs.json file + if ( is_file( ai1wm_blogs_path( $params ) ) ) { + + // Read blogs.json file + $handle = ai1wm_open( ai1wm_blogs_path( $params ), 'r' ); + + // Parse blogs.json file + $blogs = ai1wm_read( $handle, filesize( ai1wm_blogs_path( $params ) ) ); + $blogs = json_decode( $blogs, true ); + + // Close handle + ai1wm_close( $handle ); + + // Loop over blogs + foreach ( $blogs as $blog ) { + + // Activate WordPress plugins + if ( isset( $blog['New']['Plugins'] ) && ( $plugins = $blog['New']['Plugins'] ) ) { + ai1wm_activate_plugins( $plugins ); + } + + // Activate WordPress template + if ( isset( $blog['New']['Template'] ) && ( $template = $blog['New']['Template'] ) ) { + ai1wm_activate_template( $template ); + } + + // Activate WordPress stylesheet + if ( isset( $blog['New']['Stylesheet'] ) && ( $stylesheet = $blog['New']['Stylesheet'] ) ) { + ai1wm_activate_stylesheet( $stylesheet ); + } + + // Deactivate WordPress SSL plugins + if ( ! is_ssl() ) { + ai1wm_deactivate_plugins( + array( + ai1wm_discover_plugin_basename( 'really-simple-ssl/rlrsssl-really-simple-ssl.php' ), + ai1wm_discover_plugin_basename( 'wordpress-https/wordpress-https.php' ), + ai1wm_discover_plugin_basename( 'wp-force-ssl/wp-force-ssl.php' ), + ai1wm_discover_plugin_basename( 'force-https-littlebizzy/force-https.php' ), + ) + ); + + ai1wm_woocommerce_force_ssl( false ); + } + + // Deactivate WordPress plugins + ai1wm_deactivate_plugins( + array( + ai1wm_discover_plugin_basename( 'invisible-recaptcha/invisible-recaptcha.php' ), + ai1wm_discover_plugin_basename( 'wps-hide-login/wps-hide-login.php' ), + ai1wm_discover_plugin_basename( 'hide-my-wp/index.php' ), + ai1wm_discover_plugin_basename( 'hide-my-wordpress/index.php' ), + ai1wm_discover_plugin_basename( 'mycustomwidget/my_custom_widget.php' ), + ai1wm_discover_plugin_basename( 'lockdown-wp-admin/lockdown-wp-admin.php' ), + ai1wm_discover_plugin_basename( 'rename-wp-login/rename-wp-login.php' ), + ai1wm_discover_plugin_basename( 'wp-simple-firewall/icwp-wpsf.php' ), + ai1wm_discover_plugin_basename( 'join-my-multisite/joinmymultisite.php' ), + ai1wm_discover_plugin_basename( 'multisite-clone-duplicator/multisite-clone-duplicator.php' ), + ai1wm_discover_plugin_basename( 'wordpress-mu-domain-mapping/domain_mapping.php' ), + ai1wm_discover_plugin_basename( 'wordpress-starter/siteground-wizard.php' ), + ai1wm_discover_plugin_basename( 'pro-sites/pro-sites.php' ), + ai1wm_discover_plugin_basename( 'wpide/WPide.php' ), + ai1wm_discover_plugin_basename( 'page-optimize/page-optimize.php' ), + ai1wm_discover_plugin_basename( 'update-services/update-services.php' ), + ) + ); + + // Deactivate Swift Optimizer rules + ai1wm_deactivate_swift_optimizer_rules( + array( + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration/all-in-one-wp-migration.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-azure-storage-extension/all-in-one-wp-migration-azure-storage-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-b2-extension/all-in-one-wp-migration-b2-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-backup/all-in-one-wp-migration-backup.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-box-extension/all-in-one-wp-migration-box-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-digitalocean-extension/all-in-one-wp-migration-digitalocean-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-direct-extension/all-in-one-wp-migration-direct-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-dropbox-extension/all-in-one-wp-migration-dropbox-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-file-extension/all-in-one-wp-migration-file-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-ftp-extension/all-in-one-wp-migration-ftp-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gcloud-storage-extension/all-in-one-wp-migration-gcloud-storage-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-gdrive-extension/all-in-one-wp-migration-gdrive-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-glacier-extension/all-in-one-wp-migration-glacier-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-mega-extension/all-in-one-wp-migration-mega-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-multisite-extension/all-in-one-wp-migration-multisite-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-onedrive-extension/all-in-one-wp-migration-onedrive-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pcloud-extension/all-in-one-wp-migration-pcloud-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-pro/all-in-one-wp-migration-pro.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-client-extension/all-in-one-wp-migration-s3-client-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-s3-extension/all-in-one-wp-migration-s3-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-unlimited-extension/all-in-one-wp-migration-unlimited-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-url-extension/all-in-one-wp-migration-url-extension.php' ), + ai1wm_discover_plugin_basename( 'all-in-one-wp-migration-webdav-extension/all-in-one-wp-migration-webdav-extension.php' ), + ) + ); + + // Deactivate Revolution Slider + ai1wm_deactivate_revolution_slider( ai1wm_discover_plugin_basename( 'revslider/revslider.php' ) ); + + // Deactivate Jetpack modules + ai1wm_deactivate_jetpack_modules( array( 'photon', 'sso' ) ); + + // Flush Elementor cache + ai1wm_elementor_cache_flush(); + + // Initial DB version + ai1wm_initial_db_version(); + } + } + + // Clear auth cookie (WP Cerber) + if ( ai1wm_validate_plugin_basename( 'wp-cerber/wp-cerber.php' ) ) { + wp_clear_auth_cookie(); + } + + $should_reset_permalinks = false; + + // Switch to default permalink structure + if ( ( $should_reset_permalinks = ai1wm_should_reset_permalinks( $params ) ) ) { + $wp_rewrite->set_permalink_structure( '' ); + } + + // Set progress + if ( ai1wm_validate_plugin_basename( 'fusion-builder/fusion-builder.php' ) ) { + Ai1wm_Status::done( __( 'Your site has been imported successfully!', AI1WM_PLUGIN_NAME ), Ai1wm_Template::get_content( 'import/avada', array( 'should_reset_permalinks' => $should_reset_permalinks ) ) ); + } elseif ( ai1wm_validate_plugin_basename( 'oxygen/functions.php' ) ) { + Ai1wm_Status::done( __( 'Your site has been imported successfully!', AI1WM_PLUGIN_NAME ), Ai1wm_Template::get_content( 'import/oxygen', array( 'should_reset_permalinks' => $should_reset_permalinks ) ) ); + } else { + Ai1wm_Status::done( __( 'Your site has been imported successfully!', AI1WM_PLUGIN_NAME ), Ai1wm_Template::get_content( 'import/done', array( 'should_reset_permalinks' => $should_reset_permalinks ) ) ); + } + + do_action( 'ai1wm_status_import_done', $params ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-enumerate.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-enumerate.php new file mode 100644 index 0000000..41836d0 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-enumerate.php @@ -0,0 +1,54 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Enumerate { + + public static function execute( $params ) { + + // Set progress + Ai1wm_Status::info( __( 'Retrieving a list of all WordPress files...', AI1WM_PLUGIN_NAME ) ); + + // Open the archive file for reading + $archive = new Ai1wm_Extractor( ai1wm_archive_path( $params ) ); + + // Get total files count + $params['total_files_count'] = $archive->get_total_files_count(); + + // Get total files size + $params['total_files_size'] = $archive->get_total_files_size(); + + // Close the archive file + $archive->close(); + + // Set progress + Ai1wm_Status::info( __( 'Done retrieving a list of all WordPress files.', AI1WM_PLUGIN_NAME ) ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-mu-plugins.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-mu-plugins.php new file mode 100644 index 0000000..0076a4a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-mu-plugins.php @@ -0,0 +1,65 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Mu_Plugins { + + public static function execute( $params ) { + + // Set progress + Ai1wm_Status::info( __( 'Activating mu-plugins...', AI1WM_PLUGIN_NAME ) ); + + $exclude_files = array( + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_ENDURANCE_PAGE_CACHE_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_ENDURANCE_PHP_EDGE_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_ENDURANCE_BROWSER_CACHE_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_GD_SYSTEM_PLUGIN_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_WP_STACK_CACHE_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_WP_COMSH_LOADER_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_WP_COMSH_HELPER_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_WP_ENGINE_SYSTEM_PLUGIN_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_WPE_SIGN_ON_PLUGIN_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_WP_ENGINE_SECURITY_AUDITOR_NAME, + AI1WM_MUPLUGINS_NAME . DIRECTORY_SEPARATOR . AI1WM_WP_CERBER_SECURITY_NAME, + ); + + // Open the archive file for reading + $archive = new Ai1wm_Extractor( ai1wm_archive_path( $params ) ); + + // Unpack mu-plugins files + $archive->extract_by_files_array( WP_CONTENT_DIR, array( AI1WM_MUPLUGINS_NAME ), $exclude_files ); + + // Close the archive file + $archive->close(); + + // Set progress + Ai1wm_Status::info( __( 'Done activating mu-plugins.', AI1WM_PLUGIN_NAME ) ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-options.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-options.php new file mode 100644 index 0000000..3141657 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-options.php @@ -0,0 +1,79 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Options { + + public static function execute( $params, Ai1wm_Database $mysql = null ) { + // Set progress + Ai1wm_Status::info( __( 'Preparing options...', AI1WM_PLUGIN_NAME ) ); + + // Get database client + if ( is_null( $mysql ) ) { + $mysql = Ai1wm_Database_Utility::create_client(); + } + + $tables = $mysql->get_tables(); + + // Get base prefix + $base_prefix = ai1wm_table_prefix(); + + // Get mainsite prefix + $mainsite_prefix = ai1wm_table_prefix( 'mainsite' ); + + // Check WP sitemeta table exists + if ( in_array( "{$mainsite_prefix}sitemeta", $tables ) ) { + + // Get fs_accounts option value (Freemius) + $result = $mysql->query( "SELECT meta_value FROM `{$mainsite_prefix}sitemeta` WHERE meta_key = 'fs_accounts'" ); + if ( ( $row = $mysql->fetch_assoc( $result ) ) ) { + $fs_accounts = get_option( 'fs_accounts', array() ); + $meta_value = maybe_unserialize( $row['meta_value'] ); + + // Update fs_accounts option value (Freemius) + if ( ( $fs_accounts = array_merge( $fs_accounts, $meta_value ) ) ) { + if ( isset( $fs_accounts['users'], $fs_accounts['sites'] ) ) { + update_option( 'fs_accounts', $fs_accounts ); + } else { + delete_option( 'fs_accounts' ); + delete_option( 'fs_dbg_accounts' ); + delete_option( 'fs_active_plugins' ); + delete_option( 'fs_api_cache' ); + delete_option( 'fs_dbg_api_cache' ); + delete_option( 'fs_debug_mode' ); + } + } + } + } + + // Set progress + Ai1wm_Status::info( __( 'Done preparing options.', AI1WM_PLUGIN_NAME ) ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-permalinks.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-permalinks.php new file mode 100644 index 0000000..7fd606b --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-permalinks.php @@ -0,0 +1,46 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Permalinks { + + public static function execute( $params ) { + global $wp_rewrite; + + // Set progress + Ai1wm_Status::info( __( 'Getting WordPress permalinks settings...', AI1WM_PLUGIN_NAME ) ); + + // Get using permalinks + $params['using_permalinks'] = (int) $wp_rewrite->using_permalinks(); + + // Set progress + Ai1wm_Status::info( __( 'Done getting WordPress permalinks settings.', AI1WM_PLUGIN_NAME ) ); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-upload.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-upload.php new file mode 100644 index 0000000..ab6af5a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-upload.php @@ -0,0 +1,97 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Upload { + + private static function validate() { + if ( ! array_key_exists( 'upload-file', $_FILES ) || ! is_array( $_FILES['upload-file'] ) ) { + throw new Ai1wm_Import_Retry_Exception( __( 'Missing upload file.', AI1WM_PLUGIN_NAME ), 400 ); + } + + if ( ! array_key_exists( 'error', $_FILES['upload-file'] ) ) { + throw new Ai1wm_Import_Retry_Exception( __( 'Missing error key in upload file.', AI1WM_PLUGIN_NAME ), 400 ); + } + + if ( ! array_key_exists( 'tmp_name', $_FILES['upload-file'] ) ) { + throw new Ai1wm_Import_Retry_Exception( __( 'Missing tmp_name in upload file.', AI1WM_PLUGIN_NAME ), 400 ); + } + } + + public static function execute( $params ) { + self::validate(); + + $error = $_FILES['upload-file']['error']; + $upload = $_FILES['upload-file']['tmp_name']; + + // Verify file name extension + if ( ! ai1wm_is_filename_supported( ai1wm_archive_path( $params ) ) ) { + throw new Ai1wm_Import_Exception( + __( + 'The file type that you have tried to upload is not compatible with this plugin. ' . + 'Please ensure that your file is a .wpress file that was created with the All-in-One WP migration plugin. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ) + ); + } + + switch ( $error ) { + case UPLOAD_ERR_OK: + try { + ai1wm_copy( $upload, ai1wm_archive_path( $params ) ); + ai1wm_unlink( $upload ); + } catch ( Exception $e ) { + throw new Ai1wm_Import_Retry_Exception( sprintf( __( 'Unable to upload the file because %s', AI1WM_PLUGIN_NAME ), $e->getMessage() ), 400 ); + } + break; + + case UPLOAD_ERR_INI_SIZE: + case UPLOAD_ERR_FORM_SIZE: + case UPLOAD_ERR_PARTIAL: + case UPLOAD_ERR_NO_FILE: + // File is too large + throw new Ai1wm_Import_Retry_Exception( __( 'The file is too large for this server.', AI1WM_PLUGIN_NAME ), 413 ); + + case UPLOAD_ERR_NO_TMP_DIR: + throw new Ai1wm_Import_Retry_Exception( __( 'Missing a temporary folder.', AI1WM_PLUGIN_NAME ), 400 ); + + case UPLOAD_ERR_CANT_WRITE: + throw new Ai1wm_Import_Retry_Exception( __( 'Failed to write file to disk.', AI1WM_PLUGIN_NAME ), 400 ); + + case UPLOAD_ERR_EXTENSION: + throw new Ai1wm_Import_Retry_Exception( __( 'A PHP extension stopped the file upload.', AI1WM_PLUGIN_NAME ), 400 ); + + default: + throw new Ai1wm_Import_Retry_Exception( sprintf( __( 'Unrecognized error %s during upload.', AI1WM_PLUGIN_NAME ), $error ), 400 ); + } + + ai1wm_json_response( array( 'errors' => array() ) ); + exit; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-users.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-users.php new file mode 100644 index 0000000..f3a6cb7 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-users.php @@ -0,0 +1,69 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Users { + + public static function execute( $params ) { + + // Check multisite.json file + if ( is_file( ai1wm_multisite_path( $params ) ) ) { + + // Set progress + Ai1wm_Status::info( __( 'Preparing users...', AI1WM_PLUGIN_NAME ) ); + + // Read multisite.json file + $handle = ai1wm_open( ai1wm_multisite_path( $params ), 'r' ); + + // Parse multisite.json file + $multisite = ai1wm_read( $handle, filesize( ai1wm_multisite_path( $params ) ) ); + $multisite = json_decode( $multisite, true ); + + // Close handle + ai1wm_close( $handle ); + + ai1wm_populate_roles(); + + // Set WordPress super admins + if ( isset( $multisite['Admins'] ) && ( $admins = $multisite['Admins'] ) ) { + foreach ( $admins as $username ) { + if ( ( $user = get_user_by( 'login', $username ) ) ) { + if ( $user->exists() ) { + $user->set_role( 'administrator' ); + } + } + } + } + + // Set progress + Ai1wm_Status::info( __( 'Done preparing users.', AI1WM_PLUGIN_NAME ) ); + } + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-validate.php b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-validate.php new file mode 100644 index 0000000..a0869a7 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/model/import/class-ai1wm-import-validate.php @@ -0,0 +1,159 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Import_Validate { + + public static function execute( $params ) { + + // Verify file if size > 2GB and PHP = 32-bit + if ( ! ai1wm_is_filesize_supported( ai1wm_archive_path( $params ) ) ) { + throw new Ai1wm_Import_Exception( + __( + 'Your PHP is 32-bit. In order to import your file, please change your PHP version to 64-bit and try again. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ) + ); + } + + // Verify file name extension + if ( ! ai1wm_is_filename_supported( ai1wm_archive_path( $params ) ) ) { + throw new Ai1wm_Import_Exception( + __( + 'The file type that you have tried to import is not compatible with this plugin. ' . + 'Please ensure that your file is a .wpress file that was created with the All-in-One WP migration plugin. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ) + ); + } + + // Set archive bytes offset + if ( isset( $params['archive_bytes_offset'] ) ) { + $archive_bytes_offset = (int) $params['archive_bytes_offset']; + } else { + $archive_bytes_offset = 0; + } + + // Set file bytes offset + if ( isset( $params['file_bytes_offset'] ) ) { + $file_bytes_offset = (int) $params['file_bytes_offset']; + } else { + $file_bytes_offset = 0; + } + + // Get total archive size + if ( isset( $params['total_archive_size'] ) ) { + $total_archive_size = (int) $params['total_archive_size']; + } else { + $total_archive_size = ai1wm_archive_bytes( $params ); + } + + // What percent of archive have we processed? + $progress = (int) min( ( $archive_bytes_offset / $total_archive_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Unpacking archive...
%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) ); + + // Open the archive file for reading + $archive = new Ai1wm_Extractor( ai1wm_archive_path( $params ) ); + + // Set the file pointer to the one that we have saved + $archive->set_file_pointer( $archive_bytes_offset ); + + // Validate the archive file consistency + if ( ! $archive->is_valid() ) { + throw new Ai1wm_Import_Exception( __( 'The archive file is corrupted. Follow this article to resolve the problem.', AI1WM_PLUGIN_NAME ) ); + } + + // Flag to hold if file data has been processed + $completed = true; + + if ( $archive->has_not_reached_eof() ) { + $file_bytes_written = 0; + + // Unpack package.json, multisite.json and database.sql files + if ( ( $completed = $archive->extract_by_files_array( ai1wm_storage_path( $params ), array( AI1WM_PACKAGE_NAME, AI1WM_MULTISITE_NAME, AI1WM_DATABASE_NAME ), array(), array(), $file_bytes_written, $file_bytes_offset ) ) ) { + $file_bytes_offset = 0; + } + + // Get archive bytes offset + $archive_bytes_offset = $archive->get_file_pointer(); + } + + // End of the archive? + if ( $archive->has_reached_eof() ) { + + // Check package.json file + if ( false === is_file( ai1wm_package_path( $params ) ) ) { + throw new Ai1wm_Import_Exception( __( 'Please make sure that your file was exported using All-in-One WP Migration plugin. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + // Set progress + Ai1wm_Status::info( __( 'Done unpacking archive.', AI1WM_PLUGIN_NAME ) ); + + // Unset archive bytes offset + unset( $params['archive_bytes_offset'] ); + + // Unset file bytes offset + unset( $params['file_bytes_offset'] ); + + // Unset total archive size + unset( $params['total_archive_size'] ); + + // Unset completed flag + unset( $params['completed'] ); + + } else { + + // What percent of archive have we processed? + $progress = (int) min( ( $archive_bytes_offset / $total_archive_size ) * 100, 100 ); + + // Set progress + Ai1wm_Status::info( sprintf( __( 'Unpacking archive...
%d%% complete', AI1WM_PLUGIN_NAME ), $progress ) ); + + // Set archive bytes offset + $params['archive_bytes_offset'] = $archive_bytes_offset; + + // Set file bytes offset + $params['file_bytes_offset'] = $file_bytes_offset; + + // Set total archive size + $params['total_archive_size'] = $total_archive_size; + + // Set completed flag + $params['completed'] = $completed; + } + + // Close the archive file + $archive->close(); + + return $params; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/LICENSE b/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/LICENSE new file mode 100644 index 0000000..9acc815 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Yani Iliev + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/lib/Bandar.php b/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/lib/Bandar.php new file mode 100644 index 0000000..67141f7 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/lib/Bandar.php @@ -0,0 +1,233 @@ + + * @copyright 2013 Yani Iliev + * @license https://raw.github.com/yani-/bandar/master/LICENSE The MIT License (MIT) + * @version GIT: 3.0.0 + * @link https://github.com/yani-/bandar/ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +/** + * Define EOL for CLI and Web + */ +if (!defined('BANDAR_EOL')) { + define('BANDAR_EOL', php_sapi_name() === 'cli' ? PHP_EOL : '
'); +} + +/** + * Include exceptions + */ +require_once + dirname(__FILE__) . + DIRECTORY_SEPARATOR . + 'Exceptions' . + DIRECTORY_SEPARATOR . + 'TemplateDoesNotExistException.php'; + +/** + * Bandar Main class + * + * @category Templates + * @package Bandar + * @author Yani Iliev + * @copyright 2013 Yani Iliev + * @license https://raw.github.com/yani-/bandar/master/LICENSE The MIT License (MIT) + * @version Release: 2.0.1 + * @link https://github.com/yani-/bandar/ + */ +class Bandar +{ + /** + * Path to template files + * + * @var string|null + */ + public static $templatesPath = null; + + /** + * Template file to output + * @var string|null + */ + public static $template = null; + + /** + * Outputs the passed string if Bandar is in debug mode + * + * @param string $str Debug string to output + * + * @return void + */ + public static function debug($str) + { + /** + * if debug flag is on, output the string + */ + if (defined('BANDAR_DEBUG') && BANDAR_DEBUG) { + echo $str; + } + } + + /** + * Retrieves templatesPath from BANDAR_TEMPLATES_PATH constant + * + * @throws TemplatesPathNotSetException If BANDAR_TEMPLATES_PATH is not defined + * + * @return string|null Templates path + */ + public static function getTemplatesPathFromConstant() + { + self::debug( + 'Calling getTemplatesPathFromConstant' . BANDAR_EOL + ); + if (defined('BANDAR_TEMPLATES_PATH')) { + return realpath(BANDAR_TEMPLATES_PATH) . DIRECTORY_SEPARATOR; + } + return null; + } + + /** + * Setter for template + * + * @param string $template Template file + * + * @throws TemplateDoesNotExistException If template file is not found + * + * @return null + */ + public static function setTemplate($template, $path = false) + { + self::debug( + 'Calling setTemplate with' . BANDAR_EOL . + '$template = ' . $template . BANDAR_EOL . + 'type of $template is ' . gettype($template) . BANDAR_EOL + ); + + if ($path) { + $template = realpath($path) . DIRECTORY_SEPARATOR . $template; + } else { + $template = self::getTemplatesPathFromConstant() . $template; + } + + $template = realpath($template . '.php'); + /** + * Check if passed template exist + */ + if (self::templateExists($template)) { + self::$template = $template; + } else { + throw new TemplateDoesNotExistException; + } + } + + /** + * Checks if template exists by using file_exists + * + * @param string $template Template file + * + * @return boolean + */ + public static function templateExists($template) + { + self::debug( + 'Calling templateExists with ' . BANDAR_EOL . + '$template = ' . $template . BANDAR_EOL . + 'type of $template is ' . gettype($template) . BANDAR_EOL + ); + return (!is_dir($template) && is_readable($template)); + } + + /** + * Renders a passed template + * + * @param string $template Template name + * @param array $args Variables to pass to the template file + * + * @return string Contents of the template + */ + public static function render($template, $args=array(), $path = false) + { + self::debug( + 'Calling render with' . + '$template = ' . $template . BANDAR_EOL . + 'type of $template is ' . gettype($template) . BANDAR_EOL . + '$args = ' . print_r($args, true) . BANDAR_EOL . + 'type of $args is ' . gettype($args) . BANDAR_EOL + ); + self::setTemplate($template, $path); + /** + * Extracting passed aguments + */ + extract($args); + ob_start(); + /** + * Including the view + */ + include self::$template; + + return ob_get_flush(); + } + + /** + * Returns the content of a passed template + * + * @param string $template Template name + * @param array $args Variables to pass to the template file + * + * @return string Contents of the template + */ + public static function getTemplateContent($template, $args=array(), $path = false) + { + self::debug( + 'Calling render with' . + '$template = ' . $template . BANDAR_EOL . + 'type of $template is ' . gettype($template) . BANDAR_EOL . + '$args = ' . print_r($args, true) . BANDAR_EOL . + 'type of $args is ' . gettype($args) . BANDAR_EOL + ); + self::setTemplate($template, $path); + /** + * Extracting passed aguments + */ + extract($args); + ob_start(); + /** + * Including the view + */ + include self::$template; + + $content = ob_get_contents(); + ob_end_clean(); + + return $content; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/lib/Exceptions/TemplateDoesNotExistException.php b/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/lib/Exceptions/TemplateDoesNotExistException.php new file mode 100644 index 0000000..c7163f0 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/bandar/bandar/lib/Exceptions/TemplateDoesNotExistException.php @@ -0,0 +1,54 @@ + + * @copyright 2013 Yani Iliev + * @license https://raw.github.com/yani-/bandar/master/LICENSE The MIT License (MIT) + * @version GIT: 3.0.0 + * @link https://github.com/yani-/bandar/ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +/** + * TemplateDoesNotExistException + * + * @category Exceptions + * @package Bandar + * @author Yani Iliev + * @copyright 2013 Yani Iliev + * @license https://raw.github.com/yani-/bandar/master/LICENSE The MIT License (MIT) + * @version Release: 2.0.1 + * @link https://github.com/yani-/bandar/ + */ +class TemplateDoesNotExistException extends Exception +{ + +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-archiver.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-archiver.php new file mode 100644 index 0000000..4a0e6e7 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-archiver.php @@ -0,0 +1,257 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +abstract class Ai1wm_Archiver { + + /** + * Filename including path to the file + * + * @type string + */ + protected $file_name = null; + + /** + * Handle to the file + * + * @type resource + */ + protected $file_handle = null; + + /** + * Header block format of a file + * + * Field Name Offset Length Contents + * name 0 255 filename (no path, no slash) + * size 255 14 size of file contents + * mtime 269 12 last modification time + * prefix 281 4096 path name, no trailing slashes + * + * @type array + */ + protected $block_format = array( + 'a255', // filename + 'a14', // size of file contents + 'a12', // last time modified + 'a4096', // path + ); + + /** + * End of file block string + * + * @type string + */ + protected $eof = null; + + /** + * Default constructor + * + * Initializes filename and end of file block + * + * @param string $file_name Archive file + * @param bool $write Read/write mode + */ + public function __construct( $file_name, $write = false ) { + $this->file_name = $file_name; + + // Initialize end of file block + $this->eof = pack( 'a4377', '' ); + + // Open archive file + if ( $write ) { + // Open archive file for writing + if ( ( $this->file_handle = @fopen( $file_name, 'cb' ) ) === false ) { + throw new Ai1wm_Not_Accessible_Exception( sprintf( __( 'Unable to open file for writing. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + // Seek to end of archive file + if ( @fseek( $this->file_handle, 0, SEEK_END ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to end of file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } else { + // Open archive file for reading + if ( ( $this->file_handle = @fopen( $file_name, 'rb' ) ) === false ) { + throw new Ai1wm_Not_Accessible_Exception( sprintf( __( 'Unable to open file for reading. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } + } + + /** + * Set current file pointer + * + * @param int $offset Archive offset + * + * @throws \Ai1wm_Not_Seekable_Exception + * + * @return void + */ + public function set_file_pointer( $offset ) { + if ( @fseek( $this->file_handle, $offset, SEEK_SET ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, $offset ) ); + } + } + + /** + * Get current file pointer + * + * @throws \Ai1wm_Not_Tellable_Exception + * + * @return int + */ + public function get_file_pointer() { + if ( ( $offset = @ftell( $this->file_handle ) ) === false ) { + throw new Ai1wm_Not_Tellable_Exception( sprintf( __( 'Unable to tell offset of file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + return $offset; + } + + /** + * Appends end of file block to the archive file + * + * @throws \Ai1wm_Not_Seekable_Exception + * @throws \Ai1wm_Not_Writable_Exception + * @throws \Ai1wm_Quota_Exceeded_Exception + * + * @return void + */ + protected function append_eof() { + // Seek to end of archive file + if ( @fseek( $this->file_handle, 0, SEEK_END ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to end of file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + // Write end of file block + if ( ( $file_bytes = @fwrite( $this->file_handle, $this->eof ) ) !== false ) { + if ( strlen( $this->eof ) !== $file_bytes ) { + throw new Ai1wm_Quota_Exceeded_Exception( sprintf( __( 'Out of disk space. Unable to write end of block to file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } else { + throw new Ai1wm_Not_Writable_Exception( sprintf( __( 'Unable to write end of block to file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } + + /** + * Replace forward slash with current directory separator + * + * @param string $path Path + * + * @return string + */ + protected function replace_forward_slash_with_directory_separator( $path ) { + return str_replace( '/', DIRECTORY_SEPARATOR, $path ); + } + + /** + * Replace current directory separator with forward slash + * + * @param string $path Path + * + * @return string + */ + protected function replace_directory_separator_with_forward_slash( $path ) { + return str_replace( DIRECTORY_SEPARATOR, '/', $path ); + } + + /** + * Escape Windows directory separator + * + * @param string $path Path + * + * @return string + */ + protected function escape_windows_directory_separator( $path ) { + return preg_replace( '/[\\\\]+/', '\\\\\\\\', $path ); + } + + /** + * Validate archive file + * + * @return bool + */ + public function is_valid() { + // Failed detecting the current file pointer offset + if ( ( $offset = @ftell( $this->file_handle ) ) === false ) { + return false; + } + + // Failed seeking the beginning of EOL block + if ( @fseek( $this->file_handle, -4377, SEEK_END ) === -1 ) { + return false; + } + + // Trailing block does not match EOL: file is incomplete + if ( @fread( $this->file_handle, 4377 ) !== $this->eof ) { + return false; + } + + // Failed returning to original offset + if ( @fseek( $this->file_handle, $offset, SEEK_SET ) === -1 ) { + return false; + } + + return true; + } + + /** + * Truncates the archive file + * + * @return void + */ + public function truncate() { + if ( ( $offset = @ftell( $this->file_handle ) ) === false ) { + throw new Ai1wm_Not_Tellable_Exception( sprintf( __( 'Unable to tell offset of file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + if ( @filesize( $this->file_name ) > $offset ) { + if ( @ftruncate( $this->file_handle, $offset ) === false ) { + throw new Ai1wm_Not_Truncatable_Exception( sprintf( __( 'Unable to truncate file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } + } + + /** + * Closes the archive file + * + * We either close the file or append the end of file block if complete argument is set to true + * + * @param bool $complete Flag to append end of file block + * + * @return void + */ + public function close( $complete = false ) { + // Are we done appending to the file? + if ( true === $complete ) { + $this->append_eof(); + } + + if ( @fclose( $this->file_handle ) === false ) { + throw new Ai1wm_Not_Closable_Exception( sprintf( __( 'Unable to close file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-compressor.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-compressor.php new file mode 100644 index 0000000..9a375d2 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-compressor.php @@ -0,0 +1,219 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Compressor extends Ai1wm_Archiver { + + /** + * Overloaded constructor that opens the passed file for writing + * + * @param string $file_name File to use as archive + */ + public function __construct( $file_name ) { + parent::__construct( $file_name, true ); + } + + /** + * Add a file to the archive + * + * @param string $file_name File to add to the archive + * @param string $new_file_name Write the file with a different name + * @param int $file_written File written (in bytes) + * @param int $file_offset File offset (in bytes) + * + * @throws \Ai1wm_Not_Seekable_Exception + * @throws \Ai1wm_Not_Writable_Exception + * @throws \Ai1wm_Quota_Exceeded_Exception + * + * @return bool + */ + public function add_file( $file_name, $new_file_name = '', &$file_written = 0, &$file_offset = 0 ) { + global $ai1wm_params; + + $file_written = 0; + + // Replace forward slash with current directory separator in file name + $file_name = ai1wm_replace_forward_slash_with_directory_separator( $file_name ); + + // Escape Windows directory separator in file name + $file_name = ai1wm_escape_windows_directory_separator( $file_name ); + + // Flag to hold if file data has been processed + $completed = true; + + // Start time + $start = microtime( true ); + + // Open the file for reading in binary mode (fopen may return null for quarantined files) + if ( ( $file_handle = @fopen( $file_name, 'rb' ) ) ) { + $file_bytes = 0; + + // Get header block + if ( ( $block = $this->get_file_block( $file_name, $new_file_name ) ) ) { + // Write header block + if ( $file_offset === 0 ) { + if ( ( $file_bytes = @fwrite( $this->file_handle, $block ) ) !== false ) { + if ( strlen( $block ) !== $file_bytes ) { + throw new Ai1wm_Quota_Exceeded_Exception( sprintf( __( 'Out of disk space. Unable to write header to file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } else { + throw new Ai1wm_Not_Writable_Exception( sprintf( __( 'Unable to write header to file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } + + // Set file offset + if ( @fseek( $file_handle, $file_offset, SEEK_SET ) !== -1 ) { + + // Read the file in 512KB chunks + while ( false === @feof( $file_handle ) ) { + + // Read the file in chunks of 512KB + if ( ( $file_content = @fread( $file_handle, 512000 ) ) !== false ) { + // Don't encrypt package.json + if ( isset( $ai1wm_params['options']['encrypt_backups'] ) && basename( $file_name ) !== 'package.json' ) { + $file_content = ai1wm_encrypt_string( $file_content, $ai1wm_params['options']['encrypt_password'] ); + } + + if ( ( $file_bytes = @fwrite( $this->file_handle, $file_content ) ) !== false ) { + if ( strlen( $file_content ) !== $file_bytes ) { + throw new Ai1wm_Quota_Exceeded_Exception( sprintf( __( 'Out of disk space. Unable to write content to file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } else { + throw new Ai1wm_Not_Writable_Exception( sprintf( __( 'Unable to write content to file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + // Set file written + $file_written += $file_bytes; + } + + // Time elapsed + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + } + + // Set file offset + $file_offset += $file_written; + + // Write file size to file header + if ( ( $block = $this->get_file_size_block( $file_offset ) ) ) { + + // Seek to beginning of file size + if ( @fseek( $this->file_handle, - $file_offset - 4096 - 12 - 14, SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( __( 'Your PHP is 32-bit. In order to export your file, please change your PHP version to 64-bit and try again. Technical details', AI1WM_PLUGIN_NAME ) ); + } + + // Write file size to file header + if ( ( $file_bytes = @fwrite( $this->file_handle, $block ) ) !== false ) { + if ( strlen( $block ) !== $file_bytes ) { + throw new Ai1wm_Quota_Exceeded_Exception( sprintf( __( 'Out of disk space. Unable to write size to file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + } else { + throw new Ai1wm_Not_Writable_Exception( sprintf( __( 'Unable to write size to file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + // Seek to end of file content + if ( @fseek( $this->file_handle, + $file_offset + 4096 + 12, SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( __( 'Your PHP is 32-bit. In order to export your file, please change your PHP version to 64-bit and try again. Technical details', AI1WM_PLUGIN_NAME ) ); + } + } + } + + // Close the handle + @fclose( $file_handle ); + } + + return $completed; + } + + /** + * Generate binary block header for a file + * + * @param string $file_name Filename to generate block header for + * @param string $new_file_name Write the file with a different name + * + * @return string + */ + private function get_file_block( $file_name, $new_file_name = '' ) { + $block = ''; + + // Get stats about the file + if ( ( $stat = @stat( $file_name ) ) !== false ) { + + // Filename of the file we are accessing + if ( empty( $new_file_name ) ) { + $name = ai1wm_basename( $file_name ); + } else { + $name = ai1wm_basename( $new_file_name ); + } + + // Size in bytes of the file + $size = $stat['size']; + + // Last time the file was modified + $date = $stat['mtime']; + + // Replace current directory separator with backward slash in file path + if ( empty( $new_file_name ) ) { + $path = ai1wm_replace_directory_separator_with_forward_slash( ai1wm_dirname( $file_name ) ); + } else { + $path = ai1wm_replace_directory_separator_with_forward_slash( ai1wm_dirname( $new_file_name ) ); + } + + // Concatenate block format parts + $format = implode( '', $this->block_format ); + + // Pack file data into binary string + $block = pack( $format, $name, $size, $date, $path ); + } + + return $block; + } + + /** + * Generate file size binary block header for a file + * + * @param int $file_size File size + * + * @return string + */ + public function get_file_size_block( $file_size ) { + $block = ''; + + // Pack file data into binary string + if ( isset( $this->block_format[1] ) ) { + $block = pack( $this->block_format[1], $file_size ); + } + + return $block; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-extractor.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-extractor.php new file mode 100644 index 0000000..665cbbf --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/archiver/class-ai1wm-extractor.php @@ -0,0 +1,650 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Extractor extends Ai1wm_Archiver { + + /** + * Total files count + * + * @type int + */ + protected $total_files_count = null; + + /** + * Total files size + * + * @type int + */ + protected $total_files_size = null; + + /** + * Overloaded constructor that opens the passed file for reading + * + * @param string $file_name File to use as archive + */ + public function __construct( $file_name ) { + // Call parent, to initialize variables + parent::__construct( $file_name ); + } + + public function list_files() { + $files = array(); + + // Seek to beginning of archive file + if ( @fseek( $this->file_handle, 0, SEEK_SET ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to beginning of file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + // Loop over files + while ( $block = @fread( $this->file_handle, 4377 ) ) { + + // End block has been reached + if ( $block === $this->eof ) { + continue; + } + + // Get file data from the block + if ( ( $data = $this->get_data_from_block( $block ) ) ) { + // Store the position where the file begins - used for downloading from archive directly + $data['offset'] = @ftell( $this->file_handle ); + + // Skip file content, so we can move forward to the next file + if ( @fseek( $this->file_handle, $data['size'], SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, $data['size'] ) ); + } + + $files[] = $data; + } + } + + return $files; + } + + /** + * Get the total files count in an archive + * + * @return int + */ + public function get_total_files_count() { + if ( is_null( $this->total_files_count ) ) { + + // Total files count + $this->total_files_count = 0; + + // Total files size + $this->total_files_size = 0; + + // Seek to beginning of archive file + if ( @fseek( $this->file_handle, 0, SEEK_SET ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to beginning of file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + // Loop over files + while ( $block = @fread( $this->file_handle, 4377 ) ) { + + // End block has been reached + if ( $block === $this->eof ) { + continue; + } + + // Get file data from the block + if ( ( $data = $this->get_data_from_block( $block ) ) ) { + + // We have a file, increment the count + $this->total_files_count += 1; + + // We have a file, increment the size + $this->total_files_size += $data['size']; + + // Skip file content so we can move forward to the next file + if ( @fseek( $this->file_handle, $data['size'], SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, $data['size'] ) ); + } + } + } + } + + return $this->total_files_count; + } + + /** + * Get the total files size in an archive + * + * @return int + */ + public function get_total_files_size() { + if ( is_null( $this->total_files_size ) ) { + + // Total files count + $this->total_files_count = 0; + + // Total files size + $this->total_files_size = 0; + + // Seek to beginning of archive file + if ( @fseek( $this->file_handle, 0, SEEK_SET ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to beginning of file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + // Loop over files + while ( $block = @fread( $this->file_handle, 4377 ) ) { + + // End block has been reached + if ( $block === $this->eof ) { + continue; + } + + // Get file data from the block + if ( ( $data = $this->get_data_from_block( $block ) ) ) { + + // We have a file, increment the count + $this->total_files_count += 1; + + // We have a file, increment the size + $this->total_files_size += $data['size']; + + // Skip file content so we can move forward to the next file + if ( @fseek( $this->file_handle, $data['size'], SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, $data['size'] ) ); + } + } + } + } + + return $this->total_files_size; + } + + /** + * Extract one file to location + * + * @param string $location Destination path + * @param array $exclude_files Exclude files by name + * @param array $exclude_extensions Exclude files by extension + * @param array $old_paths Old replace paths + * @param array $new_paths New replace paths + * @param int $file_written File written (in bytes) + * @param int $file_offset File offset (in bytes) + * + * @throws \Ai1wm_Not_Directory_Exception + * @throws \Ai1wm_Not_Seekable_Exception + * + * @return bool + */ + public function extract_one_file_to( $location, $exclude_files = array(), $exclude_extensions = array(), $old_paths = array(), $new_paths = array(), &$file_written = 0, &$file_offset = 0 ) { + if ( false === is_dir( $location ) ) { + throw new Ai1wm_Not_Directory_Exception( sprintf( __( 'Location is not a directory: %s', AI1WM_PLUGIN_NAME ), $location ) ); + } + + // Replace forward slash with current directory separator in location + $location = ai1wm_replace_forward_slash_with_directory_separator( $location ); + + // Flag to hold if file data has been processed + $completed = true; + + // Seek to file offset to archive file + if ( $file_offset > 0 ) { + if ( @fseek( $this->file_handle, - $file_offset - 4377, SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, - $file_offset - 4377 ) ); + } + } + + // Read file header block + if ( ( $block = @fread( $this->file_handle, 4377 ) ) ) { + + // We reached end of file, set the pointer to the end of the file so that feof returns true + if ( $block === $this->eof ) { + + // Seek to end of archive file minus 1 byte + @fseek( $this->file_handle, 1, SEEK_END ); + + // Read 1 character + @fgetc( $this->file_handle ); + + } else { + + // Get file header data from the block + if ( ( $data = $this->get_data_from_block( $block ) ) ) { + + // Set file name + $file_name = $data['filename']; + + // Set file size + $file_size = $data['size']; + + // Set file mtime + $file_mtime = $data['mtime']; + + // Set file path + $file_path = $data['path']; + + // Set should exclude file + $should_exclude_file = false; + + // Should we skip this file by name? + for ( $i = 0; $i < count( $exclude_files ); $i++ ) { + if ( strpos( $file_name . DIRECTORY_SEPARATOR, ai1wm_replace_forward_slash_with_directory_separator( $exclude_files[ $i ] ) . DIRECTORY_SEPARATOR ) === 0 ) { + $should_exclude_file = true; + break; + } + } + + // Should we skip this file by extension? + for ( $i = 0; $i < count( $exclude_extensions ); $i++ ) { + if ( strrpos( $file_name, $exclude_extensions[ $i ] ) === strlen( $file_name ) - strlen( $exclude_extensions[ $i ] ) ) { + $should_exclude_file = true; + break; + } + } + + // Do we have a match? + if ( $should_exclude_file === false ) { + + // Replace extract paths + for ( $i = 0; $i < count( $old_paths ); $i++ ) { + if ( strpos( $file_path . DIRECTORY_SEPARATOR, ai1wm_replace_forward_slash_with_directory_separator( $old_paths[ $i ] ) . DIRECTORY_SEPARATOR ) === 0 ) { + $file_name = substr_replace( $file_name, ai1wm_replace_forward_slash_with_directory_separator( $new_paths[ $i ] ), 0, strlen( ai1wm_replace_forward_slash_with_directory_separator( $old_paths[ $i ] ) ) ); + $file_path = substr_replace( $file_path, ai1wm_replace_forward_slash_with_directory_separator( $new_paths[ $i ] ), 0, strlen( ai1wm_replace_forward_slash_with_directory_separator( $old_paths[ $i ] ) ) ); + break; + } + } + + // Escape Windows directory separator in file path + if ( path_is_absolute( $file_path ) ) { + $file_path = ai1wm_escape_windows_directory_separator( $file_path ); + } else { + $file_path = ai1wm_escape_windows_directory_separator( $location . DIRECTORY_SEPARATOR . $file_path ); + } + + // Escape Windows directory separator in file name + if ( path_is_absolute( $file_name ) ) { + $file_name = ai1wm_escape_windows_directory_separator( $file_name ); + } else { + $file_name = ai1wm_escape_windows_directory_separator( $location . DIRECTORY_SEPARATOR . $file_name ); + } + + // Check if location doesn't exist, then create it + if ( false === is_dir( $file_path ) ) { + @mkdir( $file_path, $this->get_permissions_for_directory(), true ); + } + + $file_written = 0; + + // We have a match, let's extract the file + if ( ( $completed = $this->extract_to( $file_name, $file_size, $file_mtime, $file_written, $file_offset ) ) ) { + $file_offset = 0; + } + } else { + + // We don't have a match, skip file content + if ( @fseek( $this->file_handle, $file_size, SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, $file_size ) ); + } + } + } + } + } + + return $completed; + } + + /** + * Extract specific files from archive + * + * @param string $location Location where to extract files + * @param array $include_files Include files by name + * @param array $exclude_files Exclude files by name + * @param array $exclude_extensions Exclude files by extension + * @param int $file_written File written (in bytes) + * @param int $file_offset File offset (in bytes) + * + * @throws \Ai1wm_Not_Directory_Exception + * @throws \Ai1wm_Not_Seekable_Exception + * + * @return bool + */ + public function extract_by_files_array( $location, $include_files = array(), $exclude_files = array(), $exclude_extensions = array(), &$file_written = 0, &$file_offset = 0 ) { + if ( false === is_dir( $location ) ) { + throw new Ai1wm_Not_Directory_Exception( sprintf( __( 'Location is not a directory: %s', AI1WM_PLUGIN_NAME ), $location ) ); + } + + // Replace forward slash with current directory separator in location + $location = ai1wm_replace_forward_slash_with_directory_separator( $location ); + + // Flag to hold if file data has been processed + $completed = true; + + // Start time + $start = microtime( true ); + + // Seek to file offset to archive file + if ( $file_offset > 0 ) { + if ( @fseek( $this->file_handle, - $file_offset - 4377, SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, - $file_offset - 4377 ) ); + } + } + + // We read until we reached the end of the file, or the files we were looking for were found + while ( ( $block = @fread( $this->file_handle, 4377 ) ) ) { + + // We reached end of file, set the pointer to the end of the file so that feof returns true + if ( $block === $this->eof ) { + + // Seek to end of archive file minus 1 byte + @fseek( $this->file_handle, 1, SEEK_END ); + + // Read 1 character + @fgetc( $this->file_handle ); + + } else { + + // Get file header data from the block + if ( ( $data = $this->get_data_from_block( $block ) ) ) { + + // Set file name + $file_name = $data['filename']; + + // Set file size + $file_size = $data['size']; + + // Set file mtime + $file_mtime = $data['mtime']; + + // Set file path + $file_path = $data['path']; + + // Set should include file + $should_include_file = false; + + // Should we extract this file by name? + for ( $i = 0; $i < count( $include_files ); $i++ ) { + if ( strpos( $file_name . DIRECTORY_SEPARATOR, ai1wm_replace_forward_slash_with_directory_separator( $include_files[ $i ] ) . DIRECTORY_SEPARATOR ) === 0 ) { + $should_include_file = true; + break; + } + } + + // Should we skip this file name? + for ( $i = 0; $i < count( $exclude_files ); $i++ ) { + if ( strpos( $file_name . DIRECTORY_SEPARATOR, ai1wm_replace_forward_slash_with_directory_separator( $exclude_files[ $i ] ) . DIRECTORY_SEPARATOR ) === 0 ) { + $should_include_file = false; + break; + } + } + + // Should we skip this file by extension? + for ( $i = 0; $i < count( $exclude_extensions ); $i++ ) { + if ( strrpos( $file_name, $exclude_extensions[ $i ] ) === strlen( $file_name ) - strlen( $exclude_extensions[ $i ] ) ) { + $should_include_file = false; + break; + } + } + + // Do we have a match? + if ( $should_include_file === true ) { + + // Escape Windows directory separator in file path + $file_path = ai1wm_escape_windows_directory_separator( $location . DIRECTORY_SEPARATOR . $file_path ); + + // Escape Windows directory separator in file name + $file_name = ai1wm_escape_windows_directory_separator( $location . DIRECTORY_SEPARATOR . $file_name ); + + // Check if location doesn't exist, then create it + if ( false === is_dir( $file_path ) ) { + @mkdir( $file_path, $this->get_permissions_for_directory(), true ); + } + + $file_written = 0; + + // We have a match, let's extract the file and remove it from the array + if ( ( $completed = $this->extract_to( $file_name, $file_size, $file_mtime, $file_written, $file_offset ) ) ) { + $file_offset = 0; + } + } else { + + // We don't have a match, skip file content + if ( @fseek( $this->file_handle, $file_size, SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, $file_size ) ); + } + } + + // Time elapsed + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + } + } + + return $completed; + } + + /** + * Extract file to + * + * @param string $file_name File name + * @param array $file_size File size (in bytes) + * @param array $file_mtime File modified time (in seconds) + * @param int $file_written File written (in bytes) + * @param int $file_offset File offset (in bytes) + * + * @throws \Ai1wm_Not_Seekable_Exception + * @throws \Ai1wm_Not_Readable_Exception + * @throws \Ai1wm_Quota_Exceeded_Exception + * + * @return bool + */ + private function extract_to( $file_name, $file_size, $file_mtime, &$file_written = 0, &$file_offset = 0 ) { + global $ai1wm_params; + $file_written = 0; + + // Flag to hold if file data has been processed + $completed = true; + + // Start time + $start = microtime( true ); + + // Seek to file offset to archive file + if ( $file_offset > 0 ) { + if ( @fseek( $this->file_handle, $file_offset, SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, $file_size ) ); + } + } + + // Set file size + $file_size -= $file_offset; + + // Should the extract overwrite the file if it exists? (fopen may return null for quarantined files) + if ( ( $file_handle = @fopen( $file_name, ( $file_offset === 0 ? 'wb' : 'ab' ) ) ) ) { + $file_bytes = 0; + + // Is the filesize more than 0 bytes? + while ( $file_size > 0 ) { + + // Read the file in chunks of 512KB + $chunk_size = $file_size > 512000 ? 512000 : $file_size; + + if ( ! empty( $ai1wm_params['decryption_password'] ) && basename( $file_name ) !== 'package.json' ) { + if ( $file_size > 512000 ) { + $chunk_size += ai1wm_crypt_iv_length() * 2; + $chunk_size = $chunk_size > $file_size ? $file_size : $chunk_size; + } + } + + // Read data chunk by chunk from archive file + if ( $chunk_size > 0 ) { + $file_content = null; + + // Read the file in chunks of 512KB from archiver + if ( ( $file_content = @fread( $this->file_handle, $chunk_size ) ) === false ) { + throw new Ai1wm_Not_Readable_Exception( sprintf( __( 'Unable to read content from file. File: %s', AI1WM_PLUGIN_NAME ), $this->file_name ) ); + } + + // Remove the amount of bytes we read + $file_size -= $chunk_size; + + if ( ! empty( $ai1wm_params['decryption_password'] ) && basename( $file_name ) !== 'package.json' ) { + $file_content = ai1wm_decrypt_string( $file_content, $ai1wm_params['decryption_password'], $file_name ); + } + + // Write file contents + if ( ( $file_bytes = @fwrite( $file_handle, $file_content ) ) !== false ) { + if ( strlen( $file_content ) !== $file_bytes ) { + throw new Ai1wm_Quota_Exceeded_Exception( sprintf( __( 'Out of disk space. Unable to write content to file. File: %s', AI1WM_PLUGIN_NAME ), $file_name ) ); + } + } + + // Set file written + $file_written += $chunk_size; + } + + // Time elapsed + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + + // Set file offset + $file_offset += $file_written; + + // Close the handle + @fclose( $file_handle ); + + // Let's apply last modified date + @touch( $file_name, $file_mtime ); + + // All files should chmoded to 644 + @chmod( $file_name, $this->get_permissions_for_file() ); + + } else { + + // We don't have file permissions, skip file content + if ( @fseek( $this->file_handle, $file_size, SEEK_CUR ) === -1 ) { + throw new Ai1wm_Not_Seekable_Exception( sprintf( __( 'Unable to seek to offset of file. File: %s Offset: %d', AI1WM_PLUGIN_NAME ), $this->file_name, $file_size ) ); + } + } + + return $completed; + } + + /** + * Get file header data from the block + * + * @param string $block Binary file header + * + * @return array + */ + private function get_data_from_block( $block ) { + $data = false; + + // prepare our array keys to unpack + $format = array( + $this->block_format[0] . 'filename/', + $this->block_format[1] . 'size/', + $this->block_format[2] . 'mtime/', + $this->block_format[3] . 'path', + ); + $format = implode( '', $format ); + + // Unpack file header data + if ( ( $data = unpack( $format, $block ) ) ) { + + // Set file details + $data['filename'] = trim( $data['filename'] ); + $data['size'] = trim( $data['size'] ); + $data['mtime'] = trim( $data['mtime'] ); + $data['path'] = trim( $data['path'] ); + + // Set file name + $data['filename'] = ( $data['path'] === '.' ? $data['filename'] : $data['path'] . DIRECTORY_SEPARATOR . $data['filename'] ); + + // Set file path + $data['path'] = ( $data['path'] === '.' ? '' : $data['path'] ); + + // Replace forward slash with current directory separator in file name + $data['filename'] = ai1wm_replace_forward_slash_with_directory_separator( $data['filename'] ); + + // Replace forward slash with current directory separator in file path + $data['path'] = ai1wm_replace_forward_slash_with_directory_separator( $data['path'] ); + } + + return $data; + } + + /** + * Check if file has reached end of file + * Returns true if file has reached eof, false otherwise + * + * @return bool + */ + public function has_reached_eof() { + return @feof( $this->file_handle ); + } + + /** + * Check if file has reached end of file + * Returns true if file has NOT reached eof, false otherwise + * + * @return bool + */ + public function has_not_reached_eof() { + return ! @feof( $this->file_handle ); + } + + /** + * Get directory permissions + * + * @return int + */ + public function get_permissions_for_directory() { + if ( defined( 'FS_CHMOD_DIR' ) ) { + return FS_CHMOD_DIR; + } + + return 0755; + } + + /** + * Get file permissions + * + * @return int + */ + public function get_permissions_for_file() { + if ( defined( 'FS_CHMOD_FILE' ) ) { + return FS_CHMOD_FILE; + } + + return 0644; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/command/class-ai1wm-wp-cli-command.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/command/class-ai1wm-wp-cli-command.php new file mode 100644 index 0000000..a424c5d --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/command/class-ai1wm-wp-cli-command.php @@ -0,0 +1,45 @@ +. + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +if ( defined( 'WP_CLI' ) ) { + class Ai1wm_WP_CLI_Command extends WP_CLI_Command { + public function __invoke() { + if ( is_multisite() ) { + WP_CLI::error_multi_line( + array( + __( 'WordPress Multisite is supported via our All-in-One WP Migration Multisite Extension.', AI1WM_PLUGIN_NAME ), + __( 'You can get a copy of it here: https://servmask.com/products/multisite-extension', AI1WM_PLUGIN_NAME ), + ) + ); + exit; + } + + WP_CLI::error_multi_line( + array( + __( 'WordPress CLI is supported via our All-in-One WP Migration Unlimited Extension.', AI1WM_PLUGIN_NAME ), + __( 'You can get a copy of it here: https://servmask.com/products/unlimited-extension', AI1WM_PLUGIN_NAME ), + ) + ); + exit; + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/cron/class-ai1wm-cron.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/cron/class-ai1wm-cron.php new file mode 100644 index 0000000..284c2cf --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/cron/class-ai1wm-cron.php @@ -0,0 +1,140 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Cron { + + /** + * Schedules a hook which will be executed by the WordPress + * actions core on a specific interval + * + * @param string $hook Event hook + * @param string $recurrence How often the event should reoccur + * @param integer $timestamp Preferred timestamp (when the event shall be run) + * @param array $args Arguments to pass to the hook function(s) + * @return mixed + */ + public static function add( $hook, $recurrence, $timestamp, $args = array() ) { + $schedules = wp_get_schedules(); + + // Schedule event + if ( isset( $schedules[ $recurrence ] ) && ( $current = $schedules[ $recurrence ] ) ) { + if ( $timestamp <= ( $current_timestamp = time() ) ) { + while ( $timestamp <= $current_timestamp ) { + $timestamp += $current['interval']; + } + } + + return wp_schedule_event( $timestamp, $recurrence, $hook, $args ); + } + } + + /** + * Un-schedules all previously-scheduled cron jobs using a particular + * hook name or a specific combination of hook name and arguments. + * + * @param string $hook Event hook + * @return boolean + */ + public static function clear( $hook ) { + $cron = get_option( AI1WM_CRON, array() ); + if ( empty( $cron ) ) { + return false; + } + + foreach ( $cron as $timestamp => $hooks ) { + if ( isset( $hooks[ $hook ] ) ) { + unset( $cron[ $timestamp ][ $hook ] ); + + // Unset empty timestamps + if ( empty( $cron[ $timestamp ] ) ) { + unset( $cron[ $timestamp ] ); + } + } + } + + return update_option( AI1WM_CRON, $cron ); + } + + /** + * Checks whether cronjob already exists + * + * @param string $hook Event hook + * @param array $args Event callback arguments + * @return boolean + */ + public static function exists( $hook, $args = array() ) { + $cron = get_option( AI1WM_CRON, array() ); + if ( empty( $cron ) ) { + return false; + } + + foreach ( $cron as $timestamp => $hooks ) { + if ( empty( $args ) ) { + if ( isset( $hooks[ $hook ] ) ) { + return true; + } + } else { + if ( isset( $hooks[ $hook ][ md5( serialize( $args ) ) ] ) ) { + return true; + } + } + } + + return false; + } + + /** + * Deletes cron event(s) if it exists + * + * @param string $hook Event hook + * @param array $args Event callback arguments + * @return boolean + */ + public static function delete( $hook, $args = array() ) { + $cron = get_option( AI1WM_CRON, array() ); + if ( empty( $cron ) ) { + return false; + } + + $key = md5( serialize( $args ) ); + foreach ( $cron as $timestamp => $hooks ) { + if ( isset( $cron[ $timestamp ][ $hook ][ $key ] ) ) { + unset( $cron[ $timestamp ][ $hook ][ $key ] ); + } + if ( isset( $cron[ $timestamp ][ $hook ] ) && empty( $cron[ $timestamp ][ $hook ] ) ) { + unset( $cron[ $timestamp ][ $hook ] ); + } + if ( empty( $cron[ $timestamp ] ) ) { + unset( $cron[ $timestamp ] ); + } + } + + return update_option( AI1WM_CRON, $cron ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-mysql.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-mysql.php new file mode 100644 index 0000000..041aca5 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-mysql.php @@ -0,0 +1,140 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Database_Mysql extends Ai1wm_Database { + + /** + * Run MySQL query + * + * @param string $input SQL query + * @return mixed + */ + public function query( $input ) { + if ( ! ( $result = mysql_query( $input, $this->wpdb->dbh ) ) ) { + $mysql_errno = 0; + + // Get MySQL error code + if ( ! empty( $this->wpdb->dbh ) ) { + if ( is_resource( $this->wpdb->dbh ) ) { + $mysql_errno = mysql_errno( $this->wpdb->dbh ); + } else { + $mysql_errno = 2006; + } + } + + // MySQL server has gone away, try to reconnect + if ( empty( $this->wpdb->dbh ) || 2006 === $mysql_errno ) { + if ( ! $this->wpdb->check_connection( false ) ) { + throw new Ai1wm_Database_Exception( __( 'Error reconnecting to the database. Technical details', AI1WM_PLUGIN_NAME ), 503 ); + } + + $result = mysql_query( $input, $this->wpdb->dbh ); + } + } + + return $result; + } + + /** + * Escape string input for mysql query + * + * @param string $input String to escape + * @return string + */ + public function escape( $input ) { + return mysql_real_escape_string( $input, $this->wpdb->dbh ); + } + + /** + * Return the error code for the most recent function call + * + * @return integer + */ + public function errno() { + return mysql_errno( $this->wpdb->dbh ); + } + + /** + * Return a string description of the last error + * + * @return string + */ + public function error() { + return mysql_error( $this->wpdb->dbh ); + } + + /** + * Return server version + * + * @return string + */ + public function version() { + return mysql_get_server_info( $this->wpdb->dbh ); + } + + /** + * Return the result from MySQL query as associative array + * + * @param resource $result MySQL resource + * @return array + */ + public function fetch_assoc( $result ) { + return mysql_fetch_assoc( $result ); + } + + /** + * Return the result from MySQL query as row + * + * @param resource $result MySQL resource + * @return array + */ + public function fetch_row( $result ) { + return mysql_fetch_row( $result ); + } + + /** + * Return the number for rows from MySQL results + * + * @param resource $result MySQL resource + * @return integer + */ + public function num_rows( $result ) { + return mysql_num_rows( $result ); + } + + /** + * Free MySQL result memory + * + * @param resource $result MySQL resource + * @return boolean + */ + public function free_result( $result ) { + return mysql_free_result( $result ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-mysqli.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-mysqli.php new file mode 100644 index 0000000..348a1c5 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-mysqli.php @@ -0,0 +1,145 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Database_Mysqli extends Ai1wm_Database { + + /** + * Run MySQL query + * + * @param string $input SQL query + * @return mixed + */ + public function query( $input ) { + if ( ! mysqli_real_query( $this->wpdb->dbh, $input ) ) { + $mysqli_errno = 0; + + // Get MySQL error code + if ( ! empty( $this->wpdb->dbh ) ) { + if ( $this->wpdb->dbh instanceof mysqli ) { + $mysqli_errno = mysqli_errno( $this->wpdb->dbh ); + } else { + $mysqli_errno = 2006; + } + } + + // MySQL server has gone away, try to reconnect + if ( empty( $this->wpdb->dbh ) || 2006 === $mysqli_errno ) { + if ( ! $this->wpdb->check_connection( false ) ) { + throw new Ai1wm_Database_Exception( __( 'Error reconnecting to the database. Technical details', AI1WM_PLUGIN_NAME ), 503 ); + } + + mysqli_real_query( $this->wpdb->dbh, $input ); + } + } + + // Copy results from the internal mysqlnd buffer into the PHP variables fetched + if ( defined( 'MYSQLI_STORE_RESULT_COPY_DATA' ) ) { + return mysqli_store_result( $this->wpdb->dbh, MYSQLI_STORE_RESULT_COPY_DATA ); + } + + return mysqli_store_result( $this->wpdb->dbh ); + } + + /** + * Escape string input for mysql query + * + * @param string $input String to escape + * @return string + */ + public function escape( $input ) { + return mysqli_real_escape_string( $this->wpdb->dbh, $input ); + } + + /** + * Return the error code for the most recent function call + * + * @return integer + */ + public function errno() { + return mysqli_errno( $this->wpdb->dbh ); + } + + /** + * Return a string description of the last error + * + * @return string + */ + public function error() { + return mysqli_error( $this->wpdb->dbh ); + } + + /** + * Return server version + * + * @return string + */ + public function version() { + return mysqli_get_server_info( $this->wpdb->dbh ); + } + + /** + * Return the result from MySQL query as associative array + * + * @param resource $result MySQL resource + * @return array + */ + public function fetch_assoc( $result ) { + return mysqli_fetch_assoc( $result ); + } + + /** + * Return the result from MySQL query as row + * + * @param resource $result MySQL resource + * @return array + */ + public function fetch_row( $result ) { + return mysqli_fetch_row( $result ); + } + + /** + * Return the number for rows from MySQL results + * + * @param resource $result MySQL resource + * @return integer + */ + public function num_rows( $result ) { + return mysqli_num_rows( $result ); + } + + /** + * Free MySQL result memory + * + * @param resource $result MySQL resource + * @return boolean + */ + public function free_result( $result ) { + return mysqli_free_result( $result ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-utility.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-utility.php new file mode 100644 index 0000000..b69b822 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database-utility.php @@ -0,0 +1,184 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Database_Utility { + + /** + * Get MySQLClient to be used for DB manipulation + * + * @return Ai1wm_Database + */ + public static function create_client() { + global $wpdb; + + if ( PHP_MAJOR_VERSION >= 7 ) { + return new Ai1wm_Database_Mysqli( $wpdb ); + } + + if ( empty( $wpdb->use_mysqli ) ) { + return new Ai1wm_Database_Mysql( $wpdb ); + } + + return new Ai1wm_Database_Mysqli( $wpdb ); + } + + /** + * Replace all occurrences of the search string with the replacement string. + * This function is case-sensitive. + * + * @param array $from List of string we're looking to replace. + * @param array $to What we want it to be replaced with. + * @param string $data Data to replace. + * @return mixed The original string with all elements replaced as needed. + */ + public static function replace_values( $from = array(), $to = array(), $data = '' ) { + if ( ! empty( $from ) && ! empty( $to ) ) { + return strtr( $data, array_combine( $from, $to ) ); + } + + return $data; + } + + /** + * Take a serialized array and unserialize it replacing elements as needed and + * unserializing any subordinate arrays and performing the replace on those too. + * This function is case-sensitive. + * + * @param array $from List of string we're looking to replace. + * @param array $to What we want it to be replaced with. + * @param mixed $data Used to pass any subordinate arrays back to in. + * @param bool $serialized Does the array passed via $data need serializing. + * @return mixed The original array with all elements replaced as needed. + */ + public static function replace_serialized_values( $from = array(), $to = array(), $data = '', $serialized = false ) { + try { + + // Some unserialized data cannot be re-serialized eg. SimpleXMLElements + if ( is_serialized( $data ) && ( $unserialized = @unserialize( $data ) ) !== false ) { + $data = self::replace_serialized_values( $from, $to, $unserialized, true ); + } elseif ( is_array( $data ) ) { + $tmp = array(); + foreach ( $data as $key => $value ) { + $tmp[ $key ] = self::replace_serialized_values( $from, $to, $value, false ); + } + + $data = $tmp; + unset( $tmp ); + } elseif ( is_object( $data ) ) { + if ( ! ( $data instanceof __PHP_Incomplete_Class ) ) { + $tmp = $data; + $props = get_object_vars( $data ); + foreach ( $props as $key => $value ) { + if ( ! empty( $tmp->$key ) ) { + $tmp->$key = self::replace_serialized_values( $from, $to, $value, false ); + } + } + + $data = $tmp; + unset( $tmp ); + } + } else { + if ( is_string( $data ) ) { + if ( ! empty( $from ) && ! empty( $to ) ) { + $data = strtr( $data, array_combine( $from, $to ) ); + } + } + } + + if ( $serialized ) { + return serialize( $data ); + } + } catch ( Exception $e ) { + } + + return $data; + } + + /** + * Escape MySQL special characters + * + * @param string $data Data to escape + * @return string + */ + public static function escape_mysql( $data ) { + return strtr( + $data, + array_combine( + array( "\x00", "\n", "\r", '\\', "'", '"', "\x1a" ), + array( '\\0', '\\n', '\\r', '\\\\', "\\'", '\\"', '\\Z' ) + ) + ); + } + + /** + * Unescape MySQL special characters + * + * @param string $data Data to unescape + * @return string + */ + public static function unescape_mysql( $data ) { + return strtr( + $data, + array_combine( + array( '\\0', '\\n', '\\r', '\\\\', "\\'", '\\"', '\\Z' ), + array( "\x00", "\n", "\r", '\\', "'", '"', "\x1a" ) + ) + ); + } + + /** + * Encode base64 characters + * + * @param string $data Data to encode + * @return string + */ + public static function base64_encode( $data ) { + return base64_encode( $data ); + } + + /** + * Encode base64 characters + * + * @param string $data Data to decode + * @return string + */ + public static function base64_decode( $data ) { + return base64_decode( $data ); + } + + /** + * Validate base64 data + * + * @param string $data Data to validate + * @return boolean + */ + public static function base64_validate( $data ) { + return base64_encode( base64_decode( $data ) ) === $data; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database.php new file mode 100644 index 0000000..9d15308 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/database/class-ai1wm-database.php @@ -0,0 +1,2129 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +abstract class Ai1wm_Database { + + /** + * WordPress database handler + * + * @var object + */ + protected $wpdb = null; + + /** + * WordPress database base tables + * + * @var array + */ + protected $base_tables = null; + + /** + * WordPress database views + * + * @var array + */ + protected $views = null; + + /** + * WordPress database tables + * + * @var array + */ + protected $tables = null; + + /** + * Old table prefixes + * + * @var array + */ + protected $old_table_prefixes = array(); + + /** + * New table prefixes + * + * @var array + */ + protected $new_table_prefixes = array(); + + /** + * Old column prefixes + * + * @var array + */ + protected $old_column_prefixes = array(); + + /** + * New column prefixes + * + * @var array + */ + protected $new_column_prefixes = array(); + + /** + * Reserved column prefixes + * + * @var array + */ + protected $reserved_column_prefixes = array(); + + /** + * Old replace values + * + * @var array + */ + protected $old_replace_values = array(); + + /** + * New replace values + * + * @var array + */ + protected $new_replace_values = array(); + + /** + * Old raw replace values + * + * @var array + */ + protected $old_replace_raw_values = array(); + + /** + * New raw replace values + * + * @var array + */ + protected $new_replace_raw_values = array(); + + /** + * Table where query + * + * @var array + */ + protected $table_where_query = array(); + + /** + * Table select columns + * + * @var array + */ + protected $table_select_columns = array(); + + /** + * Table prefix columns + * + * @var array + */ + protected $table_prefix_columns = array(); + + /** + * Table prefix filters + * + * @var array + */ + protected $table_prefix_filters = array(); + + /** + * List all tables that should not be affected by the timeout of the current request + * + * @var array + */ + protected $atomic_tables = array(); + + /** + * List all tables that should not be populated on import + * + * @var array + */ + protected $empty_tables = array(); + + /** + * Visual Composer + * + * @var boolean + */ + protected $visual_composer = false; + + /** + * Oxygen Builder + * + * @var boolean + */ + protected $oxygen_builder = false; + + /** + * BeTheme Responsive + * + * @var boolean + */ + protected $betheme_responsive = false; + + /** + * Optimize Press + * + * @var boolean + */ + protected $optimize_press = false; + + /** + * Avada Fusion Builder + * + * @var boolean + */ + protected $avada_fusion_builder = false; + + /** + * Constructor + * + * @param object $wpdb WPDB instance + */ + public function __construct( $wpdb ) { + $this->wpdb = $wpdb; + + // Check Microsoft SQL Server support + if ( is_resource( $this->wpdb->dbh ) ) { + if ( get_resource_type( $this->wpdb->dbh ) === 'SQL Server Connection' ) { + throw new Ai1wm_Database_Exception( + __( + 'Your WordPress installation uses Microsoft SQL Server. ' . + 'To use All-in-One WP Migration, please change your installation to MySQL and try again. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ), + 501 + ); + } + } + + // Set database host (HyberDB) + if ( empty( $this->wpdb->dbhost ) ) { + if ( isset( $this->wpdb->last_used_server['host'] ) ) { + $this->wpdb->dbhost = $this->wpdb->last_used_server['host']; + } + } + + // Set database name (HyperDB) + if ( empty( $this->wpdb->dbname ) ) { + if ( isset( $this->wpdb->last_used_server['name'] ) ) { + $this->wpdb->dbname = $this->wpdb->last_used_server['name']; + } + } + } + + /** + * Set old table prefixes + * + * @param array $prefixes List of table prefixes + * @return object + */ + public function set_old_table_prefixes( $prefixes ) { + $this->old_table_prefixes = $prefixes; + + return $this; + } + + /** + * Get old table prefixes + * + * @return array + */ + public function get_old_table_prefixes() { + return $this->old_table_prefixes; + } + + /** + * Set new table prefixes + * + * @param array $prefixes List of table prefixes + * @return object + */ + public function set_new_table_prefixes( $prefixes ) { + $this->new_table_prefixes = $prefixes; + + return $this; + } + + /** + * Get new table prefixes + * + * @return array + */ + public function get_new_table_prefixes() { + return $this->new_table_prefixes; + } + + /** + * Set old column prefixes + * + * @param array $prefixes List of column prefixes + * @return object + */ + public function set_old_column_prefixes( $prefixes ) { + $this->old_column_prefixes = $prefixes; + + return $this; + } + + /** + * Get old column prefixes + * + * @return array + */ + public function get_old_column_prefixes() { + return $this->old_column_prefixes; + } + + /** + * Set new column prefixes + * + * @param array $prefixes List of column prefixes + * @return object + */ + public function set_new_column_prefixes( $prefixes ) { + $this->new_column_prefixes = $prefixes; + + return $this; + } + + /** + * Get new column prefixes + * + * @return array + */ + public function get_new_column_prefixes() { + return $this->new_column_prefixes; + } + + /** + * Set reserved column prefixes + * + * @param array $prefixes List of column prefixes + * @return object + */ + public function set_reserved_column_prefixes( $prefixes ) { + $this->reserved_column_prefixes = $prefixes; + + return $this; + } + + /** + * Get reserved column prefixes + * + * @return array + */ + public function get_reserved_column_prefixes() { + return $this->reserved_column_prefixes; + } + + /** + * Set old replace values + * + * @param array $values List of values + * @return object + */ + public function set_old_replace_values( $values ) { + $this->old_replace_values = $values; + + return $this; + } + + /** + * Get old replace values + * + * @return array + */ + public function get_old_replace_values() { + return $this->old_replace_values; + } + + /** + * Set new replace values + * + * @param array $values List of values + * @return object + */ + public function set_new_replace_values( $values ) { + $this->new_replace_values = $values; + + return $this; + } + + /** + * Get new replace values + * + * @return array + */ + public function get_new_replace_values() { + return $this->new_replace_values; + } + + /** + * Set old replace raw values + * + * @param array $values List of values + * @return object + */ + public function set_old_replace_raw_values( $values ) { + $this->old_replace_raw_values = $values; + + return $this; + } + + /** + * Get old replace raw values + * + * @return array + */ + public function get_old_replace_raw_values() { + return $this->old_replace_raw_values; + } + + /** + * Set new replace raw values + * + * @param array $values List of values + * @return object + */ + public function set_new_replace_raw_values( $values ) { + $this->new_replace_raw_values = $values; + + return $this; + } + + /** + * Get new replace raw values + * + * @return array + */ + public function get_new_replace_raw_values() { + return $this->new_replace_raw_values; + } + + /** + * Set table where query + * + * @param string $table_name Table name + * @param array $where_$query Table query + * @return object + */ + public function set_table_where_query( $table_name, $where_query ) { + $this->table_where_query[ strtolower( $table_name ) ] = $where_query; + + return $this; + } + + /** + * Get table where query + * + * @param string $table_name Table name + * @return string + */ + public function get_table_where_query( $table_name ) { + if ( isset( $this->table_where_query[ strtolower( $table_name ) ] ) ) { + return $this->table_where_query[ strtolower( $table_name ) ]; + } + } + + /** + * Set table select columns + * + * @param string $table_name Table name + * @param array $column_names Column names + * @return object + */ + public function set_table_select_columns( $table_name, $column_names ) { + foreach ( $column_names as $column_name => $column_expression ) { + $this->table_select_columns[ strtolower( $table_name ) ][ strtolower( $column_name ) ] = $column_expression; + } + + return $this; + } + + /** + * Get table select columns + * + * @param string $table_name Table name + * @return array + */ + public function get_table_select_columns( $table_name ) { + if ( isset( $this->table_select_columns[ strtolower( $table_name ) ] ) ) { + return $this->table_select_columns[ strtolower( $table_name ) ]; + } + } + + /** + * Set table prefix columns + * + * @param string $table_name Table name + * @param array $column_names Column names + * @return object + */ + public function set_table_prefix_columns( $table_name, $column_names ) { + foreach ( $column_names as $column_name ) { + $this->table_prefix_columns[ strtolower( $table_name ) ][ strtolower( $column_name ) ] = true; + } + + return $this; + } + + /** + * Get table prefix columns + * + * @param string $table_name Table name + * @return array + */ + public function get_table_prefix_columns( $table_name ) { + if ( isset( $this->table_prefix_columns[ strtolower( $table_name ) ] ) ) { + return $this->table_prefix_columns[ strtolower( $table_name ) ]; + } + } + + /** + * Add table prefix filter + * + * @param string $table_prefix Table prefix + * @param string $exclude_prefix Exclude prefix + * @return object + */ + + public function add_table_prefix_filter( $table_prefix, $exclude_prefix = null ) { + $this->table_prefix_filters[] = array( $table_prefix, $exclude_prefix ); + + return $this; + } + + /** + * Get table prefix filter + * + * @return array + */ + public function get_table_prefix_filters() { + return $this->table_prefix_filters; + } + + /** + * Set atomic tables + * + * @param array $tables List of tables + * @return object + */ + public function set_atomic_tables( $tables ) { + $this->atomic_tables = $tables; + + return $this; + } + + /** + * Get atomic tables + * + * @return array + */ + public function get_atomic_tables() { + return $this->atomic_tables; + } + + /** + * Set empty tables + * + * @param array $tables List of tables + * @return object + */ + public function set_empty_tables( $tables ) { + $this->empty_tables = $tables; + + return $this; + } + + /** + * Get empty tables + * + * @return array + */ + public function get_empty_tables() { + return $this->empty_tables; + } + + /** + * Set Visual Composer + * + * @param boolean $active Is Visual Composer Active? + * @return object + */ + public function set_visual_composer( $active ) { + $this->visual_composer = $active; + + return $this; + } + + /** + * Get Visual Composer + * + * @return boolean + */ + public function get_visual_composer() { + return $this->visual_composer; + } + + /** + * Set Oxygen Builder + * + * @param boolean $active Is Oxygen Builder Active? + * @return object + */ + public function set_oxygen_builder( $active ) { + $this->oxygen_builder = $active; + + return $this; + } + + /** + * Get Oxygen Builder + * + * @return boolean + */ + public function get_oxygen_builder() { + return $this->oxygen_builder; + } + + /** + * Set BeTheme Responsive + * + * @param boolean $active Is BeTheme Responsive Active? + * @return object + */ + public function set_betheme_responsive( $active ) { + $this->betheme_responsive = $active; + + return $this; + } + + /** + * Get BeTheme Responsive + * + * @return boolean + */ + public function get_betheme_responsive() { + return $this->betheme_responsive; + } + + /** + * Set Optimize Press + * + * @param boolean $active Is Optimize Press Active? + * @return object + */ + public function set_optimize_press( $active ) { + $this->optimize_press = $active; + + return $this; + } + + /** + * Get Optimize Press + * + * @return boolean + */ + public function get_optimize_press() { + return $this->optimize_press; + } + + /** + * Set Avada Fusion Builder + * + * @param boolean $active Is Avada Fusion Builder Active? + * @return object + */ + public function set_avada_fusion_builder( $active ) { + $this->avada_fusion_builder = $active; + + return $this; + } + + /** + * Get Avada Fusion Builder + * + * @return boolean + */ + public function get_avada_fusion_builder() { + return $this->avada_fusion_builder; + } + + /** + * Get views + * + * @return array + */ + protected function get_views() { + if ( is_null( $this->views ) ) { + $where_query = array(); + + // Get lower case table names + $lower_case_table_names = $this->get_lower_case_table_names(); + + // Loop over table prefixes + if ( $this->get_table_prefix_filters() ) { + foreach ( $this->get_table_prefix_filters() as $prefix_filter ) { + if ( isset( $prefix_filter[0], $prefix_filter[1] ) ) { + if ( $lower_case_table_names ) { + $where_query[] = sprintf( "(`Tables_in_%s` REGEXP '^%s' AND `Tables_in_%s` NOT REGEXP '^%s')", $this->wpdb->dbname, $prefix_filter[0], $this->wpdb->dbname, $prefix_filter[1] ); + } else { + $where_query[] = sprintf( "(CAST(`Tables_in_%s` AS BINARY) REGEXP BINARY '^%s' AND CAST(`Tables_in_%s` AS BINARY) NOT REGEXP BINARY '^%s')", $this->wpdb->dbname, $prefix_filter[0], $this->wpdb->dbname, $prefix_filter[1] ); + } + } else { + if ( $lower_case_table_names ) { + $where_query[] = sprintf( "`Tables_in_%s` REGEXP '^%s'", $this->wpdb->dbname, $prefix_filter[0] ); + } else { + $where_query[] = sprintf( "CAST(`Tables_in_%s` AS BINARY) REGEXP BINARY '^%s'", $this->wpdb->dbname, $prefix_filter[0] ); + } + } + } + } else { + $where_query[] = 1; + } + + $this->views = array(); + + // Loop over views + $result = $this->query( sprintf( "SHOW FULL TABLES FROM `%s` WHERE `Table_type` = 'VIEW' AND (%s)", $this->wpdb->dbname, implode( ' OR ', $where_query ) ) ); + while ( $row = $this->fetch_row( $result ) ) { + if ( isset( $row[0] ) ) { + $this->views[] = $row[0]; + } + } + + // Close result cursor + $this->free_result( $result ); + } + + return $this->views; + } + + /** + * Get base tables + * + * @return array + */ + protected function get_base_tables() { + if ( is_null( $this->base_tables ) ) { + $where_query = array(); + + // Get lower case table names + $lower_case_table_names = $this->get_lower_case_table_names(); + + // Loop over table prefixes + if ( $this->get_table_prefix_filters() ) { + foreach ( $this->get_table_prefix_filters() as $prefix_filter ) { + if ( isset( $prefix_filter[0], $prefix_filter[1] ) ) { + if ( $lower_case_table_names ) { + $where_query[] = sprintf( "(`Tables_in_%s` REGEXP '^%s' AND `Tables_in_%s` NOT REGEXP '^%s')", $this->wpdb->dbname, $prefix_filter[0], $this->wpdb->dbname, $prefix_filter[1] ); + } else { + $where_query[] = sprintf( "(CAST(`Tables_in_%s` AS BINARY) REGEXP BINARY '^%s' AND CAST(`Tables_in_%s` AS BINARY) NOT REGEXP BINARY '^%s')", $this->wpdb->dbname, $prefix_filter[0], $this->wpdb->dbname, $prefix_filter[1] ); + } + } else { + if ( $lower_case_table_names ) { + $where_query[] = sprintf( "`Tables_in_%s` REGEXP '^%s'", $this->wpdb->dbname, $prefix_filter[0] ); + } else { + $where_query[] = sprintf( "CAST(`Tables_in_%s` AS BINARY) REGEXP BINARY '^%s'", $this->wpdb->dbname, $prefix_filter[0] ); + } + } + } + } else { + $where_query[] = 1; + } + + $this->base_tables = array(); + + // Loop over base tables + $result = $this->query( sprintf( "SHOW FULL TABLES FROM `%s` WHERE `Table_type` = 'BASE TABLE' AND (%s)", $this->wpdb->dbname, implode( ' OR ', $where_query ) ) ); + while ( $row = $this->fetch_row( $result ) ) { + if ( isset( $row[0] ) ) { + $this->base_tables[] = $row[0]; + } + } + + // Close result cursor + $this->free_result( $result ); + } + + return $this->base_tables; + } + + /** + * Set tables + * + * @param array $tables List of tables + * @return object + */ + public function set_tables( $tables ) { + $this->tables = $tables; + + return $this; + } + + /** + * Get tables + * + * @return array + */ + public function get_tables() { + if ( is_null( $this->tables ) ) { + return array_merge( $this->get_base_tables(), $this->get_views() ); + } + + return $this->tables; + } + + /** + * Export database into a file + * + * @param string $file_name File name + * @param integer $query_offset Query offset + * @param integer $table_index Table index + * @param integer $table_offset Table offset + * @param integer $table_rows Table rows + * @return boolean + */ + public function export( $file_name, &$query_offset = 0, &$table_index = 0, &$table_offset = 0, &$table_rows = 0 ) { + // Set file handler + $file_handler = ai1wm_open( $file_name, 'cb' ); + + // Start time + $start = microtime( true ); + + // Flag to hold if all tables have been processed + $completed = true; + + // Set SQL mode + $this->query( "SET SESSION sql_mode = ''" ); + + // Get tables + $tables = $this->get_tables(); + + // Get views + $views = $this->get_views(); + + // Set file pointer at the query offset + if ( fseek( $file_handler, $query_offset ) !== -1 ) { + + // Write headers + if ( $query_offset === 0 ) { + ai1wm_write( $file_handler, $this->get_header() ); + } + + // Export tables + for ( ; $table_index < count( $tables ); ) { + + // Get table name + $table_name = $tables[ $table_index ]; + + // Replace table name prefixes + $new_table_name = $this->replace_table_prefixes( $table_name, 0 ); + + // Loop over tables and views + if ( in_array( $table_name, $views ) ) { + + // Get create view statement + if ( $table_offset === 0 ) { + + // Write view drop statement + $drop_view = "\nDROP VIEW IF EXISTS `{$new_table_name}`;\n"; + + // Write drop view statement + ai1wm_write( $file_handler, $drop_view ); + + // Get create view statement + $create_view = $this->get_create_view( $table_name ); + + // Replace create view name + $create_view = $this->replace_view_name( $create_view, $table_name, $new_table_name ); + + // Replace create view identifiers + $create_view = $this->replace_view_identifiers( $create_view ); + + // Replace create view options + $create_view = $this->replace_view_options( $create_view ); + + // Write create view statement + ai1wm_write( $file_handler, $create_view ); + + // Write end of statement + ai1wm_write( $file_handler, ";\n\n" ); + } + + // Set curent table index + $table_index++; + + // Set current table offset + $table_offset = 0; + + } else { + + // Get create table statement + if ( $table_offset === 0 ) { + + // Write table drop statement + $drop_table = "\nDROP TABLE IF EXISTS `{$new_table_name}`;\n"; + + // Write table statement + ai1wm_write( $file_handler, $drop_table ); + + // Get create table statement + $create_table = $this->get_create_table( $table_name ); + + // Replace create table name + $create_table = $this->replace_table_name( $create_table, $table_name, $new_table_name ); + + // Replace create table comments + $create_table = $this->replace_table_comments( $create_table ); + + // Replace create table constraints + $create_table = $this->replace_table_constraints( $create_table ); + + // Replace create table options + $create_table = $this->replace_table_options( $create_table ); + + // Write create table statement + ai1wm_write( $file_handler, $create_table ); + + // Write end of statement + ai1wm_write( $file_handler, ";\n\n" ); + } + + // Get primary keys + $primary_keys = $this->get_primary_keys( $table_name ); + + // Get column types + $column_types = $this->get_column_types( $table_name ); + + // Get prefix columns + $prefix_columns = $this->get_table_prefix_columns( $table_name ); + + do { + + // Set query + if ( $primary_keys ) { + + // Set table keys + $table_keys = array(); + foreach ( $primary_keys as $key ) { + $table_keys[] = sprintf( '`%s`', $key ); + } + + $table_keys = implode( ', ', $table_keys ); + + // Set table where query + if ( ! ( $table_where = $this->get_table_where_query( $table_name ) ) ) { + $table_where = 1; + } + + // Set table select columns + if ( ! ( $select_columns = $this->get_table_select_columns( $table_name ) ) ) { + $select_columns = array( 't1.*' ); + } + + $select_columns = implode( ', ', $select_columns ); + + // Set query with offset and rows count + $query = sprintf( 'SELECT %s FROM `%s` AS t1 JOIN (SELECT %s FROM `%s` WHERE %s ORDER BY %s LIMIT %d, %d) AS t2 USING (%s)', $select_columns, $table_name, $table_keys, $table_name, $table_where, $table_keys, $table_offset, AI1WM_MAX_SELECT_RECORDS, $table_keys ); + + } else { + + $table_keys = 1; + + // Set table where query + if ( ! ( $table_where = $this->get_table_where_query( $table_name ) ) ) { + $table_where = 1; + } + + // Set table select columns + if ( ! ( $select_columns = $this->get_table_select_columns( $table_name ) ) ) { + $select_columns = array( '*' ); + } + + $select_columns = implode( ', ', $select_columns ); + + // Set query with offset and rows count + $query = sprintf( 'SELECT %s FROM `%s` WHERE %s ORDER BY %s LIMIT %d, %d', $select_columns, $table_name, $table_where, $table_keys, $table_offset, AI1WM_MAX_SELECT_RECORDS ); + } + + // Run SQL query + $result = $this->query( $query ); + + // Repair table data + if ( $this->errno() === 1194 ) { + + // Current table is marked as crashed and should be repaired + $this->repair_table( $table_name ); + + // Run SQL query + $result = $this->query( $query ); + } + + // Generate insert statements + if ( $num_rows = $this->num_rows( $result ) ) { + + // Loop over table rows + while ( $row = $this->fetch_assoc( $result ) ) { + + // Write start transaction + if ( $table_offset % AI1WM_MAX_TRANSACTION_QUERIES === 0 ) { + ai1wm_write( $file_handler, "START TRANSACTION;\n" ); + } + + $items = array(); + foreach ( $row as $key => $value ) { + // Replace table prefix columns + if ( isset( $prefix_columns[ strtolower( $key ) ] ) ) { + $value = $this->replace_column_prefixes( $value, 0 ); + } + + $items[] = $this->prepare_table_values( $value, $column_types[ strtolower( $key ) ] ); + } + + // Set table values + $table_values = implode( ',', $items ); + + // Set insert statement + $table_insert = "INSERT INTO `{$new_table_name}` VALUES ({$table_values});\n"; + + // Write insert statement + ai1wm_write( $file_handler, $table_insert ); + + // Set current table offset + $table_offset++; + + // Set current table rows + $table_rows++; + + // Write end of transaction + if ( $table_offset % AI1WM_MAX_TRANSACTION_QUERIES === 0 ) { + ai1wm_write( $file_handler, "COMMIT;\n" ); + } + } + } else { + + // Write end of transaction + if ( $table_offset % AI1WM_MAX_TRANSACTION_QUERIES !== 0 ) { + ai1wm_write( $file_handler, "COMMIT;\n" ); + } + + // Set curent table index + $table_index++; + + // Set current table offset + $table_offset = 0; + } + + // Close result cursor + $this->free_result( $result ); + + // Time elapsed + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break 2; + } + } + } while ( $num_rows > 0 ); + } + } + } + + // Set query offset + $query_offset = ftell( $file_handler ); + + // Close file handler + ai1wm_close( $file_handler ); + + return $completed; + } + + /** + * Import database from a file + * + * @param string $file_name File name + * @param integer $query_offset Query offset + * @return boolean + */ + public function import( $file_name, &$query_offset = 0 ) { + // Set max allowed packet + $max_allowed_packet = $this->get_max_allowed_packet(); + + // Set file handler + $file_handler = ai1wm_open( $file_name, 'rb' ); + + // Start time + $start = microtime( true ); + + // Flag to hold if all tables have been processed + $completed = true; + + // Set SQL Mode + $this->query( "SET SESSION sql_mode = ''" ); + + // Set file pointer at the query offset + if ( fseek( $file_handler, $query_offset ) !== -1 ) { + $query = null; + + // Start transaction + $this->query( 'START TRANSACTION' ); + + // Read database file line by line + while ( ( $line = fgets( $file_handler ) ) !== false ) { + $query .= $line; + + // End of query + if ( preg_match( '/;\s*$/S', $query ) ) { + $query = trim( $query ); + + // Check max allowed packet + if ( strlen( $query ) <= $max_allowed_packet ) { + + // Replace table prefixes + $query = $this->replace_table_prefixes( $query ); + + // Skip table query + if ( $this->should_ignore_query( $query ) === false ) { + + // Replace table collations + $query = $this->replace_table_collations( $query ); + + // Replace table values + $query = $this->replace_table_values( $query ); + + // Replace raw values + $query = $this->replace_raw_values( $query ); + + // Run SQL query + $this->query( $query ); + + // Replace table engines (Azure) + if ( $this->errno() === 1030 ) { + + // Replace table engines + $query = $this->replace_table_engines( $query ); + + // Run SQL query + $this->query( $query ); + } + + // Replace table row format (MyISAM and InnoDB) + if ( $this->errno() === 1071 || $this->errno() === 1709 ) { + + // Replace table row format + $query = $this->replace_table_row_format( $query ); + + // Run SQL query + $this->query( $query ); + } + + // Replace table full-text indexes (MySQL <= 5.5) + if ( $this->errno() === 1214 ) { + + // Full-text searches are supported for MyISAM tables only. + // In MySQL 5.6 and up, they can also be used with InnoDB tables + $query = $this->replace_table_fulltext_indexes( $query ); + + // Run SQL query + $this->query( $query ); + } + + // Check tablespace exists + if ( $this->errno() === 1813 ) { + throw new Ai1wm_Database_Exception( __( 'Error importing database table. Technical details', AI1WM_PLUGIN_NAME ), 503 ); + } + + // Check max queries per hour + if ( $this->errno() === 1226 ) { + if ( stripos( $this->error(), 'max_queries_per_hour' ) !== false ) { + throw new Ai1wm_Database_Exception( + __( + 'Your WordPress installation has reached the maximum allowed queries per hour set by your server admin or hosting provider. ' . + 'To use All-in-One WP Migration, please increase MySQL max_queries_per_hour limit. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ), + 503 + ); + } elseif ( stripos( $this->error(), 'max_updates_per_hour' ) !== false ) { + throw new Ai1wm_Database_Exception( + __( + 'Your WordPress installation has reached the maximum allowed updates per hour set by your server admin or hosting provider. ' . + 'To use All-in-One WP Migration, please increase MySQL max_updates_per_hour limit. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ), + 503 + ); + } elseif ( stripos( $this->error(), 'max_connections_per_hour' ) !== false ) { + throw new Ai1wm_Database_Exception( + __( + 'Your WordPress installation has reached the maximum allowed connections per hour set by your server admin or hosting provider. ' . + 'To use All-in-One WP Migration, please increase MySQL max_connections_per_hour limit. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ), + 503 + ); + } elseif ( stripos( $this->error(), 'max_user_connections' ) !== false ) { + throw new Ai1wm_Database_Exception( + __( + 'Your WordPress installation has reached the maximum allowed user connections set by your server admin or hosting provider. ' . + 'To use All-in-One WP Migration, please increase MySQL max_user_connections limit. ' . + 'Technical details', + AI1WM_PLUGIN_NAME + ), + 503 + ); + } + } + } + + // Time elapsed + if ( ( $timeout = apply_filters( 'ai1wm_completed_timeout', 10 ) ) ) { + if ( ! $this->is_atomic_query( $query ) ) { + if ( ( microtime( true ) - $start ) > $timeout ) { + $completed = false; + break; + } + } + } + } + + $query = null; + } + } + + // End transaction + $this->query( 'COMMIT' ); + } + + // Set query offset + $query_offset = ftell( $file_handler ); + + // Close file handler + ai1wm_close( $file_handler ); + + return $completed; + } + + /** + * Flush database + * + * @return void + */ + public function flush() { + $views = $this->get_views(); + foreach ( $this->get_tables() as $table_name ) { + if ( in_array( $table_name, $views ) ) { + $this->query( "DROP VIEW IF EXISTS `{$table_name}`" ); + } else { + $this->query( "DROP TABLE IF EXISTS `{$table_name}`" ); + } + } + } + + /** + * Get MySQL version + * + * @return string + */ + protected function get_version() { + $result = $this->query( "SHOW VARIABLES LIKE 'version'" ); + $row = $this->fetch_assoc( $result ); + + // Close result cursor + $this->free_result( $result ); + + // Get version + if ( isset( $row['Value'] ) ) { + return $row['Value']; + } + } + + /** + * Get MySQL max allowed packet + * + * @return integer + */ + protected function get_max_allowed_packet() { + $result = $this->query( "SHOW VARIABLES LIKE 'max_allowed_packet'" ); + $row = $this->fetch_assoc( $result ); + + // Close result cursor + $this->free_result( $result ); + + // Get max allowed packet + if ( isset( $row['Value'] ) ) { + return $row['Value']; + } + } + + /** + * Get MySQL lower case table names + * + * @return integer + */ + protected function get_lower_case_table_names() { + $result = $this->query( "SHOW VARIABLES LIKE 'lower_case_table_names'" ); + $row = $this->fetch_assoc( $result ); + + // Close result cursor + $this->free_result( $result ); + + // Get lower case table names + if ( isset( $row['Value'] ) ) { + return $row['Value']; + } + } + + /** + * Get MySQL collation name + * + * @param string $collation_name Collation name + * @return string + */ + protected function get_collation( $collation_name ) { + $result = $this->query( "SHOW COLLATION LIKE '{$collation_name}'" ); + $row = $this->fetch_assoc( $result ); + + // Close result cursor + $this->free_result( $result ); + + // Get collation name + if ( isset( $row['Collation'] ) ) { + return $row['Collation']; + } + } + + /** + * Get MySQL create view + * + * @param string $view_name View name + * @return string + */ + protected function get_create_view( $view_name ) { + $result = $this->query( "SHOW CREATE VIEW `{$view_name}`" ); + $row = $this->fetch_assoc( $result ); + + // Close result cursor + $this->free_result( $result ); + + // Get create view + if ( isset( $row['Create View'] ) ) { + return $row['Create View']; + } + } + + /** + * Get MySQL create table + * + * @param string $table_name Table name + * @return string + */ + protected function get_create_table( $table_name ) { + $result = $this->query( "SHOW CREATE TABLE `{$table_name}`" ); + $row = $this->fetch_assoc( $result ); + + // Close result cursor + $this->free_result( $result ); + + // Get create table + if ( isset( $row['Create Table'] ) ) { + return $row['Create Table']; + } + } + + /** + * Repair MySQL table + * + * @param string $table_name Table name + * @return void + */ + protected function repair_table( $table_name ) { + $this->query( "REPAIR TABLE `{$table_name}`" ); + } + + /** + * Get MySQL primary keys + * + * @param string $table_name Table name + * @return array + */ + protected function get_primary_keys( $table_name ) { + $primary_keys = array(); + + // Get primary keys + $result = $this->query( "SHOW KEYS FROM `{$table_name}` WHERE `Key_name` = 'PRIMARY'" ); + while ( $row = $this->fetch_assoc( $result ) ) { + if ( isset( $row['Column_name'] ) ) { + $primary_keys[] = $row['Column_name']; + } + } + + // Close result cursor + $this->free_result( $result ); + + return $primary_keys; + } + + /** + * Get MySQL unique keys + * + * @param string $table_name Table name + * @return array + */ + protected function get_unique_keys( $table_name ) { + $unique_keys = array(); + + // Get unique keys + $result = $this->query( "SHOW KEYS FROM `{$table_name}` WHERE `Non_unique` = 0" ); + while ( $row = $this->fetch_assoc( $result ) ) { + if ( isset( $row['Column_name'] ) ) { + $unique_keys[] = $row['Column_name']; + } + } + + // Close result cursor + $this->free_result( $result ); + + return $unique_keys; + } + + /** + * Get MySQL column types + * + * @param string $table_name Table name + * @return array + */ + protected function get_column_types( $table_name ) { + $column_types = array(); + + // Get column types + $result = $this->query( "SHOW COLUMNS FROM `{$table_name}`" ); + while ( $row = $this->fetch_assoc( $result ) ) { + if ( isset( $row['Field'] ) ) { + $column_types[ strtolower( $row['Field'] ) ] = $row['Type']; + } + } + + // Close result cursor + $this->free_result( $result ); + + return $column_types; + } + + /** + * Get MySQL column names + * + * @param string $table_name Table name + * @return array + */ + public function get_column_names( $table_name ) { + $column_names = array(); + + // Get column types + $result = $this->query( "SHOW COLUMNS FROM `{$table_name}`" ); + while ( $row = $this->fetch_assoc( $result ) ) { + if ( isset( $row['Field'] ) ) { + $column_names[ strtolower( $row['Field'] ) ] = $row['Field']; + } + } + + // Close result cursor + $this->free_result( $result ); + + return $column_names; + } + + /** + * Replace table name + * + * @param string $input Table value + * @param string $old_table_name Old table name + * @param string $new_table_name New table name + * @return string + */ + protected function replace_table_name( $input, $old_table_name, $new_table_name ) { + $position = stripos( $input, "`$old_table_name`" ); + if ( $position !== false ) { + $input = substr_replace( $input, "`$new_table_name`", $position, strlen( "`$old_table_name`" ) ); + } + + return $input; + } + + /** + * Replace view name + * + * @param string $input View value + * @param string $old_view_name Old view name + * @param string $new_view_name New view name + * @return string + */ + protected function replace_view_name( $input, $old_view_name, $new_view_name ) { + $position = stripos( $input, "`$old_view_name`" ); + if ( $position !== false ) { + $input = substr_replace( $input, "`$new_view_name`", $position, strlen( "`$old_view_name`" ) ); + } + + return $input; + } + + /** + * Replace view identifiers + * + * @param string $input Table value + * @return string + */ + protected function replace_view_identifiers( $input ) { + $base_tables = $this->get_base_tables(); + foreach ( $base_tables as $table_name ) { + if ( ( $new_table_name = $this->replace_table_prefixes( $table_name, 0 ) ) ) { + $input = str_ireplace( "`$table_name`", "`$new_table_name`", $input ); + } + } + + return $input; + } + + /** + * Replace view options + * + * @param string $input Table value + * @return string + */ + protected function replace_view_options( $input ) { + return preg_replace( '/CREATE(.+?)VIEW/i', 'CREATE VIEW', $input ); + } + + /** + * Replace table prefixes + * + * @param string $input Table value + * @param mixed $position Replace first occurrence at a specified position + * @return string + */ + protected function replace_table_prefixes( $input, $position = false ) { + $search = $this->get_old_table_prefixes(); + $replace = $this->get_new_table_prefixes(); + + // Replace first occurrence at a specified position + if ( $position !== false ) { + for ( $i = 0; $i < count( $search ); $i++ ) { + $current = stripos( $input, $search[ $i ], $position ); + if ( $current === $position ) { + $input = substr_replace( $input, $replace[ $i ], $current, strlen( $search[ $i ] ) ); + } + } + + return $input; + } + + return str_ireplace( $search, $replace, $input ); + } + + /** + * Replace column prefixes + * + * @param string $input Column value + * @param mixed $position Replace first occurrence at a specified position + * @return string + */ + protected function replace_column_prefixes( $input, $position = false ) { + $search = $this->get_old_column_prefixes(); + $replace = $this->get_new_column_prefixes(); + $reserved = $this->get_reserved_column_prefixes(); + + // Replace first occurrence at a specified position + if ( $position !== false ) { + for ( $i = 0; $i < count( $reserved ); $i++ ) { + $current = stripos( $input, $reserved[ $i ], $position ); + if ( $current === $position ) { + return $input; + } + } + + for ( $i = 0; $i < count( $search ); $i++ ) { + $current = stripos( $input, $search[ $i ], $position ); + if ( $current === $position ) { + $input = substr_replace( $input, $replace[ $i ], $current, strlen( $search[ $i ] ) ); + } + } + + return $input; + } + + return str_ireplace( $search, $replace, $input ); + } + + /** + * Replace table values + * + * @param string $input Table value + * @return string + */ + protected function replace_table_values( $input ) { + // Replace base64 encoded values (Visual Composer) + if ( $this->get_visual_composer() ) { + $input = preg_replace_callback( '/\[vc_raw_html\]([a-zA-Z0-9\/+]+={0,2})\[\/vc_raw_html\]/S', array( $this, 'replace_visual_composer_values_callback' ), $input ); + } + + // Replace base64 encoded values (Oxygen Builder) + if ( $this->get_oxygen_builder() ) { + $input = preg_replace_callback( '/\\\\"(code-php|code-css|code-js)\\\\":\\\\"([a-zA-Z0-9\/+]+={0,2})\\\\"/S', array( $this, 'replace_oxygen_builder_values_callback' ), $input ); + } + + // Replace base64 encoded values (BeTheme Responsive, Optimize Press and Avada Fusion Builder) + if ( $this->get_betheme_responsive() || $this->get_optimize_press() || $this->get_avada_fusion_builder() ) { + $input = preg_replace_callback( "/'([a-zA-Z0-9\/+]+={0,2})'/S", array( $this, 'replace_base64_values_callback' ), $input ); + } + + // Replace serialized values + foreach ( $this->get_old_replace_values() as $old_value ) { + if ( strpos( $input, $this->escape( $old_value ) ) !== false ) { + $input = preg_replace_callback( "/'(.*?)(?get_old_replace_values(), $this->get_new_replace_values(), $matches[1] ); + + // Encode base64 characters + $matches[1] = Ai1wm_Database_Utility::base64_encode( $matches[1] ); + } + + return '[vc_raw_html]' . $matches[1] . '[/vc_raw_html]'; + } + + /** + * Replace base64 values callback (Oxygen Builder) + * + * @param array $matches List of matches + * @return string + */ + protected function replace_oxygen_builder_values_callback( $matches ) { + // Validate base64 data + if ( Ai1wm_Database_Utility::base64_validate( $matches[2] ) ) { + + // Decode base64 characters + $matches[2] = Ai1wm_Database_Utility::base64_decode( $matches[2] ); + + // Replace values + $matches[2] = Ai1wm_Database_Utility::replace_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $matches[2] ); + + // Encode base64 characters + $matches[2] = Ai1wm_Database_Utility::base64_encode( $matches[2] ); + } + + return '\"' . $matches[1] . '\":\"' . $matches[2] . '\"'; + } + + /** + * Replace base64 values callback (BeTheme Responsive and Optimize Press) + * + * @param array $matches List of matches + * @return string + */ + protected function replace_base64_values_callback( $matches ) { + // Validate base64 data + if ( Ai1wm_Database_Utility::base64_validate( $matches[1] ) ) { + + // Decode base64 characters + $matches[1] = Ai1wm_Database_Utility::base64_decode( $matches[1] ); + + // Replace serialized values + $matches[1] = Ai1wm_Database_Utility::replace_serialized_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $matches[1] ); + + // Encode base64 characters + $matches[1] = Ai1wm_Database_Utility::base64_encode( $matches[1] ); + } + + return "'" . $matches[1] . "'"; + } + + /** + * Replace table values callback + * + * @param array $matches List of matches + * @return string + */ + protected function replace_table_values_callback( $matches ) { + // Unescape MySQL special characters + $matches[1] = Ai1wm_Database_Utility::unescape_mysql( $matches[1] ); + + // Replace serialized values + $matches[1] = Ai1wm_Database_Utility::replace_serialized_values( $this->get_old_replace_values(), $this->get_new_replace_values(), $matches[1] ); + + // Escape MySQL special characters + $matches[1] = Ai1wm_Database_Utility::escape_mysql( $matches[1] ); + + return "'" . $matches[1] . "'"; + } + + /** + * Replace table collations + * + * @param string $input SQL statement + * @return string + */ + protected function replace_table_collations( $input ) { + static $search = array(); + static $replace = array(); + + // Replace table collations + if ( empty( $search ) || empty( $replace ) ) { + if ( ! $this->wpdb->has_cap( 'utf8mb4_520' ) ) { + if ( ! $this->wpdb->has_cap( 'utf8mb4' ) ) { + $search = array( 'utf8mb4_0900_ai_ci', 'utf8mb4_unicode_520_ci', 'utf8mb4' ); + $replace = array( 'utf8_unicode_ci', 'utf8_unicode_ci', 'utf8' ); + } else { + $search = array( 'utf8mb4_0900_ai_ci', 'utf8mb4_unicode_520_ci' ); + $replace = array( 'utf8mb4_unicode_ci', 'utf8mb4_unicode_ci' ); + } + } else { + $search = array( 'utf8mb4_0900_ai_ci' ); + $replace = array( 'utf8mb4_unicode_520_ci' ); + } + } + + return str_replace( $search, $replace, $input ); + } + + /** + * Replace raw values + * + * @param string $input SQL statement + * @return string + */ + protected function replace_raw_values( $input ) { + return Ai1wm_Database_Utility::replace_values( $this->get_old_replace_raw_values(), $this->get_new_replace_raw_values(), $input ); + } + + /** + * Replace table comments + * + * @param string $input SQL statement + * @return string + */ + protected function replace_table_comments( $input ) { + return preg_replace( '/\/\*(.+?)\*\//s', '', $input ); + } + + /** + * Replace table constraints + * + * @param string $input SQL statement + * @return string + */ + protected function replace_table_constraints( $input ) { + $pattern = array( + '/\s+CONSTRAINT(.+)REFERENCES(.+),/i', + '/,\s+CONSTRAINT(.+)REFERENCES(.+)/i', + ); + + return preg_replace( $pattern, '', $input ); + } + + /** + * Check whether input is transient query + * + * @param string $input SQL statement + * @return boolean + */ + protected function is_transient_query( $input ) { + return strpos( $input, "'_transient_" ) !== false; + } + + /** + * Check whether input is site transient query + * + * @param string $input SQL statement + * @return boolean + */ + protected function is_site_transient_query( $input ) { + return strpos( $input, "'_site_transient_" ) !== false; + } + + /** + * Check whether input is WooCommerce session query + * + * @param string $input SQL statement + * @return boolean + */ + protected function is_wc_session_query( $input ) { + return strpos( $input, "'_wc_session_" ) !== false; + } + + /** + * Check whether input is START TRANSACTION query + * + * @param string $input SQL statement + * @return boolean + */ + protected function is_start_transaction_query( $input ) { + return strpos( $input, 'START TRANSACTION' ) === 0; + } + + /** + * Check whether input is COMMIT query + * + * @param string $input SQL statement + * @return boolean + */ + protected function is_commit_query( $input ) { + return strpos( $input, 'COMMIT' ) === 0; + } + + /** + * Check whether input is DROP TABLE query + * + * @param string $input SQL statement + * @return boolean + */ + protected function is_drop_table_query( $input ) { + return strpos( $input, 'DROP TABLE' ) === 0; + } + + /** + * Check whether input is CREATE TABLE query + * + * @param string $input SQL statement + * @return boolean + */ + protected function is_create_table_query( $input ) { + return strpos( $input, 'CREATE TABLE' ) === 0; + } + + /** + * Check whether input is INSERT INTO query + * + * @param string $input SQL statement + * @param string $table_name Table name (case insensitive) + * @return boolean + */ + protected function is_insert_into_query( $input, $table_name ) { + return stripos( $input, sprintf( 'INSERT INTO `%s`', $table_name ) ) === 0; + } + + /** + * Should ignore query on import? + * + * @param string $input SQL statement + * @return boolean + */ + public function should_ignore_query( $input ) { + $ignore = false; + + // Ignore query based on table query + switch ( true ) { + case $this->is_transient_query( $input ): + case $this->is_site_transient_query( $input ): + case $this->is_wc_session_query( $input ): + $ignore = true; + break; + + default: + foreach ( $this->get_empty_tables() as $table_name ) { + if ( $this->is_insert_into_query( $input, $table_name ) ) { + $ignore = true; + break; + } + } + } + + return $ignore; + } + + /** + * Check whether input is atomic query + * + * @param string $input SQL statement + * @return boolean + */ + protected function is_atomic_query( $input ) { + $atomic = false; + + // Skip timeout based on table query + switch ( true ) { + case $this->is_drop_table_query( $input ): + case $this->is_create_table_query( $input ): + case $this->is_start_transaction_query( $input ): + case $this->is_commit_query( $input ): + $atomic = true; + break; + + default: + // Skip timeout based on table query and table name + foreach ( $this->get_atomic_tables() as $table_name ) { + if ( $this->is_insert_into_query( $input, $table_name ) ) { + $atomic = true; + break; + } + } + } + + return $atomic; + } + + /** + * Replace table options + * + * @param string $input SQL statement + * @return string + */ + protected function replace_table_options( $input ) { + $search = array( + 'TYPE=InnoDB', + 'TYPE=MyISAM', + 'ENGINE=Aria', + 'TRANSACTIONAL=0', + 'TRANSACTIONAL=1', + 'PAGE_CHECKSUM=0', + 'PAGE_CHECKSUM=1', + 'TABLE_CHECKSUM=0', + 'TABLE_CHECKSUM=1', + 'ROW_FORMAT=PAGE', + 'ROW_FORMAT=FIXED', + 'ROW_FORMAT=DYNAMIC', + ); + $replace = array( + 'ENGINE=InnoDB', + 'ENGINE=MyISAM', + 'ENGINE=MyISAM', + '', + '', + '', + '', + '', + '', + '', + '', + '', + ); + + return str_ireplace( $search, $replace, $input ); + } + + /** + * Replace table engines + * + * @param string $input SQL statement + * @return string + */ + protected function replace_table_engines( $input ) { + $search = array( + 'ENGINE=MyISAM', + 'ENGINE=Aria', + ); + $replace = array( + 'ENGINE=InnoDB', + 'ENGINE=InnoDB', + ); + + return str_ireplace( $search, $replace, $input ); + } + + /** + * Replace table row format + * + * @param string $input SQL statement + * @return string + */ + protected function replace_table_row_format( $input ) { + $search = array( + 'ENGINE=InnoDB', + 'ENGINE=MyISAM', + ); + $replace = array( + 'ENGINE=InnoDB ROW_FORMAT=DYNAMIC', + 'ENGINE=MyISAM ROW_FORMAT=DYNAMIC', + ); + + return str_ireplace( $search, $replace, $input ); + } + /** + * Replace table full-text indexes (MySQL <= 5.5) + * + * @param string $input SQL statement + * @return string + */ + protected function replace_table_fulltext_indexes( $input ) { + $pattern = array( + '/\s+FULLTEXT KEY(.+),/i', + '/,\s+FULLTEXT KEY(.+)/i', + ); + + return preg_replace( $pattern, '', $input ); + } + + /** + * Returns header for dump file + * + * @return string + */ + protected function get_header() { + // Some info about software, source and time + $header = sprintf( + "-- All-in-One WP Migration SQL Dump\n" . + "-- https://servmask.com/\n" . + "--\n" . + "-- Host: %s\n" . + "-- Database: %s\n" . + "-- Class: %s\n" . + "--\n", + $this->wpdb->dbhost, + $this->wpdb->dbname, + get_class( $this ) + ); + + return $header; + } + + /** + * Prepare table values + * + * @param string $input Table value + * @param integer $column_type Column type + * @return string + */ + protected function prepare_table_values( $input, $column_type ) { + switch ( true ) { + case is_null( $input ): + return 'NULL'; + + case stripos( $column_type, 'tinyint' ) === 0: + case stripos( $column_type, 'smallint' ) === 0: + case stripos( $column_type, 'mediumint' ) === 0: + case stripos( $column_type, 'int' ) === 0: + case stripos( $column_type, 'bigint' ) === 0: + case stripos( $column_type, 'float' ) === 0: + case stripos( $column_type, 'double' ) === 0: + case stripos( $column_type, 'decimal' ) === 0: + case stripos( $column_type, 'bit' ) === 0: + return $input; + + case stripos( $column_type, 'binary' ) === 0: + case stripos( $column_type, 'varbinary' ) === 0: + case stripos( $column_type, 'tinyblob' ) === 0: + case stripos( $column_type, 'mediumblob' ) === 0: + case stripos( $column_type, 'longblob' ) === 0: + case stripos( $column_type, 'blob' ) === 0: + return '0x' . bin2hex( $input ); + + default: + return "'" . $this->escape( $input ) . "'"; + } + } + + /** + * Run MySQL query + * + * @param string $input SQL query + * @return resource + */ + abstract public function query( $input ); + + /** + * Escape string input for mysql query + * + * @param string $input String to escape + * @return string + */ + abstract public function escape( $input ); + + /** + * Return the error code for the most recent function call + * + * @return integer + */ + abstract public function errno(); + + /** + * Return a string description of the last error + * + * @return string + */ + abstract public function error(); + + /** + * Return server version + * + * @return string + */ + abstract public function version(); + + /** + * Return the result from MySQL query as associative array + * + * @param resource $result MySQL resource + * @return array + */ + abstract public function fetch_assoc( $result ); + + /** + * Return the result from MySQL query as row + * + * @param resource $result MySQL resource + * @return array + */ + abstract public function fetch_row( $result ); + + /** + * Return the number for rows from MySQL results + * + * @param resource $result MySQL resource + * @return integer + */ + abstract public function num_rows( $result ); + + /** + * Free MySQL result memory + * + * @param resource $result MySQL resource + * @return boolean + */ + abstract public function free_result( $result ); +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-directory.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-directory.php new file mode 100644 index 0000000..f8ad09d --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-directory.php @@ -0,0 +1,77 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Directory { + + /** + * Create directory (recursively) + * + * @param string $path Path to the directory + * @return boolean + */ + public static function create( $path ) { + if ( @is_dir( $path ) ) { + return true; + } + + return @mkdir( $path, 0777, true ); + } + + /** + * Delete directory (recursively) + * + * @param string $path Path to the directory + * @return boolean + */ + public static function delete( $path ) { + if ( @is_dir( $path ) ) { + try { + // Iterate over directory + $iterator = new Ai1wm_Recursive_Directory_Iterator( $path ); + + // Recursively iterate over directory + $iterator = new Ai1wm_Recursive_Iterator_Iterator( $iterator, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD ); + + // Remove files and directories + foreach ( $iterator as $item ) { + if ( $item->isDir() ) { + @rmdir( $item->getPathname() ); + } else { + @unlink( $item->getPathname() ); + } + } + } catch ( Exception $e ) { + } + + return @rmdir( $path ); + } + + return false; + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-htaccess.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-htaccess.php new file mode 100644 index 0000000..e4e04ce --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-htaccess.php @@ -0,0 +1,75 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_File_Htaccess { + + /** + * Create .htaccess file (ServMask) + * + * @param string $path Path to file + * @return boolean + */ + public static function create( $path ) { + return Ai1wm_File::create( + $path, + implode( + PHP_EOL, + array( + '', + 'AddType application/octet-stream .wpress', + '', + '', + 'DirectoryIndex index.php', + '', + '', + 'Options -Indexes', + '', + ) + ) + ); + } + + /** + * Create .htaccess file (LiteSpeed) + * + * @param string $path Path to file + * @return boolean + */ + public static function litespeed( $path ) { + return Ai1wm_File::create_with_markers( + $path, + 'LiteSpeed', + array( + '', + 'SetEnv noabort 1', + '', + ) + ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-index.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-index.php new file mode 100644 index 0000000..228716a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-index.php @@ -0,0 +1,41 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_File_Index { + + /** + * Create index file + * + * @param string $path Path to file + * @return boolean + */ + public static function create( $path ) { + return Ai1wm_File::create( $path, 'Kangaroos cannot jump here' ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-robots.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-robots.php new file mode 100644 index 0000000..5d25f6c --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-robots.php @@ -0,0 +1,51 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_File_Robots { + + /** + * Create robots.txt file + * + * @param string $path Path to file + * @return boolean + */ + public static function create( $path ) { + return Ai1wm_File::create( + $path, + implode( + PHP_EOL, + array( + 'User-agent: *', + 'Disallow: /ai1wm-backups/', + 'Disallow: /wp-content/ai1wm-backups/', + ) + ) + ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-webconfig.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-webconfig.php new file mode 100644 index 0000000..45f5f83 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file-webconfig.php @@ -0,0 +1,61 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_File_Webconfig { + + /** + * Create web.config file + * + * @param string $path Path to file + * @return boolean + */ + public static function create( $path ) { + return Ai1wm_File::create( + $path, + implode( + PHP_EOL, + array( + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + ) + ) + ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file.php new file mode 100644 index 0000000..841d1ae --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filesystem/class-ai1wm-file.php @@ -0,0 +1,96 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_File { + + /** + * Create a file with content + * + * @param string $path Path to the file + * @param string $content Content of the file + * @return boolean + */ + public static function create( $path, $content ) { + if ( ! @file_exists( $path ) ) { + if ( ! @is_writable( dirname( $path ) ) ) { + return false; + } + + if ( ! @touch( $path ) ) { + return false; + } + } elseif ( ! @is_writable( $path ) ) { + return false; + } + + // No changes were added + if ( function_exists( 'md5_file' ) ) { + if ( @md5_file( $path ) === md5( $content ) ) { + return true; + } + } + + $is_written = false; + if ( ( $handle = @fopen( $path, 'w' ) ) !== false ) { + if ( @fwrite( $handle, $content ) !== false ) { + $is_written = true; + } + + @fclose( $handle ); + } + + return $is_written; + } + + /** + * Create a file with marker and content + * + * @param string $path Path to the file + * @param string $marker Name of the marker + * @param string $content Content of the file + * @return boolean + */ + public static function create_with_markers( $path, $marker, $content ) { + return @insert_with_markers( $path, $marker, $content ); + } + + /** + * Delete a file by path + * + * @param string $path Path to the file + * @return boolean + */ + public static function delete( $path ) { + if ( ! @file_exists( $path ) ) { + return false; + } + + return @unlink( $path ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filter/class-ai1wm-recursive-exclude-filter.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filter/class-ai1wm-recursive-exclude-filter.php new file mode 100644 index 0000000..1736adf --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filter/class-ai1wm-recursive-exclude-filter.php @@ -0,0 +1,72 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Recursive_Exclude_Filter extends RecursiveFilterIterator { + + protected $exclude = array(); + + public function __construct( RecursiveIterator $iterator, $exclude = array() ) { + parent::__construct( $iterator ); + if ( is_array( $exclude ) ) { + foreach ( $exclude as $path ) { + $this->exclude[] = ai1wm_replace_forward_slash_with_directory_separator( $path ); + } + } + } + + #[\ReturnTypeWillChange] + public function accept() { + if ( in_array( ai1wm_replace_forward_slash_with_directory_separator( $this->getInnerIterator()->getSubPathname() ), $this->exclude ) ) { + return false; + } + + if ( in_array( ai1wm_replace_forward_slash_with_directory_separator( $this->getInnerIterator()->getPathname() ), $this->exclude ) ) { + return false; + } + + if ( in_array( ai1wm_replace_forward_slash_with_directory_separator( $this->getInnerIterator()->getPath() ), $this->exclude ) ) { + return false; + } + + if ( strpos( $this->getInnerIterator()->getSubPathname(), "\n" ) !== false ) { + return false; + } + + if ( strpos( $this->getInnerIterator()->getSubPathname(), "\r" ) !== false ) { + return false; + } + + return true; + } + + #[\ReturnTypeWillChange] + public function getChildren() { + return new self( $this->getInnerIterator()->getChildren(), $this->exclude ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filter/class-ai1wm-recursive-extension-filter.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filter/class-ai1wm-recursive-extension-filter.php new file mode 100644 index 0000000..588316b --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/filter/class-ai1wm-recursive-extension-filter.php @@ -0,0 +1,56 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Recursive_Extension_Filter extends RecursiveFilterIterator { + + protected $include = array(); + + public function __construct( RecursiveIterator $iterator, $include = array() ) { + parent::__construct( $iterator ); + if ( is_array( $include ) ) { + $this->include = $include; + } + } + + #[\ReturnTypeWillChange] + public function accept() { + if ( $this->getInnerIterator()->isFile() ) { + if ( ! in_array( pathinfo( $this->getInnerIterator()->getFilename(), PATHINFO_EXTENSION ), $this->include ) ) { + return false; + } + } + + return true; + } + + #[\ReturnTypeWillChange] + public function getChildren() { + return new self( $this->getInnerIterator()->getChildren(), $this->include ); + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php new file mode 100644 index 0000000..20b088b --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php @@ -0,0 +1,73 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Recursive_Directory_Iterator extends RecursiveDirectoryIterator { + + public function __construct( $path ) { + parent::__construct( $path ); + + // Skip current and parent directory + $this->skipdots(); + } + + #[\ReturnTypeWillChange] + public function rewind() { + parent::rewind(); + + // Skip current and parent directory + $this->skipdots(); + } + + #[\ReturnTypeWillChange] + public function next() { + parent::next(); + + // Skip current and parent directory + $this->skipdots(); + } + + /** + * Returns whether current entry is a directory and not '.' or '..' + * + * Explicitly set allow links flag, because RecursiveDirectoryIterator::FOLLOW_SYMLINKS + * is not supported by <= PHP 5.3.0 + * + * @return bool + */ + #[\ReturnTypeWillChange] + public function hasChildren( $allow_links = true ) { + return parent::hasChildren( $allow_links ); + } + + protected function skipdots() { + while ( $this->isDot() ) { + parent::next(); + } + } +} diff --git a/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/iterator/class-ai1wm-recursive-iterator-iterator.php b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/iterator/class-ai1wm-recursive-iterator-iterator.php new file mode 100644 index 0000000..d7885fb --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/vendor/servmask/iterator/class-ai1wm-recursive-iterator-iterator.php @@ -0,0 +1,32 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +class Ai1wm_Recursive_Iterator_Iterator extends RecursiveIteratorIterator { + +} diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/backups.min.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/backups.min.css new file mode 100644 index 0000000..d0f9a84 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/backups.min.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes ai1wm-spin-left{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes ai1wm-spin-left{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes ai1wm-spin-right{0%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes ai1wm-spin-right{0%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"‎"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited{float:left;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:right}.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-positive-four{position:relative;top:4px}.ai1wm-holder h1 i,.ai1wm-top-positive-two{position:relative;top:2px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai1wm-mt-20{margin-top:20px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:"servmask";speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-right2:before{content:"\e901"}.ai1wm-icon-chevron-left2:before{content:"\e902"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}.ai1wm-icon-dots-horizontal-triple:before{content:"\e903"}.ai1wm-icon-bullhorn:before{content:"\e91a"}.ai1wm-icon-eye:before{content:"\e9ce"}.ai1wm-icon-eye-blocked:before{content:"\e9d1"}.ai1wm-icon-power-cord:before{content:"\e9b7"}.ai1wm-icon-image:before{content:"\e90d"}.ai1wm-icon-file-video:before{content:"\e92a"}.ai1wm-icon-stack:before{content:"\e92e"}.ai1wm-icon-table:before{content:"\e906"}.ai1wm-icon-calendar:before{content:"\e953"}.ai1wm-icon-play:before{content:"\ea1c"}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:left;font-weight:300;font-size:22px;text-transform:uppercase}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-right,.ai1wm-row{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container.ai1wm-modal-container-v2{display:block;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-height:400px;overflow-y:auto;text-align:left;padding:0;border:0;border-radius:0}.ai1wm-modal-container.ai1wm-modal-container-v2.ai1wm-modal-loading{width:auto;overflow:hidden;border-radius:1em}.ai1wm-modal-container.ai1wm-modal-container-v2 h1{text-transform:none}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:left}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:left;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-right:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}.ai1wm-progress-bar-v2{background-color:#63637e;display:block;height:60px;padding:3em}.ai1wm-progress-bar-v2 h1{text-transform:none;color:#fff;margin:0 0 1.4em}.ai1wm-progress-bar-v2-container{position:relative;width:100%;overflow:visible}.ai1wm-progress-bar-v2 .ai1wm-progress-bar-v2-meter{position:absolute;left:0;top:0;height:5px;background-color:#3d3d4e;width:100%}.ai1wm-progress-bar-v2 .ai1wm-progress-bar-v2-meter .ai1wm-progress-bar-v2-percent{position:absolute;background-color:#fff;padding:0 .5em;border-radius:3px;font-size:10px;line-height:24px;-webkit-transform:translate(-1.1em,-3em);transform:translate(-1.1em,-3em)}.ai1wm-progress-bar-v2 .ai1wm-progress-bar-v2-meter .ai1wm-progress-bar-v2-percent::after{content:" ";position:absolute;top:100%;left:50%;margin-left:-3px;border-width:3px;border-style:solid;border-color:#fff transparent transparent}.ai1wm-progress-bar-v2 .ai1wm-progress-bar-v2-meter .ai1wm-progress-bar-v2-slider{display:inline-block;background-color:#fff;position:absolute;height:5px;max-width:100%}.ai1wm-spin-container{height:50px;width:50px;position:relative;display:block;padding:1.5em}.ai1wm-spinner{display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;width:50px;height:50px;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.ai1wm-spinner.ai1wm-spin-left{-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-name:ai1wm-spin-left;animation-name:ai1wm-spin-left}.ai1wm-spinner.ai1wm-spin-right{-webkit-animation-duration:4000ms;animation-duration:4000ms;-webkit-animation-name:ai1wm-spin-right;animation-name:ai1wm-spin-right}.ai1wm-folder-container,section.ai1wm-decrypt-backup-section form{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ai1wm-folder-container{display:-webkit-flex;display:-ms-flexbox;display:flex;padding:2em 3em}.ai1wm-folder-container ul li a,.ai1wm-folder-container>h1{color:#3c434a;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.ai1wm-folder-container>h1{font-weight:700;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.ai1wm-folder-container>h1 a{text-decoration:none;color:inherit;font-size:.5em}.ai1wm-folder-container ul li{margin:0}.ai1wm-folder-container ul li a{padding:5px;text-decoration:none;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;font-size:1rem}.ai1wm-folder-container ul li a>i{margin:0 5px}.ai1wm-folder-container ul li a>i.ai1wm-icon-arrow-down{margin-left:10px;display:none}.ai1wm-folder-container ul li a:hover{background-color:rgba(0,0,0,.1)}.ai1wm-folder-container ul li a:hover i.ai1wm-icon-arrow-down{display:block}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li>a>i,.ai1wm-folder-container ul li .ai1wm-archive-browser-filename{margin-right:10px}.ai1wm-folder-container ul li .ai1wm-archive-browser-filesize{color:#718096;font-size:.75rem;white-space:nowrap}section.ai1wm-decrypt-backup-section,section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}section.ai1wm-decrypt-backup-section{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;gap:16px;box-sizing:border-box;padding:16px}section.ai1wm-decrypt-backup-section h1{font-size:20px;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section p{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;padding:0;margin:0}section.ai1wm-decrypt-backup-section form{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;padding:0;gap:8px}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container input{width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-toggle-password-visibility{font-size:16px;text-decoration:none;color:#3c434a;position:absolute;right:10px;top:8px;outline:0;box-shadow:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-error-message{display:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error input{border-color:#e74c3c}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error .ai1wm-error-message{color:#e74c3c;display:block;font-weight:400;text-align:left;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container,section.ai1wm-decrypt-backup-section form{display:-webkit-flex;display:-ms-flexbox;display:flex;width:75%;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:16px;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}#ai1wm-backups-list{width:100%;margin-top:1.95rem;overflow-x:auto}div#ai1wm-backups-list::-webkit-scrollbar{-webkit-appearance:none;height:4px}div#ai1wm-backups-list::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(77,77,77,.5);-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}.ai1wm-backups{width:100%;margin:1em 0;padding:0;border-collapse:collapse}.ai1wm-backups .ai1wm-column-name{text-align:left;white-space:nowrap}.ai1wm-backups .ai1wm-column-date,.ai1wm-backups .ai1wm-column-size{text-align:center;white-space:nowrap}.ai1wm-backups .ai1wm-column-actions{text-align:right;white-space:nowrap}.ai1wm-backups thead th{padding:4px 6px;text-align:left;font-size:1.2em}.ai1wm-backups tbody tr{border-top:1px solid #ccc;border-bottom:1px solid #ccc}.ai1wm-backups tbody tr:hover{background:rgba(0,0,0,.1)}.ai1wm-backups tbody tr:hover .ai1wm-backup-label-description:not(.ai1wm-backup-label-selected){display:inline}.ai1wm-backups tbody td{padding:4px 6px;box-sizing:border-box;line-height:24px}.ai1wm-backups tbody td.ai1wm-backup-actions{text-align:right;width:50px}.ai1wm-backups tbody td.ai1wm-backup-actions a:focus{outline-style:none;box-shadow:none;border-color:transparent}.ai1wm-backups tbody td.ai1wm-backup-actions>div{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots{border-radius:100%;margin:0;padding:10px;color:gray;font-size:1.5em;text-decoration:none;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots:focus,.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots:hover{background-color:#f0f0f1}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu{position:absolute;background:0 0;display:none;-webkit-transform:translate(-35px,30px);transform:translate(-35px,30px);right:0}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul{position:relative;z-index:10;margin:0;background:#f9f9f9;border-radius:5px;box-shadow:rgba(0,0,0,.16) 0 3px 6px,rgba(0,0,0,.23) 0 3px 6px}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li{display:block;padding:0;margin:0}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li.divider{border-top:1px solid rgba(0,0,0,.1)}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li:first-child>a{border-top-left-radius:5px;border-top-right-radius:5px}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li:last-child>a{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li.ai1wm-disabled{opacity:.5}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li.ai1wm-disabled>a{cursor:not-allowed}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li>a{text-decoration:none;color:#23282d;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:.5em 2em}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li>a:focus,.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li>a:hover{background-color:rgba(0,0,0,.1)}.ai1wm-backups .spinner{visibility:visible;margin:0}.ai1wm-backups .ai1wm-backups-list-spinner{text-align:center;line-height:37px}.ai1wm-backups .ai1wm-backups-list-spinner .spinner{float:none;visibility:visible;margin:0 6px 0 0;position:relative;top:-2px}.ai1wm-backups .ai1wm-backup-label-text{cursor:pointer}.ai1wm-backups .ai1wm-backup-label-text .ai1wm-backup-label-colored{display:inline-block;padding:.25em .4em;font-size:85%;font-weight:400;line-height:1;text-align:center;vertical-align:baseline;border-radius:.25rem;color:#000;background-color:#fad390;cursor:pointer;word-wrap:break-word;word-break:break-all;white-space:normal}.ai1wm-backups .ai1wm-backup-label-description:hover .ai1wm-icon-edit-pencil,.ai1wm-backups .ai1wm-backup-label-text:hover .ai1wm-icon-edit-pencil{display:inline}.ai1wm-backups .ai1wm-backup-label-description{font-size:12px;cursor:pointer;font-style:italic}.ai1wm-backups .ai1wm-backup-label-holder .spinner{float:none}.ai1wm-backups .ai1wm-backup-label-holder .ai1wm-backup-label-field{border-radius:5px;border:1px solid #ccc}.ai1wm-backups-empty,.ai1wm-backups-empty-spinner-holder{line-height:2em}.ai1wm-backups-empty-spinner-holder .spinner{float:none;visibility:visible;margin:0 6px 0 0;position:relative;top:-2px} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/backups.min.rtl.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/backups.min.rtl.css new file mode 100644 index 0000000..5605e57 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/backups.min.rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes ai1wm-spin-left{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}@keyframes ai1wm-spin-left{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}@-webkit-keyframes ai1wm-spin-right{0%{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes ai1wm-spin-right{0%{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"‎"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:left}.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-positive-four{position:relative;top:4px}.ai1wm-holder h1 i,.ai1wm-top-positive-two{position:relative;top:2px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 8px 6px 0}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:right;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai1wm-mt-20{margin-top:20px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:"servmask";speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-right2:before{content:"\e901"}.ai1wm-icon-chevron-left2:before{content:"\e902"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}.ai1wm-icon-dots-horizontal-triple:before{content:"\e903"}.ai1wm-icon-bullhorn:before{content:"\e91a"}.ai1wm-icon-eye:before{content:"\e9ce"}.ai1wm-icon-eye-blocked:before{content:"\e9d1"}.ai1wm-icon-power-cord:before{content:"\e9b7"}.ai1wm-icon-image:before{content:"\e90d"}.ai1wm-icon-file-video:before{content:"\e92a"}.ai1wm-icon-stack:before{content:"\e92e"}.ai1wm-icon-table:before{content:"\e906"}.ai1wm-icon-calendar:before{content:"\e953"}.ai1wm-icon-play:before{content:"\ea1c"}@media (min-width:855px){.ai1wm-row{margin-left:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:right;width:100%}.ai1wm-right{float:left;width:377px;margin-left:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:right;font-weight:300;font-size:22px;text-transform:uppercase}@media (max-width:854px){.ai1wm-container{margin-right:10px!important}.ai1wm-right,.ai1wm-row{margin-left:0!important}.ai1wm-right{float:right!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 2px 0 20px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-right:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container.ai1wm-modal-container-v2{display:block;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);max-height:400px;overflow-y:auto;text-align:right;padding:0;border:0;border-radius:0}.ai1wm-modal-container.ai1wm-modal-container-v2.ai1wm-modal-loading{width:auto;overflow:hidden;border-radius:1em}.ai1wm-modal-container.ai1wm-modal-container-v2 h1{text-transform:none}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:right}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:right}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:right}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:right;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-left:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}.ai1wm-progress-bar-v2{background-color:#63637e;display:block;height:60px;padding:3em}.ai1wm-progress-bar-v2 h1{text-transform:none;color:#fff;margin:0 0 1.4em}.ai1wm-progress-bar-v2-container{position:relative;width:100%;overflow:visible}.ai1wm-progress-bar-v2 .ai1wm-progress-bar-v2-meter{position:absolute;right:0;top:0;height:5px;background-color:#3d3d4e;width:100%}.ai1wm-progress-bar-v2 .ai1wm-progress-bar-v2-meter .ai1wm-progress-bar-v2-percent{position:absolute;background-color:#fff;padding:0 .5em;border-radius:3px;font-size:10px;line-height:24px;-webkit-transform:translate(1.1em,-3em);transform:translate(1.1em,-3em)}.ai1wm-progress-bar-v2 .ai1wm-progress-bar-v2-meter .ai1wm-progress-bar-v2-percent::after{content:" ";position:absolute;top:100%;right:50%;margin-right:-3px;border-width:3px;border-style:solid;border-color:#fff transparent transparent}.ai1wm-progress-bar-v2 .ai1wm-progress-bar-v2-meter .ai1wm-progress-bar-v2-slider{display:inline-block;background-color:#fff;position:absolute;height:5px;max-width:100%}.ai1wm-spin-container{height:50px;width:50px;position:relative;display:block;padding:1.5em}.ai1wm-spinner{display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;width:50px;height:50px;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.ai1wm-spinner.ai1wm-spin-left{-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-name:ai1wm-spin-left;animation-name:ai1wm-spin-left}.ai1wm-spinner.ai1wm-spin-right{-webkit-animation-duration:4000ms;animation-duration:4000ms;-webkit-animation-name:ai1wm-spin-right;animation-name:ai1wm-spin-right}.ai1wm-folder-container,section.ai1wm-decrypt-backup-section form{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ai1wm-folder-container{display:-webkit-flex;display:-ms-flexbox;display:flex;padding:2em 3em}.ai1wm-folder-container ul li a,.ai1wm-folder-container>h1{color:#3c434a;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.ai1wm-folder-container>h1{font-weight:700;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.ai1wm-folder-container>h1 a{text-decoration:none;color:inherit;font-size:.5em}.ai1wm-folder-container ul li{margin:0}.ai1wm-folder-container ul li a{padding:5px;text-decoration:none;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;font-size:1rem}.ai1wm-folder-container ul li a>i{margin:0 5px}.ai1wm-folder-container ul li a>i.ai1wm-icon-arrow-down{margin-right:10px;display:none}.ai1wm-folder-container ul li a:hover{background-color:rgba(0,0,0,.1)}.ai1wm-folder-container ul li a:hover i.ai1wm-icon-arrow-down{display:block}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li>a>i,.ai1wm-folder-container ul li .ai1wm-archive-browser-filename{margin-left:10px}.ai1wm-folder-container ul li .ai1wm-archive-browser-filesize{color:#718096;font-size:.75rem;white-space:nowrap}section.ai1wm-decrypt-backup-section,section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}section.ai1wm-decrypt-backup-section{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;gap:16px;box-sizing:border-box;padding:16px}section.ai1wm-decrypt-backup-section h1{font-size:20px;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section p{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;padding:0;margin:0}section.ai1wm-decrypt-backup-section form{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;padding:0;gap:8px}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container input{width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-toggle-password-visibility{font-size:16px;text-decoration:none;color:#3c434a;position:absolute;left:10px;top:8px;outline:0;box-shadow:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-error-message{display:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error input{border-color:#e74c3c}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error .ai1wm-error-message{color:#e74c3c;display:block;font-weight:400;text-align:right;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container,section.ai1wm-decrypt-backup-section form{display:-webkit-flex;display:-ms-flexbox;display:flex;width:75%;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:16px;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}#ai1wm-backups-list{width:100%;margin-top:1.95rem;overflow-x:auto}div#ai1wm-backups-list::-webkit-scrollbar{-webkit-appearance:none;height:4px}div#ai1wm-backups-list::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(77,77,77,.5);-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}.ai1wm-backups{width:100%;margin:1em 0;padding:0;border-collapse:collapse}.ai1wm-backups .ai1wm-column-name{text-align:right;white-space:nowrap}.ai1wm-backups .ai1wm-column-date,.ai1wm-backups .ai1wm-column-size{text-align:center;white-space:nowrap}.ai1wm-backups .ai1wm-column-actions{text-align:left;white-space:nowrap}.ai1wm-backups thead th{padding:4px 6px;text-align:right;font-size:1.2em}.ai1wm-backups tbody tr{border-top:1px solid #ccc;border-bottom:1px solid #ccc}.ai1wm-backups tbody tr:hover{background:rgba(0,0,0,.1)}.ai1wm-backups tbody tr:hover .ai1wm-backup-label-description:not(.ai1wm-backup-label-selected){display:inline}.ai1wm-backups tbody td{padding:4px 6px;box-sizing:border-box;line-height:24px}.ai1wm-backups tbody td.ai1wm-backup-actions{text-align:left;width:50px}.ai1wm-backups tbody td.ai1wm-backup-actions a:focus{outline-style:none;box-shadow:none;border-color:transparent}.ai1wm-backups tbody td.ai1wm-backup-actions>div{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots{border-radius:100%;margin:0;padding:10px;color:gray;font-size:1.5em;text-decoration:none;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots:focus,.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots:hover{background-color:#f0f0f1}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu{position:absolute;background:100% 0;display:none;-webkit-transform:translate(35px,30px);transform:translate(35px,30px);left:0}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul{position:relative;z-index:10;margin:0;background:#f9f9f9;border-radius:5px;box-shadow:rgba(0,0,0,.16) 0 3px 6px,rgba(0,0,0,.23) 0 3px 6px}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li{display:block;padding:0;margin:0}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li.divider{border-top:1px solid rgba(0,0,0,.1)}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li:first-child>a{border-top-right-radius:5px;border-top-left-radius:5px}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li:last-child>a{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li.ai1wm-disabled{opacity:.5}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li.ai1wm-disabled>a{cursor:not-allowed}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li>a{text-decoration:none;color:#23282d;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:.5em 2em}.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li>a:focus,.ai1wm-backups tbody td.ai1wm-backup-actions>div .ai1wm-backup-dots-menu>ul>li>a:hover{background-color:rgba(0,0,0,.1)}.ai1wm-backups .spinner{visibility:visible;margin:0}.ai1wm-backups .ai1wm-backups-list-spinner{text-align:center;line-height:37px}.ai1wm-backups .ai1wm-backups-list-spinner .spinner{float:none;visibility:visible;margin:0 0 0 6px;position:relative;top:-2px}.ai1wm-backups .ai1wm-backup-label-text{cursor:pointer}.ai1wm-backups .ai1wm-backup-label-text .ai1wm-backup-label-colored{display:inline-block;padding:.25em .4em;font-size:85%;font-weight:400;line-height:1;text-align:center;vertical-align:baseline;border-radius:.25rem;color:#000;background-color:#fad390;cursor:pointer;word-wrap:break-word;word-break:break-all;white-space:normal}.ai1wm-backups .ai1wm-backup-label-description:hover .ai1wm-icon-edit-pencil,.ai1wm-backups .ai1wm-backup-label-text:hover .ai1wm-icon-edit-pencil{display:inline}.ai1wm-backups .ai1wm-backup-label-description{font-size:12px;cursor:pointer;font-style:italic}.ai1wm-backups .ai1wm-backup-label-holder .spinner{float:none}.ai1wm-backups .ai1wm-backup-label-holder .ai1wm-backup-label-field{border-radius:5px;border:1px solid #ccc}.ai1wm-backups-empty,.ai1wm-backups-empty-spinner-holder{line-height:2em}.ai1wm-backups-empty-spinner-holder .spinner{float:none;visibility:visible;margin:0 0 0 6px;position:relative;top:-2px} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/encrypt.min.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/encrypt.min.css new file mode 100644 index 0000000..36d0ed1 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/encrypt.min.css @@ -0,0 +1 @@ +@charset "UTF-8";section.ai1wm-decrypt-backup-section,section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}section.ai1wm-decrypt-backup-section{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;gap:16px;box-sizing:border-box;padding:16px}section.ai1wm-decrypt-backup-section h1{font-size:20px;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section p{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;padding:0;margin:0}section.ai1wm-decrypt-backup-section form{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;padding:0;gap:8px}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container input{width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-toggle-password-visibility{font-size:16px;text-decoration:none;color:#3c434a;position:absolute;right:10px;top:8px;outline:0;box-shadow:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-error-message{display:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error input{border-color:#e74c3c}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error .ai1wm-error-message{color:#e74c3c;display:block;font-weight:400;text-align:left;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container,section.ai1wm-decrypt-backup-section form{display:-webkit-flex;display:-ms-flexbox;display:flex;width:75%;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:16px;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/encrypt.min.rtl.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/encrypt.min.rtl.css new file mode 100644 index 0000000..9c15327 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/encrypt.min.rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";section.ai1wm-decrypt-backup-section,section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}section.ai1wm-decrypt-backup-section{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;gap:16px;box-sizing:border-box;padding:16px}section.ai1wm-decrypt-backup-section h1{font-size:20px;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section p{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;padding:0;margin:0}section.ai1wm-decrypt-backup-section form{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;padding:0;gap:8px}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container input{width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-toggle-password-visibility{font-size:16px;text-decoration:none;color:#3c434a;position:absolute;left:10px;top:8px;outline:0;box-shadow:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-error-message{display:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error input{border-color:#e74c3c}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error .ai1wm-error-message{color:#e74c3c;display:block;font-weight:400;text-align:right;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container,section.ai1wm-decrypt-backup-section form{display:-webkit-flex;display:-ms-flexbox;display:flex;width:75%;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:16px;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/export.min.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/export.min.css new file mode 100644 index 0000000..2a69323 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/export.min.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-accordion{margin:1em 0;display:block}.ai1wm-accordion h4{cursor:pointer;color:rgba(0,116,162,.8);margin:0}.ai1wm-accordion h4 small{color:#444;font-weight:400}.ai1wm-accordion h4 small:after,.ai1wm-container .ai1wm-row label:after{content:"‎"}.ai1wm-accordion .ai1wm-icon-arrow-right{transition:transform .1s ease-out;transition:transform .1s ease-out,-webkit-transform .1s ease-out;display:inline-block}.ai1wm-accordion ul{margin:0;padding:0;list-style:none;visibility:hidden;height:0;transition:height .2s cubic-bezier(.19,1,.22,1)}.ai1wm-accordion h4 small,.ai1wm-accordion ul li small{display:inline;float:none;width:auto}.ai1wm-accordion.ai1wm-open h4 .ai1wm-icon-arrow-right{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ai1wm-accordion.ai1wm-open ul{height:auto;margin:.6em 0 0 2em;visibility:visible}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited{float:left;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:right}.ai1wm-encrypt-backups-container-disabled a,.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-positive-four{position:relative;top:4px}.ai1wm-holder h1 i,.ai1wm-top-positive-two{position:relative;top:2px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai1wm-mt-20{margin-top:20px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:"servmask";speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-right2:before{content:"\e901"}.ai1wm-icon-chevron-left2:before{content:"\e902"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}.ai1wm-icon-dots-horizontal-triple:before{content:"\e903"}.ai1wm-icon-bullhorn:before{content:"\e91a"}.ai1wm-icon-eye:before{content:"\e9ce"}.ai1wm-icon-eye-blocked:before{content:"\e9d1"}.ai1wm-icon-power-cord:before{content:"\e9b7"}.ai1wm-icon-image:before{content:"\e90d"}.ai1wm-icon-file-video:before{content:"\e92a"}.ai1wm-icon-stack:before{content:"\e92e"}.ai1wm-icon-table:before{content:"\e906"}.ai1wm-icon-calendar:before{content:"\e953"}.ai1wm-icon-play:before{content:"\ea1c"}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:left;font-weight:300;font-size:22px;text-transform:uppercase}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-right,.ai1wm-row{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea,.ai1wm-query div input{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container.ai1wm-modal-container-v2{display:block;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-height:400px;overflow-y:auto;text-align:left;padding:0;border:0;border-radius:0}.ai1wm-modal-container.ai1wm-modal-container-v2.ai1wm-modal-loading{width:auto;overflow:hidden;border-radius:1em}.ai1wm-modal-container.ai1wm-modal-container-v2 h1{text-transform:none}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:left}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:left;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-right:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}#ai1wm-export-form{margin-top:1.95rem}.ai1wm-query-arrow{position:relative;top:4px;float:right}.ai1wm-query.ai1wm-open{background:#ebebeb!important}.ai1wm-query.ai1wm-open p small{border-bottom:1px dashed #000}.ai1wm-query.ai1wm-open div{visibility:visible!important;height:5rem!important;margin-top:8px}.ai1wm-query.ai1wm-open .ai1wm-query-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ai1wm-query{width:100%;margin:0 0 10px;list-style:none;background:0 0;border:1px solid #d8d8d8;padding:10px;border-radius:5px;box-sizing:border-box}.ai1wm-query div{transition:height .2s cubic-bezier(.19,1,.22,1);visibility:hidden;height:0}.ai1wm-query div input{font-size:.8rem;padding:0 10px;height:2.3rem;line-height:2.3rem;margin-bottom:4px;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;transition:.05s border-color ease-in-out;border-radius:5px}.ai1wm-query div input:focus{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.ai1wm-query p{margin:0;cursor:pointer}.ai1wm-query p small{display:inline;width:auto;float:none}.ai1wm-query-arrow{transition:transform .1s ease-out;transition:transform .1s ease-out,-webkit-transform .1s ease-out}#ai1wm-queries{padding:0}.ai1wm-encrypt-backups-container-disabled{color:#aaa}.ai1wm-encrypt-backups-container-disabled a span{margin-left:8px;color:#00aff0}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle,.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container .ai1wm-error-message{display:none}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;gap:12px;width:100%;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:8px 0}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;width:216px}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container input{padding:8px 12px;line-height:normal;width:100%;height:32px}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container .ai1wm-toggle-password-visibility{font-size:16px;text-decoration:none;color:#3c434a;position:absolute;right:10px;top:8px;outline:0;box-shadow:none}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container.ai1wm-has-error input{border-color:#e74c3c}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container.ai1wm-has-error .ai1wm-error-message{color:#e74c3c;display:block;font-weight:400} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/export.min.rtl.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/export.min.rtl.css new file mode 100644 index 0000000..d713ea8 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/export.min.rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-accordion{margin:1em 0;display:block}.ai1wm-accordion h4{cursor:pointer;color:rgba(0,116,162,.8);margin:0}.ai1wm-accordion h4 small{color:#444;font-weight:400}.ai1wm-accordion h4 small:after,.ai1wm-container .ai1wm-row label:after{content:"‎"}.ai1wm-accordion .ai1wm-icon-arrow-right{transition:transform .1s ease-out;transition:transform .1s ease-out,-webkit-transform .1s ease-out;display:inline-block}.ai1wm-accordion ul{margin:0;padding:0;list-style:none;visibility:hidden;height:0;transition:height .2s cubic-bezier(.19,1,.22,1)}.ai1wm-accordion h4 small,.ai1wm-accordion ul li small{display:inline;float:none;width:auto}.ai1wm-accordion.ai1wm-open h4 .ai1wm-icon-arrow-right{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.ai1wm-accordion.ai1wm-open ul{height:auto;margin:.6em 2em 0 0;visibility:visible}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:left}.ai1wm-encrypt-backups-container-disabled a,.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-positive-four{position:relative;top:4px}.ai1wm-holder h1 i,.ai1wm-top-positive-two{position:relative;top:2px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 8px 6px 0}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:right;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai1wm-mt-20{margin-top:20px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:"servmask";speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-right2:before{content:"\e901"}.ai1wm-icon-chevron-left2:before{content:"\e902"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}.ai1wm-icon-dots-horizontal-triple:before{content:"\e903"}.ai1wm-icon-bullhorn:before{content:"\e91a"}.ai1wm-icon-eye:before{content:"\e9ce"}.ai1wm-icon-eye-blocked:before{content:"\e9d1"}.ai1wm-icon-power-cord:before{content:"\e9b7"}.ai1wm-icon-image:before{content:"\e90d"}.ai1wm-icon-file-video:before{content:"\e92a"}.ai1wm-icon-stack:before{content:"\e92e"}.ai1wm-icon-table:before{content:"\e906"}.ai1wm-icon-calendar:before{content:"\e953"}.ai1wm-icon-play:before{content:"\ea1c"}@media (min-width:855px){.ai1wm-row{margin-left:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:right;width:100%}.ai1wm-right{float:left;width:377px;margin-left:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:right;font-weight:300;font-size:22px;text-transform:uppercase}@media (max-width:854px){.ai1wm-container{margin-right:10px!important}.ai1wm-right,.ai1wm-row{margin-left:0!important}.ai1wm-right{float:right!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 2px 0 20px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea,.ai1wm-query div input{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-right:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container.ai1wm-modal-container-v2{display:block;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);max-height:400px;overflow-y:auto;text-align:right;padding:0;border:0;border-radius:0}.ai1wm-modal-container.ai1wm-modal-container-v2.ai1wm-modal-loading{width:auto;overflow:hidden;border-radius:1em}.ai1wm-modal-container.ai1wm-modal-container-v2 h1{text-transform:none}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:right}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:right}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:right}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:right;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-left:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}#ai1wm-export-form{margin-top:1.95rem}.ai1wm-query-arrow{position:relative;top:4px;float:left}.ai1wm-query.ai1wm-open{background:#ebebeb!important}.ai1wm-query.ai1wm-open p small{border-bottom:1px dashed #000}.ai1wm-query.ai1wm-open div{visibility:visible!important;height:5rem!important;margin-top:8px}.ai1wm-query.ai1wm-open .ai1wm-query-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.ai1wm-query{width:100%;margin:0 0 10px;list-style:none;background:100% 0;border:1px solid #d8d8d8;padding:10px;border-radius:5px;box-sizing:border-box}.ai1wm-query div{transition:height .2s cubic-bezier(.19,1,.22,1);visibility:hidden;height:0}.ai1wm-query div input{font-size:.8rem;padding:0 10px;height:2.3rem;line-height:2.3rem;margin-bottom:4px;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;transition:.05s border-color ease-in-out;border-radius:5px}.ai1wm-query div input:focus{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.ai1wm-query p{margin:0;cursor:pointer}.ai1wm-query p small{display:inline;width:auto;float:none}.ai1wm-query-arrow{transition:transform .1s ease-out;transition:transform .1s ease-out,-webkit-transform .1s ease-out}#ai1wm-queries{padding:0}.ai1wm-encrypt-backups-container-disabled{color:#aaa}.ai1wm-encrypt-backups-container-disabled a span{margin-right:8px;color:#00aff0}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle,.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container .ai1wm-error-message{display:none}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;gap:12px;width:100%;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:8px 0}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;width:216px}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container input{padding:8px 12px;line-height:normal;width:100%;height:32px}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container .ai1wm-toggle-password-visibility{font-size:16px;text-decoration:none;color:#3c434a;position:absolute;left:10px;top:8px;outline:0;box-shadow:none}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container.ai1wm-has-error input{border-color:#e74c3c}.ai1wm-encrypt-backups-container .ai1wm-encrypt-backups-passwords-toggle .ai1wm-encrypt-backups-passwords-container .ai1wm-input-password-container.ai1wm-has-error .ai1wm-error-message{color:#e74c3c;display:block;font-weight:400} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/import.min.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/import.min.css new file mode 100644 index 0000000..9edf2c3 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/import.min.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"‎"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited{float:left;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:right}.ai1wm-import-info a,.ai1wm-no-underline,.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-top-positive-four{position:relative;top:4px}.ai1wm-holder h1 i,.ai1wm-top-positive-two{position:relative;top:2px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai1wm-mt-20{margin-top:20px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:"servmask";speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-right2:before{content:"\e901"}.ai1wm-icon-chevron-left2:before{content:"\e902"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}.ai1wm-icon-dots-horizontal-triple:before{content:"\e903"}.ai1wm-icon-bullhorn:before{content:"\e91a"}.ai1wm-icon-eye:before{content:"\e9ce"}.ai1wm-icon-eye-blocked:before{content:"\e9d1"}.ai1wm-icon-power-cord:before{content:"\e9b7"}.ai1wm-icon-image:before{content:"\e90d"}.ai1wm-icon-file-video:before{content:"\e92a"}.ai1wm-icon-stack:before{content:"\e92e"}.ai1wm-icon-table:before{content:"\e906"}.ai1wm-icon-calendar:before{content:"\e953"}.ai1wm-icon-play:before{content:"\ea1c"}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:left;font-weight:300;font-size:22px;text-transform:uppercase}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-right,.ai1wm-row{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container.ai1wm-modal-container-v2{display:block;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-height:400px;overflow-y:auto;text-align:left;padding:0;border:0;border-radius:0}.ai1wm-modal-container.ai1wm-modal-container-v2.ai1wm-modal-loading{width:auto;overflow:hidden;border-radius:1em}.ai1wm-modal-container.ai1wm-modal-container-v2 h1{text-transform:none}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:left}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:left;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-right:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}section.ai1wm-decrypt-backup-section,section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}section.ai1wm-decrypt-backup-section{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;gap:16px;box-sizing:border-box;padding:16px}section.ai1wm-decrypt-backup-section h1{font-size:20px;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section p{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;padding:0;margin:0}section.ai1wm-decrypt-backup-section form{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;padding:0;gap:8px}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container input{width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-toggle-password-visibility{font-size:16px;text-decoration:none;color:#3c434a;position:absolute;right:10px;top:8px;outline:0;box-shadow:none}div.ai1wm-expandable input,section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-error-message{display:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error input{border-color:#e74c3c}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error .ai1wm-error-message{color:#e74c3c;display:block;font-weight:400;text-align:left;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container,section.ai1wm-decrypt-backup-section form{display:-webkit-flex;display:-ms-flexbox;display:flex;width:75%;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:16px;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:1em 0;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area>*{pointer-events:none}div.ai1wm-expandable.ai1wm-open input{display:inline-block}#ai1wm-import-file,.ai1wm-import-form{position:relative}#ai1wm-import-file input[type=file]{position:absolute;width:100%;height:21px;cursor:pointer;opacity:0;z-index:9999;padding:0;margin:0;top:0;left:0}#ai1wm-import-file input[type=file]::-webkit-file-upload-button{cursor:pointer}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over.ai1wm-drag-drop-area{border-color:#83b4d8}#ai1wm-import-form{margin-top:1.95rem}#ai1wm-import-init{position:absolute;top:10px;left:10%;width:80%;text-align:center;z-index:1}#ai1wm-import-init p{font-size:18px;color:#9e9e9e}#ai1wm-import-init p i{font-size:46px}#ai1wm-import-init div.ai1wm-button-import{pointer-events:all;background:#fff}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:left;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;width:0;text-align:center}.ai1wm-progress-bar-percent{position:absolute;width:50px;left:50%;-webkit-transform:translate(-24px,0);transform:translate(-24px,0);font-size:.5em;background:0 0} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/import.min.rtl.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/import.min.rtl.css new file mode 100644 index 0000000..baf8fac --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/import.min.rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-container .ai1wm-row label:after{content:"‎"}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:left}.ai1wm-import-info a,.ai1wm-no-underline,.ai1wm-unlimited-import a{text-decoration:none}.ai1wm-top-positive-four{position:relative;top:4px}.ai1wm-holder h1 i,.ai1wm-top-positive-two{position:relative;top:2px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 8px 6px 0}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:right;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai1wm-mt-20{margin-top:20px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:"servmask";speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-right2:before{content:"\e901"}.ai1wm-icon-chevron-left2:before{content:"\e902"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}.ai1wm-icon-dots-horizontal-triple:before{content:"\e903"}.ai1wm-icon-bullhorn:before{content:"\e91a"}.ai1wm-icon-eye:before{content:"\e9ce"}.ai1wm-icon-eye-blocked:before{content:"\e9d1"}.ai1wm-icon-power-cord:before{content:"\e9b7"}.ai1wm-icon-image:before{content:"\e90d"}.ai1wm-icon-file-video:before{content:"\e92a"}.ai1wm-icon-stack:before{content:"\e92e"}.ai1wm-icon-table:before{content:"\e906"}.ai1wm-icon-calendar:before{content:"\e953"}.ai1wm-icon-play:before{content:"\ea1c"}@media (min-width:855px){.ai1wm-row{margin-left:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:right;width:100%}.ai1wm-right{float:left;width:377px;margin-left:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:right;font-weight:300;font-size:22px;text-transform:uppercase}@media (max-width:854px){.ai1wm-container{margin-right:10px!important}.ai1wm-right,.ai1wm-row{margin-left:0!important}.ai1wm-right{float:right!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 2px 0 20px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-right:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container.ai1wm-modal-container-v2{display:block;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);max-height:400px;overflow-y:auto;text-align:right;padding:0;border:0;border-radius:0}.ai1wm-modal-container.ai1wm-modal-container-v2.ai1wm-modal-loading{width:auto;overflow:hidden;border-radius:1em}.ai1wm-modal-container.ai1wm-modal-container-v2 h1{text-transform:none}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:right}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:right}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:right}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:right;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-left:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}section.ai1wm-decrypt-backup-section,section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}section.ai1wm-decrypt-backup-section{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;gap:16px;box-sizing:border-box;padding:16px}section.ai1wm-decrypt-backup-section h1{font-size:20px;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section p{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;padding:0;margin:0}section.ai1wm-decrypt-backup-section form{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;padding:0;gap:8px}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container{-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container input{width:100%}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-toggle-password-visibility{font-size:16px;text-decoration:none;color:#3c434a;position:absolute;left:10px;top:8px;outline:0;box-shadow:none}div.ai1wm-expandable input,section.ai1wm-decrypt-backup-section .ai1wm-input-password-container .ai1wm-error-message{display:none}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error input{border-color:#e74c3c}section.ai1wm-decrypt-backup-section .ai1wm-input-password-container.ai1wm-has-error .ai1wm-error-message{color:#e74c3c;display:block;font-weight:400;text-align:right;width:100%}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container,section.ai1wm-decrypt-backup-section form{display:-webkit-flex;display:-ms-flexbox;display:flex;width:75%;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}section.ai1wm-decrypt-backup-section .ai1wm-backup-decrypt-button-container{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;gap:16px;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.ai1wm-drag-drop-area{border:3px dashed #ddd;height:200px;margin:1em 0;background:#fff;text-align:center;border-radius:30px}.ai1wm-drag-drop-area>*{pointer-events:none}div.ai1wm-expandable.ai1wm-open input{display:inline-block}#ai1wm-import-file,.ai1wm-import-form{position:relative}#ai1wm-import-file input[type=file]{position:absolute;width:100%;height:21px;cursor:pointer;opacity:0;z-index:9999;padding:0;margin:0;top:0;right:0}#ai1wm-import-file input[type=file]::-webkit-file-upload-button{cursor:pointer}.ai1wm-drag-drop-area.dragover{background:rgba(255,255,255,.4);border-color:green}.ai1wm-drag-over.ai1wm-drag-drop-area{border-color:#83b4d8}#ai1wm-import-form{margin-top:1.95rem}#ai1wm-import-init{position:absolute;top:10px;right:10%;width:80%;text-align:center;z-index:1}#ai1wm-import-init p{font-size:18px;color:#9e9e9e}#ai1wm-import-init p i{font-size:46px}#ai1wm-import-init div.ai1wm-button-import{pointer-events:all;background:#fff}.ai1wm-max-upload-size{border-bottom:1px solid #000}.ai1wm-progress-bar{position:relative;display:inline-block;background-color:#bdc3c7;height:32px;width:100%;border-radius:15px;top:35px}.ai1wm-progress-bar-meter,.ai1wm-progress-bar-percent{display:inline-block;float:right;height:32px;line-height:32px;color:#fff}.ai1wm-progress-bar-meter{background-color:#2ecc71;border-radius:15px;width:0;text-align:center}.ai1wm-progress-bar-percent{position:absolute;width:50px;right:50%;-webkit-transform:translate(24px,0);transform:translate(24px,0);font-size:.5em;background:100% 0} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/reset.min.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/reset.min.css new file mode 100644 index 0000000..6257921 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/reset.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.ai1wm-reset-container,.ai1wm-reset-container .ai1wm-reset-content{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ai1wm-reset-container{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;padding:20px 20px 20px 0;background:0 0}.ai1wm-reset-container .ai1wm-reset-content{padding:20px;gap:20px;max-width:762px}.ai1wm-reset-container .ai1wm-reset-content h1{display:-webkit-flex;display:-ms-flexbox;display:flex;gap:8px;-webkit-align-items:center;-ms-flex-align:center;align-items:center;line-height:1.2;margin:0}.ai1wm-reset-container .ai1wm-reset-content h1>img{max-height:22px;width:auto}.ai1wm-reset-container .ai1wm-reset-content p{margin:0}.ai1wm-reset-container .ai1wm-reset-content img{max-width:100%;margin:0}@media (max-width:767px){.ai1wm-reset-container{margin-right:10px}.ai1wm-reset-container .ai1wm-reset-content{padding:0}} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/reset.min.rtl.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/reset.min.rtl.css new file mode 100644 index 0000000..288a074 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/reset.min.rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";.ai1wm-reset-container,.ai1wm-reset-container .ai1wm-reset-content{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ai1wm-reset-container{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;padding:20px 0 20px 20px;background:100% 0}.ai1wm-reset-container .ai1wm-reset-content{padding:20px;gap:20px;max-width:762px}.ai1wm-reset-container .ai1wm-reset-content h1{display:-webkit-flex;display:-ms-flexbox;display:flex;gap:8px;-webkit-align-items:center;-ms-flex-align:center;align-items:center;line-height:1.2;margin:0}.ai1wm-reset-container .ai1wm-reset-content h1>img{max-height:22px;width:auto}.ai1wm-reset-container .ai1wm-reset-content p{margin:0}.ai1wm-reset-container .ai1wm-reset-content img{max-width:100%;margin:0}@media (max-width:767px){.ai1wm-reset-container{margin-left:10px}.ai1wm-reset-container .ai1wm-reset-content{padding:0}} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/schedules.min.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/schedules.min.css new file mode 100644 index 0000000..f38281d --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/schedules.min.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wmFadeIn{0%{opacity:0}to{opacity:1}}@keyframes ai1wmFadeIn{0%{opacity:0}to{opacity:1}}.ai1wm-schedules-container{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;padding:20px 20px 20px 0;background:0 0}.ai1wm-schedules-container header,.ai1wm-schedules-container header>div a{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.ai1wm-schedules-container header{background:#f8ebff;border:solid 2px #fff;border-radius:5px;width:100%;margin-bottom:20px;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.ai1wm-schedules-container header .ai1wm-schedules-subtitle{color:#a06ab4}.ai1wm-schedules-container header>div{padding:10px 20px}.ai1wm-schedules-container header>div a{text-decoration:none;color:#fff;background:linear-gradient(to bottom,#ed5eaa,#6060ef);padding:2px;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.ai1wm-schedules-container header>div a>span{padding:10px;background-color:#121217;width:100%;text-align:center}.ai1wm-schedules-container .ai1wm-schedules-content{background:#fff;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;border:2px solid #fff;border-radius:5px;padding:20px}.ai1wm-schedules-container .ai1wm-schedules-content aside{width:200px}.ai1wm-schedules-container,.ai1wm-schedules-container .ai1wm-schedules-content aside nav,.ai1wm-schedules-container .ai1wm-schedules-content section{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ai1wm-schedules-container .ai1wm-schedules-content aside nav{gap:10px;margin-top:1rem;margin-right:20px}.ai1wm-schedules-container .ai1wm-schedules-content aside nav a{text-decoration:none;color:#121217;border:2px solid transparent;padding:5px 10px;box-shadow:none}.ai1wm-schedules-container .ai1wm-schedules-content aside nav a.active,.ai1wm-schedules-container .ai1wm-schedules-content aside nav a:hover{background:#f8ebff;border-color:#f8ebff #f8ebff #f8ebff #a06ab4;cursor:pointer}.ai1wm-schedules-container .ai1wm-schedules-content section{-webkit-flex:1;-ms-flex:1;flex:1;border-left:1px solid #efeff5;padding:0 20px}.ai1wm-schedules-container .ai1wm-schedules-content section article>a,.ai1wm-schedules-container .ai1wm-schedules-content section article>div{display:none;opacity:0}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active{display:block;-webkit-animation:ai1wmFadeIn .25s linear forwards;animation:ai1wmFadeIn .25s linear forwards}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active h2{font-weight:700;font-size:1.2em}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active h2 a{font-size:.8em;padding:5px 5px 5px 10px;margin-left:10px;display:inline-block;border-left:1px solid #121217}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active img{width:621px;max-width:100%}@media (max-width:767px){.ai1wm-schedules-container{margin-right:10px}.ai1wm-schedules-container .ai1wm-schedules-content,.ai1wm-schedules-container header{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ai1wm-schedules-container header h1{line-height:1.2}.ai1wm-schedules-container header>div.ai1wm-button-link{width:100%;margin-top:0}.ai1wm-schedules-container header>div.ai1wm-button-link a{margin:0 20px}.ai1wm-schedules-container .ai1wm-schedules-content{background:0 0;border:0;padding:0}.ai1wm-schedules-container .ai1wm-schedules-content aside{display:none}.ai1wm-schedules-container .ai1wm-schedules-content section{background:0 0;padding:0}.ai1wm-schedules-container .ai1wm-schedules-content section article{border:2px solid #fff;border-radius:5px;background:#fff;margin-bottom:30px}.ai1wm-schedules-container .ai1wm-schedules-content section article:last-of-type{margin-bottom:0}.ai1wm-schedules-container .ai1wm-schedules-content section article>a{position:relative;color:#121217;text-decoration:none;display:block;font-weight:700;padding:10px 40px 10px 20px;opacity:1}.ai1wm-schedules-container .ai1wm-schedules-content section article>a:focus{box-shadow:none}.ai1wm-schedules-container .ai1wm-schedules-content section article>a>span{position:absolute;width:18px;height:18px;right:0;margin-right:20px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAdpJREFUWEft1ruKFUEQgOFvE2+7iZj7ABooCEYKigbe8AkMTcx0QdfEu4kXVAwMBDMT8cbKYqKhL2Bm7HMoSsERxnHO9HRPr3BgOpyprv7nr+ruWbIgY2lBOE2gtSs1GZ2M1jZQO9/Uo//L6C48xV48w/PaC7fybcU9HMN73MLPZkxX6XfiEw40Am/g9ibBbsFrnG3kf4Vz+PHnWRt0BV+wrwPqGu5Whg2Tb3G6I+8LnJ8HehGPe2Cu404l2IB8h1M9+fbja7xvG70w68k+lhptsG0GebJnoV/Yg29doPGVn3EoYe3mrOFL5AZkbJgTickPcGVe6eP5MjZwJJEodunVTNIQ8QZnEvOe4FJq128WbDFkV+mbHzHU7H2sJQz17e7m1H9M9pW+BPavfmpBb8cHHM8t95DS14KtApkqfQnsQ1yeTdyB9bEmh5a+FDbO2ih33N19Y25Ptifl/ubFFfsRhxMA37E7ERM34OrQ4y0XNPJGSeOcPTp0kY64wSZLSt9cbwxsNmTOZuqSVwJbBDkWNLcNiiFrgA6FHQVZCzQFOxqyJug82CqQtUEjX5yzj3AQLxE3VZVRco5WWTg3yQSaaywVPxlNGcp9PxnNNZaKn4ymDOW+XxijvwFnZkorasbgRwAAAABJRU5ErkJggg==) center center no-repeat;background-size:contain}.ai1wm-schedules-container .ai1wm-schedules-content section article>a.active{border-bottom:1px solid #efeff5;cursor:default}.ai1wm-schedules-container .ai1wm-schedules-content section article>a.active>span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAclJREFUWEft2LtKxEAUxvH/Nl7QRux9AC0sxE5BxMIb+AR2Nlaihdp4t/AGaqOF2FmIeEdstPQJbOx9DkU5kECI2cxJ5iwYmLQ5M/ubLzMnS2pU5KpVxEmAWj+pkGhI1DoB6/nCHv3vibYDR0A/cAHsW4EtH30b8AQMJXCCnrfAWkGzkLHPBGsBzUOaYX2hGqQJ1gdaBOmNLQstg/TCloH6IEtji0KlTz4Dg46W8wl0OWoOgQVt6yoC1SZ5AKwBD8CIAyKtS7A/LrAWqkXKm2gx+tFW4NEKq4GWQcYBmWFdUC1yD1iq8/iagRtgwmcb5EEtkLHNG1sPqkXuAsuugxDdF+w1MFkm2SxoI5CxrSnaBoWxaais+hUYcKx6HdhQJpkuawHugFHH+GQH+fMBYhY4cUwgPXKzJDIeJthbYCxnHumtPcCH1KQTnYv+odcbvwpseSKTB0yw4znz9QLvWVB5Rb4BUpC+VoBtI6SmG5wDM3Fh1mHqAF6AvgTKMsn0WuWAXQFTiRuXwDTwlQeVe53AMdANnAJnxkmmp5NDvAMMA/fRGfhOFrneTA326acPUH1WusqQqC4nfVVIVJ+VrjIkqstJX1WZRH8Bl6RRK7iiYaMAAAAASUVORK5CYII=)}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active{padding:20px}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active h2{font-size:1.1em}} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/schedules.min.rtl.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/schedules.min.rtl.css new file mode 100644 index 0000000..44a1bce --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/schedules.min.rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wmFadeIn{0%{opacity:0}to{opacity:1}}@keyframes ai1wmFadeIn{0%{opacity:0}to{opacity:1}}.ai1wm-schedules-container{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;padding:20px 0 20px 20px;background:100% 0}.ai1wm-schedules-container header,.ai1wm-schedules-container header>div a{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.ai1wm-schedules-container header{background:#f8ebff;border:solid 2px #fff;border-radius:5px;width:100%;margin-bottom:20px;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.ai1wm-schedules-container header .ai1wm-schedules-subtitle{color:#a06ab4}.ai1wm-schedules-container header>div{padding:10px 20px}.ai1wm-schedules-container header>div a{text-decoration:none;color:#fff;background:linear-gradient(to bottom,#ed5eaa,#6060ef);padding:2px;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.ai1wm-schedules-container header>div a>span{padding:10px;background-color:#121217;width:100%;text-align:center}.ai1wm-schedules-container .ai1wm-schedules-content{background:#fff;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;border:2px solid #fff;border-radius:5px;padding:20px}.ai1wm-schedules-container .ai1wm-schedules-content aside{width:200px}.ai1wm-schedules-container,.ai1wm-schedules-container .ai1wm-schedules-content aside nav,.ai1wm-schedules-container .ai1wm-schedules-content section{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ai1wm-schedules-container .ai1wm-schedules-content aside nav{gap:10px;margin-top:1rem;margin-left:20px}.ai1wm-schedules-container .ai1wm-schedules-content aside nav a{text-decoration:none;color:#121217;border:2px solid transparent;padding:5px 10px;box-shadow:none}.ai1wm-schedules-container .ai1wm-schedules-content aside nav a.active,.ai1wm-schedules-container .ai1wm-schedules-content aside nav a:hover{background:#f8ebff;border-color:#f8ebff #a06ab4 #f8ebff #f8ebff;cursor:pointer}.ai1wm-schedules-container .ai1wm-schedules-content section{-webkit-flex:1;-ms-flex:1;flex:1;border-right:1px solid #efeff5;padding:0 20px}.ai1wm-schedules-container .ai1wm-schedules-content section article>a,.ai1wm-schedules-container .ai1wm-schedules-content section article>div{display:none;opacity:0}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active{display:block;-webkit-animation:ai1wmFadeIn .25s linear forwards;animation:ai1wmFadeIn .25s linear forwards}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active h2{font-weight:700;font-size:1.2em}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active h2 a{font-size:.8em;padding:5px 10px 5px 5px;margin-right:10px;display:inline-block;border-right:1px solid #121217}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active img{width:621px;max-width:100%}@media (max-width:767px){.ai1wm-schedules-container{margin-left:10px}.ai1wm-schedules-container .ai1wm-schedules-content,.ai1wm-schedules-container header{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ai1wm-schedules-container header h1{line-height:1.2}.ai1wm-schedules-container header>div.ai1wm-button-link{width:100%;margin-top:0}.ai1wm-schedules-container header>div.ai1wm-button-link a{margin:0 20px}.ai1wm-schedules-container .ai1wm-schedules-content{background:100% 0;border:0;padding:0}.ai1wm-schedules-container .ai1wm-schedules-content aside{display:none}.ai1wm-schedules-container .ai1wm-schedules-content section{background:100% 0;padding:0}.ai1wm-schedules-container .ai1wm-schedules-content section article{border:2px solid #fff;border-radius:5px;background:#fff;margin-bottom:30px}.ai1wm-schedules-container .ai1wm-schedules-content section article:last-of-type{margin-bottom:0}.ai1wm-schedules-container .ai1wm-schedules-content section article>a{position:relative;color:#121217;text-decoration:none;display:block;font-weight:700;padding:10px 20px 10px 40px;opacity:1}.ai1wm-schedules-container .ai1wm-schedules-content section article>a:focus{box-shadow:none}.ai1wm-schedules-container .ai1wm-schedules-content section article>a>span{position:absolute;width:18px;height:18px;left:0;margin-left:20px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAdpJREFUWEft1ruKFUEQgOFvE2+7iZj7ABooCEYKigbe8AkMTcx0QdfEu4kXVAwMBDMT8cbKYqKhL2Bm7HMoSsERxnHO9HRPr3BgOpyprv7nr+ruWbIgY2lBOE2gtSs1GZ2M1jZQO9/Uo//L6C48xV48w/PaC7fybcU9HMN73MLPZkxX6XfiEw40Am/g9ibBbsFrnG3kf4Vz+PHnWRt0BV+wrwPqGu5Whg2Tb3G6I+8LnJ8HehGPe2Cu404l2IB8h1M9+fbja7xvG70w68k+lhptsG0GebJnoV/Yg29doPGVn3EoYe3mrOFL5AZkbJgTickPcGVe6eP5MjZwJJEodunVTNIQ8QZnEvOe4FJq128WbDFkV+mbHzHU7H2sJQz17e7m1H9M9pW+BPavfmpBb8cHHM8t95DS14KtApkqfQnsQ1yeTdyB9bEmh5a+FDbO2ih33N19Y25Ptifl/ubFFfsRhxMA37E7ERM34OrQ4y0XNPJGSeOcPTp0kY64wSZLSt9cbwxsNmTOZuqSVwJbBDkWNLcNiiFrgA6FHQVZCzQFOxqyJug82CqQtUEjX5yzj3AQLxE3VZVRco5WWTg3yQSaaywVPxlNGcp9PxnNNZaKn4ymDOW+XxijvwFnZkorasbgRwAAAABJRU5ErkJggg==) center center no-repeat;background-size:contain}.ai1wm-schedules-container .ai1wm-schedules-content section article>a.active{border-bottom:1px solid #efeff5;cursor:default}.ai1wm-schedules-container .ai1wm-schedules-content section article>a.active>span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAclJREFUWEft2LtKxEAUxvH/Nl7QRux9AC0sxE5BxMIb+AR2Nlaihdp4t/AGaqOF2FmIeEdstPQJbOx9DkU5kECI2cxJ5iwYmLQ5M/ubLzMnS2pU5KpVxEmAWj+pkGhI1DoB6/nCHv3vibYDR0A/cAHsW4EtH30b8AQMJXCCnrfAWkGzkLHPBGsBzUOaYX2hGqQJ1gdaBOmNLQstg/TCloH6IEtji0KlTz4Dg46W8wl0OWoOgQVt6yoC1SZ5AKwBD8CIAyKtS7A/LrAWqkXKm2gx+tFW4NEKq4GWQcYBmWFdUC1yD1iq8/iagRtgwmcb5EEtkLHNG1sPqkXuAsuugxDdF+w1MFkm2SxoI5CxrSnaBoWxaais+hUYcKx6HdhQJpkuawHugFHH+GQH+fMBYhY4cUwgPXKzJDIeJthbYCxnHumtPcCH1KQTnYv+odcbvwpseSKTB0yw4znz9QLvWVB5Rb4BUpC+VoBtI6SmG5wDM3Fh1mHqAF6AvgTKMsn0WuWAXQFTiRuXwDTwlQeVe53AMdANnAJnxkmmp5NDvAMMA/fRGfhOFrneTA326acPUH1WusqQqC4nfVVIVJ+VrjIkqstJX1WZRH8Bl6RRK7iiYaMAAAAASUVORK5CYII=)}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active{padding:20px}.ai1wm-schedules-container .ai1wm-schedules-content section article>div.active h2{font-size:1.1em}} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/servmask.min.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/servmask.min.css new file mode 100644 index 0000000..c93012a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/servmask.min.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(-90deg);transform:rotateZ(-90deg)}50%{-webkit-transform:rotateZ(-180deg);transform:rotateZ(-180deg)}75%{-webkit-transform:rotateZ(-270deg);transform:rotateZ(-270deg)}to{-webkit-transform:rotateZ(-360deg);transform:rotateZ(-360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes ai1wm-spin-left{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes ai1wm-spin-left{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes ai1wm-spin-right{0%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes ai1wm-spin-right{0%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.ai1wm-accordion{margin:1em 0;display:block}.ai1wm-accordion h4{cursor:pointer;color:rgba(0,116,162,.8);margin:0}.ai1wm-accordion h4 small{color:#444;font-weight:400}.ai1wm-accordion h4 small:after,.ai1wm-container .ai1wm-row label:after{content:"‎"}.ai1wm-accordion .ai1wm-icon-arrow-right{transition:transform .1s ease-out;transition:transform .1s ease-out,-webkit-transform .1s ease-out;display:inline-block}.ai1wm-accordion ul{margin:0;padding:0;list-style:none;visibility:hidden;height:0;transition:height .2s cubic-bezier(.19,1,.22,1)}.ai1wm-accordion h4 small,.ai1wm-accordion ul li small{display:inline;float:none;width:auto}.ai1wm-accordion.ai1wm-open h4 .ai1wm-icon-arrow-right{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ai1wm-accordion.ai1wm-open ul{height:auto;margin:.6em 0 0 2em;visibility:visible}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited{float:left;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:right}.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-positive-four{position:relative;top:4px}.ai1wm-holder h1 i,.ai1wm-top-positive-two{position:relative;top:2px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 0 6px 8px}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:left;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai1wm-mt-20{margin-top:20px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:"servmask";speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-right2:before{content:"\e901"}.ai1wm-icon-chevron-left2:before{content:"\e902"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}.ai1wm-icon-dots-horizontal-triple:before{content:"\e903"}.ai1wm-icon-bullhorn:before{content:"\e91a"}.ai1wm-icon-eye:before{content:"\e9ce"}.ai1wm-icon-eye-blocked:before{content:"\e9d1"}.ai1wm-icon-power-cord:before{content:"\e9b7"}.ai1wm-icon-image:before{content:"\e90d"}.ai1wm-icon-file-video:before{content:"\e92a"}.ai1wm-icon-stack:before{content:"\e92e"}.ai1wm-icon-table:before{content:"\e906"}.ai1wm-icon-calendar:before{content:"\e953"}.ai1wm-icon-play:before{content:"\ea1c"}@media (min-width:855px){.ai1wm-row{margin-right:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:left;width:100%}.ai1wm-right{float:right;width:377px;margin-right:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:left;font-weight:300;font-size:22px;text-transform:uppercase}@media (max-width:854px){.ai1wm-container{margin-left:10px!important}.ai1wm-right,.ai1wm-row{margin-right:0!important}.ai1wm-right{float:left!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 20px 0 2px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-left:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container.ai1wm-modal-container-v2{display:block;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-height:400px;overflow-y:auto;text-align:left;padding:0;border:0;border-radius:0}.ai1wm-modal-container.ai1wm-modal-container-v2.ai1wm-modal-loading{width:auto;overflow:hidden;border-radius:1em}.ai1wm-modal-container.ai1wm-modal-container-v2 h1{text-transform:none}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:left}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:left}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:left}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:left;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:right}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-right:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}.ai1wm-spin-container{height:50px;width:50px;position:relative;display:block;padding:1.5em}.ai1wm-spinner{display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;width:50px;height:50px;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.ai1wm-spinner.ai1wm-spin-left{-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-name:ai1wm-spin-left;animation-name:ai1wm-spin-left}.ai1wm-spinner.ai1wm-spin-right{-webkit-animation-duration:4000ms;animation-duration:4000ms;-webkit-animation-name:ai1wm-spin-right;animation-name:ai1wm-spin-right} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/servmask.min.rtl.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/servmask.min.rtl.css new file mode 100644 index 0000000..80310b7 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/servmask.min.rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";@-webkit-keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@keyframes ai1wm-rotate{0%{-webkit-transform:rotateZ(0);transform:rotateZ(0)}25%{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}50%{-webkit-transform:rotateZ(180deg);transform:rotateZ(180deg)}75%{-webkit-transform:rotateZ(270deg);transform:rotateZ(270deg)}to{-webkit-transform:rotateZ(360deg);transform:rotateZ(360deg)}}@-webkit-keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes ai1wm-emphasize{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@-webkit-keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ai1wm-fadein{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.5);transform:scale(1.5)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes ai1wm-spin-left{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}@keyframes ai1wm-spin-left{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}@-webkit-keyframes ai1wm-spin-right{0%{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes ai1wm-spin-right{0%{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.ai1wm-accordion{margin:1em 0;display:block}.ai1wm-accordion h4{cursor:pointer;color:rgba(0,116,162,.8);margin:0}.ai1wm-accordion h4 small{color:#444;font-weight:400}.ai1wm-accordion h4 small:after,.ai1wm-container .ai1wm-row label:after{content:"‎"}.ai1wm-accordion .ai1wm-icon-arrow-right{transition:transform .1s ease-out;transition:transform .1s ease-out,-webkit-transform .1s ease-out;display:inline-block}.ai1wm-accordion ul{margin:0;padding:0;list-style:none;visibility:hidden;height:0;transition:height .2s cubic-bezier(.19,1,.22,1)}.ai1wm-accordion h4 small,.ai1wm-accordion ul li small{display:inline;float:none;width:auto}.ai1wm-accordion.ai1wm-open h4 .ai1wm-icon-arrow-right{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.ai1wm-accordion.ai1wm-open ul{height:auto;margin:.6em 2em 0 0;visibility:visible}.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-clear{*zoom:1;clear:both}.ai1wm-clear:after,.ai1wm-clear:before{content:" ";display:table}.ai1wm-clear:after{clear:both}.ai1wm-container .ai1wm-row label{position:relative;top:-1px}.ai1wm-share-button-container{text-align:center}.ai1wm-share-button-container .ai1wm-share-button{text-decoration:none;margin:10px;font-size:30px}.ai1wm-feedback-cancel:active,.ai1wm-feedback-cancel:link,.ai1wm-feedback-cancel:visited{float:right;line-height:34px;outline:0;text-decoration:none;color:#e74c3c}.ai1wm-form-submit{float:left}.ai1wm-import-info a,.ai1wm-no-underline{text-decoration:none}.ai1wm-top-positive-four{position:relative;top:4px}.ai1wm-holder h1 i,.ai1wm-top-positive-two{position:relative;top:2px}.ai1wm-feedback-form{display:none}.ai1wm-feedback-types{margin:0;padding:0;list-style:none}.ai1wm-feedback-types li{margin:14px 0;padding:0}.ai1wm-feedback-types>li>a>span,.ai1wm-feedback-types>li>label>span{display:inline-block;padding:5px 8px 6px 0}.ai1wm-feedback-types>li>a{height:29px;outline:0;color:#333;text-deciration:none}.ai1wm-loader{display:inline-block;width:128px;height:128px;position:relative;-webkit-animation:ai1wm-rotate 1.5s infinite linear;animation:ai1wm-rotate 1.5s infinite linear;background:url(../img/logo-128x128.png);background-repeat:no-repeat;background-position:center center}.ai1wm-hide{display:none}.ai1wm-label{border:1px solid #5cb85c;background-color:transparent;color:#5cb85c;cursor:pointer;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;padding:.2em .6em;font-size:.8em;border-radius:5px}.ai1wm-label:hover{background-color:#5cb85c;color:#fff}.ai1wm-dialog-message{text-align:right;line-height:1.5em}.ai1wm-import-info{margin-top:16px}.ai1wm-import-info,.ai1wm-import-title{display:inline-block;font-size:12px;font-weight:700}.ai1wm-button-download{top:.5em!important}.ai1wm-button-download span{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai1wm-mt-20{margin-top:20px}[class*=" ai1wm-icon-"],[class^=ai1wm-icon-]{font-family:"servmask";speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ai1wm-icon-file-zip:before{content:"\e60f"}.ai1wm-icon-folder:before{content:"\e60e"}.ai1wm-icon-file:before{content:"\e60b"}.ai1wm-icon-file-content:before{content:"\e60c"}.ai1wm-icon-cloud-upload:before{content:"\e600"}.ai1wm-icon-history:before{content:"\e603"}.ai1wm-icon-notification:before{content:"\e619"}.ai1wm-icon-arrow-down:before{content:"\e604"}.ai1wm-icon-close:before{content:"\e61a"}.ai1wm-icon-wordpress2:before{content:"\e620"}.ai1wm-icon-arrow-right:before{content:"\e605"}.ai1wm-icon-plus2:before{content:"\e607"}.ai1wm-icon-edit-pencil:before{content:"\e900"}.ai1wm-icon-export:before{content:"\e601"}.ai1wm-icon-publish:before{content:"\e602"}.ai1wm-icon-paperplane:before{content:"\e608"}.ai1wm-icon-help:before{content:"\e609"}.ai1wm-icon-chevron-right:before{content:"\e60d"}.ai1wm-icon-chevron-right2:before{content:"\e901"}.ai1wm-icon-chevron-left2:before{content:"\e902"}.ai1wm-icon-dropbox:before{content:"\e606"}.ai1wm-icon-gear:before{content:"\e60a"}.ai1wm-icon-database:before{content:"\e964"}.ai1wm-icon-upload2:before{content:"\e9c6"}.ai1wm-icon-checkmark:before{content:"\ea10"}.ai1wm-icon-checkmark2:before{content:"\ea11"}.ai1wm-icon-enter:before{content:"\ea13"}.ai1wm-icon-exit:before{content:"\ea14"}.ai1wm-icon-amazon:before{content:"\ea87"}.ai1wm-icon-onedrive:before{content:"\eaaf"}.ai1wm-icon-folder-secondary:before{content:"\e92f"}.ai1wm-icon-folder-secondary-open:before{content:"\e930"}.ai1wm-icon-dots-horizontal-triple:before{content:"\e903"}.ai1wm-icon-bullhorn:before{content:"\e91a"}.ai1wm-icon-eye:before{content:"\e9ce"}.ai1wm-icon-eye-blocked:before{content:"\e9d1"}.ai1wm-icon-power-cord:before{content:"\e9b7"}.ai1wm-icon-image:before{content:"\e90d"}.ai1wm-icon-file-video:before{content:"\e92a"}.ai1wm-icon-stack:before{content:"\e92e"}.ai1wm-icon-table:before{content:"\e906"}.ai1wm-icon-calendar:before{content:"\e953"}.ai1wm-icon-play:before{content:"\ea1c"}@media (min-width:855px){.ai1wm-row{margin-left:399px}.ai1wm-row:after,.ai1wm-row:before{content:" ";display:table}.ai1wm-row:after{clear:both}.ai1wm-left{float:right;width:100%}.ai1wm-right{float:left;width:377px;margin-left:-399px}.ai1wm-right .ai1wm-sidebar{width:100%}.ai1wm-right .ai1wm-segment{width:333px;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;color:#333;background-color:#f9f9f9;padding:20px;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box}.ai1wm-right .ai1wm-segment h2{margin:22px 0 0;padding:0;font-weight:700;font-size:14px;text-transform:uppercase;text-align:center}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-holder{position:relative;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-holder h1{float:right;font-weight:300;font-size:22px;text-transform:uppercase}@media (max-width:854px){.ai1wm-container{margin-right:10px!important}.ai1wm-right,.ai1wm-row{margin-left:0!important}.ai1wm-right{float:right!important;width:100%!important;margin-top:18px}.ai1wm-right .ai1wm-sidebar{width:auto!important;border:1px solid #d6d6d6;border-radius:3px;box-shadow:inset 0 1px 0 0 #fff;padding:20px;background:#f9f9f9}.ai1wm-right .ai1wm-feedback-email{width:100%;font-weight:400;font-size:.8rem;height:2.3rem;line-height:2.3rem;border-radius:5px;margin-bottom:4px;padding:0 10px}.ai1wm-right .ai1wm-feedback-message{width:100%;border-radius:3px;font-size:.8rem;padding:6px 10px;resize:none}.ai1wm-right .ai1wm-feedback-terms-segment{font-size:.7rem;line-height:1rem;margin:4px 0 8px;border-radius:3px}.ai1wm-right .ai1wm-feedback-terms-segment>.ai1wm-feedback-terms{border-radius:3px}}.ai1wm-container{margin:20px 2px 0 20px}.ai1wm-container:after,.ai1wm-container:before{content:" ";display:table}.ai1wm-container:after{clear:both}.ai1wm-replace-row{width:100%;box-shadow:outset 0 1px 0 0 white;border-radius:3px;color:#333;font-size:11px;font-weight:700;background-color:#f9f9f9;text-decoration:none;text-shadow:0 1px 0 #fff;background-clip:padding-box;margin-bottom:10px}.ai1wm-field{margin-bottom:4px}.ai1wm-field input[type=text],.ai1wm-field textarea{width:100%;font-weight:400}.ai1wm-field-set{margin-top:18px}.ai1wm-message{-moz-box-sizing:border-box;background-color:#efefef;border-radius:4px;color:rgba(0,0,0,.6);height:auto;margin:10px 0;min-height:18px;padding:6px 10px;position:relative;border:1px solid;transition:opacity .1s ease 0s,color .1s ease 0s,background .1s ease 0s,box-shadow .1s ease 0s}.ai1wm-message.ai1wm-success-message{background-color:#f2f8f0;color:#119000;font-size:12px}.ai1wm-message.ai1wm-info-message{background-color:#d9edf7;color:#31708f;font-size:11px}.ai1wm-message.ai1wm-error-message{background-color:#f1d7d7;color:#a95252;font-size:12px}.ai1wm-message.ai1wm-red-message{color:#d95c5c;border:2px solid #d95c5c;background-color:transparent}.ai1wm-message.ai1wm-red-message h3{margin:.4em 0;color:#d95c5c}.ai1wm-message p{margin:4px 0;font-size:12px}.ai1wm-message-warning{display:block;font-size:14px;line-height:18px;padding:12px 20px;margin:0 0 22px;background-color:#f9f9f9;border:1px solid #d6d6d6;border-radius:3px;box-shadow:0 1px 0 0 #fff inset;border-right:4px solid #ffba00}.ai1wm-overlay{display:none;position:fixed;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:100001}.ai1wm-modal-container{position:fixed;display:none;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:16px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box;text-align:center}.ai1wm-modal-container.ai1wm-modal-container-v2{display:block;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);max-height:400px;overflow-y:auto;text-align:right;padding:0;border:0;border-radius:0}.ai1wm-modal-container.ai1wm-modal-container-v2.ai1wm-modal-loading{width:auto;overflow:hidden;border-radius:1em}.ai1wm-modal-container.ai1wm-modal-container-v2 h1{text-transform:none}.ai1wm-modal-container section{display:block;min-height:102px}.ai1wm-holder h1,.ai1wm-modal-container section h1{margin:0;padding:0}.ai1wm-modal-container section h1 .ai1wm-title-green{color:#27ae60;font-size:.7em}.ai1wm-modal-container section h1 .ai1wm-title-red{color:#e74c3c;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-title-grey{color:gray;font-size:20px}.ai1wm-modal-container section h1 .ai1wm-loader{width:32px;height:32px;background:url(../img/logo-32x32.png)}.ai1wm-modal-container section h1 .ai1wm-icon-notification{font-size:1.2em;color:#e74c3c}.ai1wm-modal-container section p{margin:0;padding:12px 0}.ai1wm-modal-container section p .ai1wm-modal-sites p{padding:4px 10px;text-align:right}.ai1wm-modal-container section p .ai1wm-modal-sites input,.ai1wm-modal-container section p .ai1wm-modal-sites select{padding:0 6px;width:100%;max-width:100%;border-radius:3px;height:30px;line-height:30px}.ai1wm-modal-container section p .ai1wm-modal-subtitle-green{color:#27ae60}.ai1wm-modal-container section p .ai1wm-modal-subtitle-red{color:#e74c3c}.ai1wm-modal-container section p .ai1wm-modal-subdescription{display:block;text-align:right}.ai1wm-modal-container section p a.ai1wm-button-green{display:inline-block;position:relative;top:26px}.ai1wm-modal-container section p a.ai1wm-emphasize{-webkit-animation:ai1wm-emphasize 1s infinite;animation:ai1wm-emphasize 1s infinite}.ai1wm-modal-container section p em{display:block;color:#34495e;font-style:normal}.ai1wm-modal-container section p.ai1wm-import-modal-content{text-align:right}.ai1wm-modal-container section p.ai1wm-import-modal-content-done{text-align:right;padding:1.62em .5em}.ai1wm-modal-container .ai1wm-import-modal-actions{border-top:1px solid #ccc;padding-top:1em;text-align:left}.ai1wm-modal-container .ai1wm-import-modal-actions .ai1wm-button-gray{margin-left:1em}.ai1wm-modal-container .ai1wm-import-modal-notice{border-top:1px solid #ccc}.ai1wm-modal-container .ai1wm-import-modal-notice p{font-weight:700;margin:0;padding-top:16px;text-align:center}.ai1wm-spin-container{height:50px;width:50px;position:relative;display:block;padding:1.5em}.ai1wm-spinner{display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;width:50px;height:50px;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.ai1wm-spinner.ai1wm-spin-left{-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-name:ai1wm-spin-left;animation-name:ai1wm-spin-left}.ai1wm-spinner.ai1wm-spin-right{-webkit-animation-duration:4000ms;animation-duration:4000ms;-webkit-animation-name:ai1wm-spin-right;animation-name:ai1wm-spin-right} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/updater.min.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/updater.min.css new file mode 100644 index 0000000..fd8e9b8 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/updater.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:left}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 50px 6px 25px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:left;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;right:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;left:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;left:0}.ai1wm-line-third{top:100%;left:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 25px 5px 26px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:0 0}.ai1wm-message-close-button{position:absolute;right:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:left;width:25px;height:25px;border-radius:50%;background:0 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:"\f463";display:inline-block;font:20px/1 "dashicons";speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;left:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-webkit-transform:translate(-240px,-94px);transform:translate(-240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:left}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-left:1em}.ai1wm-error-message,.ai1wm-update-message{padding:0;margin:0;color:red} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/css/updater.min.rtl.css b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/updater.min.rtl.css new file mode 100644 index 0000000..29c9cb9 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/css/updater.min.rtl.css @@ -0,0 +1 @@ +@charset "UTF-8";.ai1wm-button-group{border:2px solid #27ae60;background-color:transparent;color:#27ae60;border-radius:5px;cursor:pointer;text-transform:uppercase;font-weight:600;transition:background-color .2s ease-out;display:inline-block;text-align:right}.ai1wm-button-group.ai1wm-button-export,.ai1wm-button-group.ai1wm-button-import{box-sizing:content-box}.ai1wm-button-group.ai1wm-button-export.ai1wm-open>.ai1wm-dropdown-menu{height:448px;border-top:1px solid #27ae60}.ai1wm-button-group.ai1wm-button-import.ai1wm-open>.ai1wm-dropdown-menu{height:476px;border-top:1px solid #27ae60}.ai1wm-button-group .ai1wm-button-main{position:relative;padding:6px 25px 6px 50px;box-sizing:content-box}.ai1wm-button-group .ai1wm-dropdown-menu{height:0;overflow:hidden;transition:height .2s cubic-bezier(.19,1,.22,1);border-top:none}.ai1wm-dropdown-menu{list-style:none}.ai1wm-dropdown-menu,.ai1wm-dropdown-menu li{margin:0!important;padding:0}.ai1wm-dropdown-menu li a,.ai1wm-dropdown-menu li a:visited{display:block;padding:5px 26px;text-decoration:none;color:#27ae60;text-align:right;box-sizing:content-box}.ai1wm-dropdown-menu li a:hover,.ai1wm-dropdown-menu li a:visited:hover{text-decoration:none;color:#111}.ai1mw-lines{position:absolute;width:12px;height:10px;top:9px;left:20px}.ai1wm-line{position:absolute;width:100%;height:2px;margin:auto;background:#27ae60;transition:all .2s ease-in-out}.ai1wm-line-first{top:0;right:0}div.ai1wm-open .ai1wm-line-first,div.ai1wm-open .ai1wm-line-third{top:50%}.ai1wm-line-second{top:50%;right:0}.ai1wm-line-third{top:100%;right:0}.ai1wm-button-blue,.ai1wm-button-gray,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{display:inline-block;border:2px solid #95a5a6;background-color:transparent;color:#95a5a6;border-radius:5px;cursor:pointer;padding:5px 26px 5px 25px;text-transform:uppercase;font-weight:600;outline:0;transition:background-color .2s ease-out;text-decoration:none}.ai1wm-button-gray:hover{background-color:#95a5a6;color:#fff}.ai1wm-button-blue,.ai1wm-button-green,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #27ae60;color:#27ae60}.ai1wm-button-green:hover{background-color:#27ae60;color:#fff}.ai1wm-button-blue,.ai1wm-button-green-small,.ai1wm-button-red{border:2px solid #6eb649;color:#6eb649}.ai1wm-button-green-small:hover{background-color:#6eb649;color:#fff}.ai1wm-button-blue,.ai1wm-button-red{border:2px solid #00aff0;color:#00aff0}.ai1wm-button-blue:hover{background-color:#00aff0;color:#fff}.ai1wm-button-red{border:2px solid #e74c3c;color:#e74c3c}.ai1wm-button-red:hover{background-color:#e74c3c;color:#fff}.ai1wm-button-blue[disabled=disabled],.ai1wm-button-green-small[disabled=disabled],.ai1wm-button-green[disabled=disabled],.ai1wm-button-red[disabled=disabled]{opacity:.6;cursor:default}.ai1wm-button-blue[disabled=disabled]:hover{color:#00aff0}.ai1wm-button-red[disabled=disabled]:hover{color:#e74c3c}.ai1wm-button-green[disabled=disabled]:hover{color:#27ae60}.ai1wm-button-blue[disabled=disabled]:hover,.ai1wm-button-green-small[disabled=disabled]:hover,.ai1wm-button-green[disabled=disabled]:hover,.ai1wm-button-red[disabled=disabled]:hover{background:100% 0}.ai1wm-message-close-button{position:absolute;left:10px;top:6px;text-decoration:none;font-size:10px}input[type=radio].ai1wm-flat-radio-button{display:none}input[type=radio].ai1wm-flat-radio-button+a i,input[type=radio].ai1wm-flat-radio-button+label i{vertical-align:middle;float:right;width:25px;height:25px;border-radius:50%;background:100% 0;border:2px solid #ccc;content:" ";cursor:pointer;position:relative;box-sizing:content-box}input[type=radio].ai1wm-flat-radio-button:checked+a i,input[type=radio].ai1wm-flat-radio-button:checked+label i{background-color:#d9d9d9;border-color:#6f6f6f}.ai1wm-icon-update{font-size:13px;padding:0;margin:0;font-weight:400}.ai1wm-icon-update:before{color:#d54e21;content:"\f463";display:inline-block;font:20px/1 "dashicons";speak:none;padding:0;margin:0;vertical-align:top}.ai1wm-modal-dialog{position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,.7);z-index:99999;opacity:0;transition:opacity 400ms ease-in;pointer-events:none}.ai1wm-modal-dialog:target{opacity:1;pointer-events:auto}.ai1wm-modal-dialog .ai1wm-modal-container{position:fixed;top:50%;right:50%;z-index:100002;width:480px;height:auto;padding:6px 16px 10px;-webkit-transform:translate(240px,-94px);transform:translate(240px,-94px);border:1px solid #fff;box-shadow:0 2px 6px #292929;border-radius:6px;background:#f6f6f6;box-sizing:border-box}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-error{color:red}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-modal-buttons{text-align:right}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-id{width:100%;padding:6px}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-help-link{font-weight:700}.ai1wm-modal-dialog .ai1wm-modal-container .ai1wm-purchase-discard{margin-right:1em}.ai1wm-error-message,.ai1wm-update-message{padding:0;margin:0;color:red} \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.eot b/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.eot new file mode 100644 index 0000000..416c44b Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.eot differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.svg b/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.svg new file mode 100644 index 0000000..813651a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.svg @@ -0,0 +1,51 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.ttf b/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.ttf new file mode 100644 index 0000000..82132cf Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.ttf differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.woff b/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.woff new file mode 100644 index 0000000..3ab5976 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/font/servmask.woff differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/ajax-loader.gif b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/ajax-loader.gif new file mode 100644 index 0000000..0dc0b91 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/ajax-loader.gif differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-128x128.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-128x128.png new file mode 100644 index 0000000..723ef23 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-128x128.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-20x20.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-20x20.png new file mode 100644 index 0000000..dcbfcc8 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-20x20.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-32x32.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-32x32.png new file mode 100644 index 0000000..ea281a2 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo-32x32.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo.svg b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo.svg new file mode 100644 index 0000000..545d816 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/logo.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/database.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/database.png new file mode 100644 index 0000000..203c923 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/database.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/media-files.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/media-files.png new file mode 100644 index 0000000..6e53a19 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/media-files.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/plugins.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/plugins.png new file mode 100644 index 0000000..53ca782 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/plugins.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/reset-all.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/reset-all.png new file mode 100644 index 0000000..d7f8312 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/reset-all.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/screen.jpg b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/screen.jpg new file mode 100644 index 0000000..c01a792 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/screen.jpg differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/star.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/star.png new file mode 100644 index 0000000..6ede45b Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/star.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/themes.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/themes.png new file mode 100644 index 0000000..bf072ba Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/reset/themes.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/backup-scheduler.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/backup-scheduler.png new file mode 100644 index 0000000..6c931a2 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/backup-scheduler.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/dropbox-storage.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/dropbox-storage.png new file mode 100644 index 0000000..5e6638c Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/dropbox-storage.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/ftp-storage.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/ftp-storage.png new file mode 100644 index 0000000..97ab5c0 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/ftp-storage.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/google-drive-storage.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/google-drive-storage.png new file mode 100644 index 0000000..0dc3d77 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/google-drive-storage.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/more-storage-providers.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/more-storage-providers.png new file mode 100644 index 0000000..9a0f0bf Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/more-storage-providers.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/multisite-schedules.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/multisite-schedules.png new file mode 100644 index 0000000..859df55 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/multisite-schedules.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/notification-settings.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/notification-settings.png new file mode 100644 index 0000000..e06ce10 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/notification-settings.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/onedrive-storage.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/onedrive-storage.png new file mode 100644 index 0000000..e13c93f Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/onedrive-storage.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/retention-settings.png b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/retention-settings.png new file mode 100644 index 0000000..4c331b6 Binary files /dev/null and b/plugin-file/all-in-one-wp-migration/lib/view/assets/img/schedules/retention-settings.png differ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/backups.min.js b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/backups.min.js new file mode 100644 index 0000000..b08ef58 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/backups.min.js @@ -0,0 +1,2809 @@ +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 874: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Import = __webpack_require__(936); + +var Restore = function Restore() { + var model = new Import(); + model.setStatus({ + type: 'pro', + message: ai1wm_locale.restore_from_file + }); +}; + +module.exports = Restore; + +/***/ }), + +/***/ 12: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Modal = __webpack_require__(326), + $ = jQuery; + +var Export = function Export() { + var self = this; // Set params + + this.params = []; // Set modal + + this.modal = new Modal(); // Set stop listener + + this.modal.onStop = function (options) { + self.onStop(options); + }; +}; + +Export.prototype.setParams = function (params) { + this.params = Ai1wm.Util.list(params); +}; + +Export.prototype.start = function (options, retries) { + var self = this; + retries = retries || 0; // Reset stop flag + + if (retries === 0) { + this.stopExport(false); + } // Stop running export + + + if (this.isExportStopped()) { + return; + } // Initializing beforeunload event + + + $(window).bind('beforeunload', function () { + return ai1wm_locale.stop_exporting_your_website; + }); // Set initial status + + this.setStatus({ + type: 'info', + message: ai1wm_locale.preparing_to_export + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_export.secret_key + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Export + + + $.ajax({ + url: ai1wm_export.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: ai1wm_locale.unable_to_start_the_export + }); + return; + } + + retries++; + setTimeout(self.start.bind(self, options, retries), timeout); + }); +}; + +Export.prototype.run = function (params, retries) { + var self = this; + retries = retries || 0; // Stop running export + + if (this.isExportStopped()) { + return; + } // Export + + + $.ajax({ + url: ai1wm_export.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: ai1wm_locale.unable_to_run_the_export + }); + return; + } + + retries++; + setTimeout(self.run.bind(self, params, retries), timeout); + }); +}; + +Export.prototype.clean = function (options, retries) { + var self = this; + retries = retries || 0; // Reset stop flag + + if (retries === 0) { + this.stopExport(true); + } // Set initial status + + + this.setStatus({ + type: 'info', + message: ai1wm_locale.please_wait_stopping_the_export + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_export.secret_key + }).concat({ + name: 'priority', + value: 300 + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Clean + + + $.ajax({ + url: ai1wm_export.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + // Unbinding the beforeunload event when we stop exporting + $(window).unbind('beforeunload'); // Destroy modal + + self.modal.destroy(); + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: ai1wm_locale.unable_to_stop_the_export + }); + return; + } + + retries++; + setTimeout(self.clean.bind(self, options, retries), timeout); + }); +}; + +Export.prototype.getStatus = function () { + var self = this; // Stop getting status + + if (this.isExportStopped()) { + return; + } + + this.statusXhr = $.ajax({ + url: ai1wm_export.status.url, + type: 'GET', + dataType: 'json', + cache: false, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (params) { + if (params) { + self.setStatus(params); // Next status + + switch (params.type) { + case 'done': + case 'error': + case 'download': + // Unbinding beforeunload event when any case is performed + $(window).unbind('beforeunload'); + return; + } + } // Export is not done yet, let's check status in 3 seconds + + + setTimeout(self.getStatus.bind(self), 3000); + }).fail(function () { + // Export is not done yet, let's check status in 3 seconds + setTimeout(self.getStatus.bind(self), 3000); + }); +}; + +Export.prototype.setStatus = function (params) { + this.modal.render(params); +}; + +Export.prototype.onStop = function (options) { + this.clean(options); +}; + +Export.prototype.stopExport = function (isStopped) { + try { + if (isStopped && this.statusXhr) { + this.statusXhr.abort(); + } + } finally { + this.isStopped = isStopped; + } +}; + +Export.prototype.isExportStopped = function () { + return this.isStopped; +}; + +module.exports = Export; + +/***/ }), + +/***/ 326: +/***/ (function(module) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var $ = jQuery; + +var Modal = function Modal() { + var self = this; // Error Modal + + this.error = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-red').text(params.title); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_export); // Append close button to action + + action.append(closeButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Info Modal + + + this.info = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold loader + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create loader + + var loader = $(''); // Create stop export + + var stopButton = $('').on('click', function () { + stopButton.attr('disabled', 'disabled'); + self.onStop(); + }); // Append text to stop button + + stopButton.append(' ' + ai1wm_locale.stop_export); // Append stop button to action + + action.append(stopButton); // Append loader to header + + header.append(loader); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Done Modal + + + this.done = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-green').text(params.title); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_export); // Append close button to action + + action.append(closeButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Download Modal + + + this.download = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); + var counter = $('.ai1wm-menu-count'); // Update counter text + + counter.text(+counter.text() + 1); + + if (counter.text() > 1) { + counter.prop('title', ai1wm_locale.backups_count_plural.replace('%d', counter.text())); + } else { + counter.removeClass('ai1wm-menu-hide'); + counter.prop('title', ai1wm_locale.backups_count_singular.replace('%d', counter.text())); + } // Append text to close button + + + closeButton.append(ai1wm_locale.close_export); // Append close button to action + + action.append(closeButton); // Append message to section + + section.append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Create the overlay + + + this.overlay = $('
'); // Create the modal container + + this.modal = $(''); + $('body').append(this.overlay) // Append overlay to body + .append(this.modal); // Append modal to body +}; + +Modal.prototype.render = function (params) { + $(document).trigger('ai1wm-export-status', params); // Show modal + + switch (params.type) { + case 'error': + this.error(params); + break; + + case 'info': + this.info(params); + break; + + case 'done': + this.done(params); + break; + + case 'download': + this.download(params); + break; + } +}; + +Modal.prototype.destroy = function () { + this.modal.hide(); + this.overlay.hide(); +}; + +module.exports = Modal; + +/***/ }), + +/***/ 936: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Modal = __webpack_require__(544), + $ = jQuery; + +var Import = function Import() { + var self = this; // Set params + + this.params = []; // Set modal + + this.modal = new Modal(); // Set confirm listener + + this.modal.onConfirm = function (options) { + self.onConfirm(options); + }; // Set blogs listener + + + this.modal.onBlogs = function (options) { + self.onBlogs(options); + }; // Set stop listener + + + this.modal.onStop = function (options) { + self.onStop(options); + }; // Set disk space listener + + + this.modal.onDiskSpaceConfirm = function (options) { + self.onDiskSpaceConfirm(options); + }; // Set decrypt password listener + + + this.modal.onDecryptPassword = function (password, options) { + self.onDecryptPassword(password, options); + }; +}; + +Import.prototype.setParams = function (params) { + this.params = Ai1wm.Util.list(params); +}; + +Import.prototype.start = function (options, retries) { + var self = this; + retries = retries || 0; // Reset stop flag + + if (retries === 0) { + this.stopImport(false); + } // Stop running import + + + if (this.isImportStopped()) { + return; + } // Initializing beforeunload event + + + $(window).bind('beforeunload', function () { + return ai1wm_locale.stop_importing_your_website; + }); // Set initial status + + this.setStatus({ + type: 'info', + message: ai1wm_locale.preparing_to_import + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Import + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_start_the_import + }); + return; + } + + retries++; + setTimeout(self.start.bind(self, options, retries), timeout); + }); +}; + +Import.prototype.run = function (params, retries) { + var self = this; + retries = retries || 0; // Stop running import + + if (this.isImportStopped()) { + return; + } // Import + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + retries++; + setTimeout(self.run.bind(self, params, retries), timeout); + }); +}; + +Import.prototype.decryptPassword = function (options, password, retries) { + var self = this; + retries = retries || 0; // Stop running import + + if (this.isImportStopped()) { + return; + } + + this.params = this.params.concat({ + name: 'decryption_password', + value: password + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }).concat({ + name: 'priority', + value: 90 + }); + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_check_decryption_password + }); + return; + } + + retries++; + setTimeout(self.decryptPassword.bind(self, options, password, retries), timeout); + }); +}; + +Import.prototype.confirm = function (options, retries) { + var self = this; + retries = retries || 0; // Stop running import + + if (this.isImportStopped()) { + return; + } // Set params + + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }).concat({ + name: 'priority', + value: 150 + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Confirm + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_confirm_the_import + }); + return; + } + + retries++; + setTimeout(self.confirm.bind(self, options, retries), timeout); + }); +}; + +Import.prototype.checkDiskSpace = function (fileSize, callback) { + this.diskSpaceCallback = callback; + var diskSpaceFree = parseInt(ai1wm_disk_space.free, 10); + var diskSpaceFactor = parseInt(ai1wm_disk_space.factor, 10); + var diskSpaceExtra = parseInt(ai1wm_disk_space.extra, 10); + + if (diskSpaceFree >= 0) { + var diskSpaceRequired = fileSize * diskSpaceFactor + diskSpaceExtra; + + if (diskSpaceRequired > diskSpaceFree) { + this.setStatus({ + type: 'disk_space_confirm', + message: ai1wm_locale.out_of_disk_space.replace('%s', Ai1wm.Util.sizeFormat(diskSpaceRequired - diskSpaceFree)) + }); + return; + } + } + + callback(); +}; + +Import.prototype.blogs = function (options, retries) { + var self = this; + retries = retries || 0; // Stop running import + + if (this.isImportStopped()) { + return; + } // Set params + + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }).concat({ + name: 'priority', + value: 150 + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Blogs + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_prepare_blogs_on_import + }); + return; + } + + retries++; + setTimeout(self.blogs.bind(self, options, retries), timeout); + }); +}; + +Import.prototype.clean = function (options, retries) { + var self = this; + retries = retries || 0; // Reset stop flag + + if (retries === 0) { + this.stopImport(true); + } // Set initial status + + + this.setStatus({ + type: 'info', + message: ai1wm_locale.please_wait_stopping_the_import + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }).concat({ + name: 'priority', + value: 400 + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Clean + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + // Unbinding the beforeunload event when we stop importing + $(window).unbind('beforeunload'); // Destroy modal + + self.modal.destroy(); + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_stop_the_import + }); + return; + } + + retries++; + setTimeout(self.clean.bind(self, options, retries), timeout); + }); +}; + +Import.prototype.getStatus = function () { + var self = this; // Stop getting status + + if (this.isImportStopped()) { + return; + } + + this.statusXhr = $.ajax({ + url: ai1wm_import.status.url, + type: 'GET', + dataType: 'json', + cache: false, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (params) { + if (params) { + self.setStatus(params); // Next status + + switch (params.type) { + case 'done': + case 'error': + // Unbinding the beforeunload event when any case is performed + $(window).unbind('beforeunload'); + return; + + case 'confirm': + case 'disk_space_confirm': + case 'blogs': + case 'backup_is_encrypted': + return; + } + } // Import is not done yet, let's check status in 3 seconds + + + setTimeout(self.getStatus.bind(self), 3000); + }).fail(function () { + // Import is not done yet, let's check status in 3 seconds + setTimeout(self.getStatus.bind(self), 3000); + }); +}; + +Import.prototype.setStatus = function (params) { + this.modal.render(params); +}; + +Import.prototype.onConfirm = function (options) { + this.confirm(options); +}; + +Import.prototype.onDecryptPassword = function (password, options) { + this.decryptPassword(options, password); +}; + +Import.prototype.onBlogs = function (options) { + this.blogs(options); +}; + +Import.prototype.onStop = function (options) { + this.clean(options); +}; + +Import.prototype.onDiskSpaceConfirm = function (options) { + this.diskSpaceCallback(options); +}; + +Import.prototype.stopImport = function (isStopped) { + try { + if (isStopped && this.statusXhr) { + this.statusXhr.abort(); + } + } finally { + this.isStopped = isStopped; + } +}; + +Import.prototype.isImportStopped = function () { + return this.isStopped; +}; + +module.exports = Import; + +/***/ }), + +/***/ 544: +/***/ (function(module) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var $ = jQuery; + +var Modal = function Modal() { + var self = this; // Error Modal + + this.error = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-red').text(params.title); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append close button to action + + action.append(closeButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Progress Modal + + + this.progress = function (params) { + // Update progress bar meter + if (this.progress.progressBarMeter) { + this.progress.progressBarMeter.width(params.percent + '%'); + } // Update progress bar percent + + + if (this.progress.progressBarPercent) { + this.progress.progressBarPercent.text(params.percent + '%'); + return; + } // Create the modal container + + + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold progress bar + + var header = $('

'); // Create action section + + var action = $('
'); // Create progress bar + + var progressBar = $(''); // Create progress bar meter + + this.progress.progressBarMeter = $('').width(params.percent + '%'); // Create progress bar percent + + this.progress.progressBarPercent = $('').text(params.percent + '%'); // Create stop import + + var stopButton = $('').on('click', function () { + stopButton.attr('disabled', 'disabled'); + self.onStop(); + }); // Append text to stop button + + stopButton.append(' ' + ai1wm_locale.stop_import); // Append progress meter and progress percent + + progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent); // Append stop button to action + + action.append(stopButton); // Append progress bar to section + + header.append(progressBar); // Append header to section + + section.append(header); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Pro Modal + + + this.pro = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold warning + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create warning + + var warning = $(''); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append close button to action + + action.append(closeButton); // Append warning to section + + header.append(warning); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Confirm Modal + + + this.confirm = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold warning + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create warning + + var warning = $(''); // Create close button + + var closeButton = $('').on('click', function () { + closeButton.attr('disabled', 'disabled'); + self.onStop(); + }); // Create confirm button + + var confirmButton = $('').on('click', function () { + confirmButton.attr('disabled', 'disabled'); + self.onConfirm(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append text to confirm button + + confirmButton.append(ai1wm_locale.confirm_import + ' >'); // Append close button to action + + action.append(closeButton); // Append confirm button to action + + action.append(confirmButton); // Append warning to section + + header.append(warning); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Disk space Confirm Modal + + + this.diskSpaceConfirm = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold warning + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create warning + + var warning = $(''); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Create confirm button + + var confirmButton = $('').on('click', function () { + $(this).attr('disabled', 'disabled'); + self.onDiskSpaceConfirm(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append text to confirm button + + confirmButton.append(ai1wm_locale.confirm_disk_space); // Append close button to action + + action.append(closeButton); // Append confirm button to action + + action.append(confirmButton); // Append warning to section + + header.append(warning); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Blogs Modal + + + this.blogs = function (params) { + // Create the modal container + var container = $('
').on('submit', function (e) { + e.preventDefault(); + continueButton.attr('disabled', 'disabled'); + self.onBlogs(container.serializeArray()); + }); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-grey').text(params.title); // Create continue button + + var continueButton = $(''); // Append text to continue button + + continueButton.append(ai1wm_locale.continue_import); // Append continue button to action + + action.append(continueButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Info Modal + + + this.info = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold loader + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create loader + + var loader = $(''); // Create warning + + var warning = $('

').html(ai1wm_locale.please_do_not_close_this_browser); // Create notice to be displayed during import process + + var notice = $('
'); // Append warning to notice + + notice.append(warning); // Append stop button to action + + action.append(notice); // Append loader to header + + header.append(loader); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Done Modal + + + this.done = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-green').text(params.title); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.finish_import + ' >'); // Append close button to action + + action.append(closeButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; + + this.backup_is_encrypted = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

').html(ai1wm_locale.backup_encrypted); + var message = $('

').html(ai1wm_locale.backup_encrypted_message); + var confirmButton = $('').on('click', function () { + var password = $('#ai1wm-backup-decrypt-password'); + var passwordConfirmation = $('#ai1wm-backup-decrypt-password-confirmation'); + + if (password.val().length && password.val() === passwordConfirmation.val()) { + confirmButton.attr('disabled', 'disabled'); + self.onDecryptPassword(password.val()); + } else { + passwordConfirmation.parent().addClass('ai1wm-has-error'); + password.parent().addClass('ai1wm-has-error'); + } + }); + var closeButton = $('').on('click', function () { + closeButton.attr('disabled', 'disabled'); + self.onStop(); + }); + var form = $('
'); + var passwordContainer = $('
'); + var passwordInput = $('').prop('placeholder', ai1wm_locale.enter_password).on('keyup', function () { + var password = $(this); + var passwordConfirmation = $('#ai1wm-backup-decrypt-password-confirmation'); + + if (password.val() !== passwordConfirmation.val()) { + passwordConfirmation.parent().addClass('ai1wm-has-error'); + password.parent().addClass('ai1wm-has-error'); + } else { + password.parent().removeClass('ai1wm-has-error'); + passwordConfirmation.parent().removeClass('ai1wm-has-error'); + } + }); + var passwordView = $('').on('click', function () { + $(this).toggleClass('ai1wm-icon-eye ai1wm-icon-eye-blocked'); + $(this).prev().prop('type', function (index, oldPropertyValue) { + return oldPropertyValue === 'text' ? 'password' : 'text'; + }); + return false; + }); + passwordContainer.append(passwordInput).append(passwordView); + + if (params.error) { + passwordContainer.addClass('ai1wm-has-error'); + var passwordError = $('
').html(params.error); + passwordContainer.append(passwordError); + } + + var passwordConfirmationContainer = $('
'); + var passwordConfirmationInput = $('').prop('placeholder', ai1wm_locale.repeat_password).on('keyup', function () { + var passwordConfirmation = $(this); + var password = $('#ai1wm-backup-decrypt-password'); + + if (passwordInput.val() !== passwordConfirmation.val()) { + password.parent().addClass('ai1wm-has-error'); + passwordConfirmation.parent().addClass('ai1wm-has-error'); + } else { + password.parent().removeClass('ai1wm-has-error'); + passwordConfirmation.parent().removeClass('ai1wm-has-error'); + } + }); + var passwordConfirmationView = $('').on('click', function () { + $(this).toggleClass('ai1wm-icon-eye ai1wm-icon-eye-blocked'); + $(this).prev().prop('type', function (index, oldPropertyValue) { + return oldPropertyValue === 'text' ? 'password' : 'text'; + }); + return false; + }); + var passwordConfirmationError = $('
').html(ai1wm_locale.passwords_do_not_match); + passwordConfirmationContainer.append(passwordConfirmationInput).append(passwordConfirmationView).append(passwordConfirmationError); + confirmButton.append(ai1wm_locale.submit); + closeButton.append(ai1wm_locale.close_import); + var buttonContainer = $('
'); + buttonContainer.append(closeButton).append(confirmButton); + form.append(passwordContainer).append(passwordConfirmationContainer); // Append header and message to section + + section.append(header).append(message).append(form).append(buttonContainer); // Append section and action to container + + container.append(section); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Server cannot decrypt Modal + + + this.server_cannot_decrypt = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create warning + + var warning = $(''); // Create action section + + var action = $('
'); // Create close button + + var closeButton = $('').on('click', function () { + closeButton.attr('disabled', 'disabled'); + self.onStop(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append close button to action + + action.append(closeButton); // Append warning to header + + header.append(warning); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Create the overlay + + + this.overlay = $('
'); // Create the modal container + + this.modal = $(''); + $('body').append(this.overlay) // Append overlay to body + .append(this.modal); // Append modal to body +}; + +Modal.prototype.render = function (params) { + $(document).trigger('ai1wm-import-status', params); // Show modal + + switch (params.type) { + case 'pro': + this.pro(params); + break; + + case 'error': + this.error(params); + break; + + case 'confirm': + this.confirm(params); + break; + + case 'disk_space_confirm': + this.diskSpaceConfirm(params); + break; + + case 'blogs': + this.blogs(params); + break; + + case 'progress': + this.progress(params); + break; + + case 'info': + this.info(params); + break; + + case 'done': + this.done(params); + break; + + case 'backup_is_encrypted': + this.backup_is_encrypted(params); + break; + + case 'server_cannot_decrypt': + this.server_cannot_decrypt(params); + break; + } +}; + +Modal.prototype.destroy = function () { + this.modal.hide(); + this.overlay.hide(); // Reset progress bar + + this.progress.progressBarMeter = null; + this.progress.progressBarPercent = null; +}; + +module.exports = Modal; + +/***/ }), + +/***/ 332: +/***/ (function() { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +jQuery(document).ready(function ($) { + 'use strict'; // Idea + + $('#ai1wm-feedback-type-link-1').on('click', function () { + var radio = $('#ai1wm-feedback-type-1'); + + if (radio.is(':checked')) { + radio.attr('checked', false); + } else { + radio.attr('checked', true); + } + }); // Help + + $('#ai1wm-feedback-type-2').on('click', function () { + // Hide other options + $('#ai1wm-feedback-type-1').closest('li').hide(); // Change placeholder message + + $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you); // Show feedback form + + $('.ai1wm-feedback-form').fadeIn(); + }); // Cancel feedback form + + $('#ai1wm-feedback-cancel').on('click', function (e) { + $('.ai1wm-feedback-form').fadeOut(function () { + $('.ai1wm-feedback-type').attr('checked', false).closest('li').show(); + }); + e.preventDefault(); + }); // Send feedback form + + $('#ai1wm-feedback-submit').on('click', function (e) { + var self = $(this); + var spinner = self.next(); + var type = $('.ai1wm-feedback-type:checked').val(); + var email = $('.ai1wm-feedback-email').val(); + var message = $('.ai1wm-feedback-message').val(); + var terms = $('.ai1wm-feedback-terms').is(':checked'); + self.attr('disabled', true); + spinner.css('visibility', 'visible'); + $.ajax({ + url: ai1wm_feedback.ajax.url, + type: 'POST', + dataType: 'json', + async: true, + data: { + secret_key: ai1wm_feedback.secret_key, + ai1wm_type: type, + ai1wm_email: email, + ai1wm_message: message, + ai1wm_terms: +terms + }, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (data) { + self.attr('disabled', false); + spinner.css('visibility', 'hidden'); + + if (data.errors.length > 0) { + $('.ai1wm-feedback .ai1wm-message').remove(); + var errorMessage = $('
').addClass('ai1wm-message ai1wm-error-message'); + $.each(data.errors, function (key, value) { + errorMessage.append($('

').text(value)); + }); + $('.ai1wm-feedback').prepend(errorMessage); + } else { + var successMessage = $('

').addClass('ai1wm-message ai1wm-success-message'); + successMessage.append($('

').text(ai1wm_locale.thanks_for_submitting_your_feedback)); + $('.ai1wm-feedback').html(successMessage); + } + }); + e.preventDefault(); + }); +}); + +/***/ }), + +/***/ 162: +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(a,b){if(true)!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (b), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof __webpack_require__.g&&__webpack_require__.g.global===__webpack_require__.g?__webpack_require__.g:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g, true&&(module.exports=g)}); + +//# sourceMappingURL=FileSaver.min.js.map + +/***/ }), + +/***/ 317: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +/*! + * Vue.js v2.7.5 + * (c) 2014-2022 Evan You + * Released under the MIT License. + */ +/*! + * Vue.js v2.7.5 + * (c) 2014-2022 Evan You + * Released under the MIT License. + */ +const t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function o(t){return null!=t}function r(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function i(t){return"function"==typeof t}function c(t){return null!==t&&"object"==typeof t}const a=Object.prototype.toString;function l(t){return"[object Object]"===a.call(t)}function u(t){const e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return o(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||l(t)&&t.toString===a?JSON.stringify(t,null,2):String(t)}function p(t){const e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){const n=Object.create(null),o=t.split(",");for(let t=0;tn[t.toLowerCase()]:t=>n[t]}const m=h("slot,component",!0),g=h("key,ref,slot,slot-scope,is");function v(t,e){if(t.length){const n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}const y=Object.prototype.hasOwnProperty;function _(t,e){return y.call(t,e)}function $(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}const b=/-(\w)/g,w=$((t=>t.replace(b,((t,e)=>e?e.toUpperCase():"")))),x=$((t=>t.charAt(0).toUpperCase()+t.slice(1))),C=/\B([A-Z])/g,k=$((t=>t.replace(C,"-$1").toLowerCase()));const S=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){const o=arguments.length;return o?o>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;let n=t.length-e;const o=new Array(n);for(;n--;)o[n]=t[n+e];return o}function T(t,e){for(const n in e)t[n]=e[n];return t}function A(t){const e={};for(let n=0;n!1,N=t=>t;function D(t,e){if(t===e)return!0;const n=c(t),o=c(e);if(!n||!o)return!n&&!o&&String(t)===String(e);try{const n=Array.isArray(t),o=Array.isArray(e);if(n&&o)return t.length===e.length&&t.every(((t,n)=>D(t,e[n])));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(n||o)return!1;{const n=Object.keys(t),o=Object.keys(e);return n.length===o.length&&n.every((n=>D(t[n],e[n])))}}catch(t){return!1}}function M(t,e){for(let n=0;n0,Z=J&&J.indexOf("edge/")>0;J&&J.indexOf("android");const G=J&&/iphone|ipad|ipod|ios/.test(J);J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J);const X=J&&J.match(/firefox\/(\d+)/),Y={}.watch;let Q,tt=!1;if(K)try{const t={};Object.defineProperty(t,"passive",{get(){tt=!0}}),window.addEventListener("test-passive",null,t)}catch(t){}const et=()=>(void 0===Q&&(Q=!K&&"undefined"!=typeof __webpack_require__.g&&(__webpack_require__.g.process&&"server"===__webpack_require__.g.process.env.VUE_ENV)),Q),nt=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ot(t){return"function"==typeof t&&/native code/.test(t.toString())}const rt="undefined"!=typeof Symbol&&ot(Symbol)&&"undefined"!=typeof Reflect&&ot(Reflect.ownKeys);let st;st="undefined"!=typeof Set&&ot(Set)?Set:class{constructor(){this.set=Object.create(null)}has(t){return!0===this.set[t]}add(t){this.set[t]=!0}clear(){this.set=Object.create(null)}};let it=null;function ct(t=null){t||it&&it._scope.off(),it=t,t&&t._scope.on()}class at{constructor(t,e,n,o,r,s,i,c){this.tag=t,this.data=e,this.children=n,this.text=o,this.elm=r,this.ns=void 0,this.context=s,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=i,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=c,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}get child(){return this.componentInstance}}const lt=(t="")=>{const e=new at;return e.text=t,e.isComment=!0,e};function ut(t){return new at(void 0,void 0,void 0,String(t))}function ft(t){const e=new at(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}let dt=0;class pt{constructor(){this.id=dt++,this.subs=[]}addSub(t){this.subs.push(t)}removeSub(t){v(this.subs,t)}depend(t){pt.target&&pt.target.addDep(this)}notify(t){const e=this.subs.slice();for(let t=0,n=e.length;t{const t=e[n];if(Pt(t))return t.value;{const e=t&&t.__ob__;return e&&e.dep.depend(),t}},set:t=>{const o=e[n];Pt(o)&&!Pt(t)?o.value=t:e[n]=t}})}function Lt(t,e,n){const o=t[e];if(Pt(o))return o;const r={get value(){const o=t[e];return void 0===o?n:o},set value(n){t[e]=n}};return U(r,"__v_isRef",!0),r}function Ft(t){return Ht(t,!1)}function Ht(t,e){if(!l(t))return t;if(Mt(t))return t;const n=e?"__v_rawToShallowReadonly":"__v_rawToReadonly",o=t[n];if(o)return o;const r=Object.create(Object.getPrototypeOf(t));U(t,n,r),U(r,"__v_isReadonly",!0),U(r,"__v_raw",t),Pt(t)&&U(r,"__v_isRef",!0),(e||Dt(t))&&U(r,"__v_isShallow",!0);const s=Object.keys(t);for(let n=0;n{const e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),o="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=o?t.slice(1):t,once:n,capture:o,passive:e}}));function zt(t,n){function o(){const t=o.fns;if(!e(t))return en(t,null,arguments,n,"v-on handler");{const e=t.slice();for(let t=0;t0&&(l=Zt(l,`${i||""}_${a}`),Wt(l[0])&&Wt(f)&&(c[u]=ut(f.text+l[0].text),l.shift()),c.push.apply(c,l)):s(l)?Wt(f)?c[u]=ut(f.text+l):""!==l&&c.push(ut(l)):Wt(l)&&Wt(f)?c[u]=ut(f.text+l.text):(r(t._isVList)&&o(l.tag)&&n(l.key)&&o(i)&&(l.key=`__vlist${i}_${a}__`),c.push(l)));return c}function Gt(t,n,a,l,u,f){return(e(a)||s(a))&&(u=l,l=a,a=void 0),r(f)&&(u=2),function(t,n,r,s,a){if(o(r)&&o(r.__ob__))return lt();o(r)&&o(r.is)&&(n=r.is);if(!n)return lt();e(s)&&i(s[0])&&((r=r||{}).scopedSlots={default:s[0]},s.length=0);2===a?s=qt(s):1===a&&(s=function(t){for(let n=0;n0,c=n?!!n.$stable:!i,a=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(c&&r&&r!==t&&a===r.$key&&!i&&!r.$hasNormal)return r;s={};for(const t in n)n[t]&&"$"!==t[0]&&(s[t]=ve(e,o,t,n[t]))}else s={};for(const t in o)t in s||(s[t]=ye(o,t));return n&&Object.isExtensible(n)&&(n._normalized=s),U(s,"$stable",c),U(s,"$key",a),U(s,"$hasNormal",i),s}function ve(t,n,o,r){const s=function(){const n=it;ct(t);let o=arguments.length?r.apply(null,arguments):r({});o=o&&"object"==typeof o&&!e(o)?[o]:qt(o);const s=o&&o[0];return ct(n),o&&(!s||1===o.length&&s.isComment&&!me(s))?void 0:o};return r.proxy&&Object.defineProperty(n,o,{get:s,enumerable:!0,configurable:!0}),s}function ye(t,e){return()=>t[e]}function _e(e){return{get attrs(){return function(e){if(!e._attrsProxy){const n=e._attrsProxy={};U(n,"_v_attr_proxy",!0),$e(n,e.$attrs,t,e)}return e._attrsProxy}(e)},get slots(){return function(t){t._slotsProxy||we(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:S(e.$emit,e),expose(t){t&&Object.keys(t).forEach((n=>Rt(e,t,n)))}}}function $e(t,e,n,o){let r=!1;for(const s in e)s in t?e[s]!==n[s]&&(r=!0):(r=!0,be(t,s,o));for(const n in t)n in e||(r=!0,delete t[n]);return r}function be(t,e,n){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:()=>n.$attrs[e]})}function we(t,e){for(const n in e)t[n]=e[n];for(const n in t)n in e||delete t[n]}function xe(){const t=it;return t._setupContext||(t._setupContext=_e(t))}let Ce,ke=null;function Se(t,e){return(t.__esModule||rt&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function Oe(t){if(e(t))for(let e=0;e{Ne=e}}function Me(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Pe(t,e){if(e){if(t._directInactive=!1,Me(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(let e=0;edocument.createEvent("Event").timeStamp&&(Ke=()=>t.now())}function Je(){let t,e;for(Ve=Ke(),Ue=!0,Le.sort(((t,e)=>t.id-e.id)),ze=0;zeze&&Le[e].id>t.id;)e--;Le.splice(e+1,0,t)}else Le.push(t);Be||(Be=!0,un(Je))}}function We(t,e){return Ge(t,null,{flush:"post"})}const Ze={};function Ge(n,o,{immediate:r,deep:s,flush:c="pre",onTrack:a,onTrigger:l}=t){const u=it,f=(t,e,n=null)=>en(t,null,n,u,e);let d,p,h=!1,m=!1;if(Pt(n)?(d=()=>n.value,h=Dt(n)):Nt(n)?(d=()=>(n.__ob__.dep.depend(),n),s=!0):e(n)?(m=!0,h=n.some((t=>Nt(t)||Dt(t))),d=()=>n.map((t=>Pt(t)?t.value:Nt(t)?Sn(t):i(t)?f(t,"watcher getter"):void 0))):d=i(n)?o?()=>f(n,"watcher getter"):()=>{if(!u||!u._isDestroyed)return p&&p(),f(n,"watcher",[g])}:j,o&&s){const t=d;d=()=>Sn(t())}let g=t=>{p=v.onStop=()=>{f(t,"watcher cleanup")}};if(et())return g=j,o?r&&f(o,"watcher callback",[d(),m?[]:void 0,g]):d(),j;const v=new An(it,d,j,{lazy:!0});v.noRecurse=!o;let y=m?[]:Ze;return v.run=()=>{if(v.active||"pre"===c&&u&&u._isBeingDestroyed)if(o){const t=v.get();(s||h||(m?t.some(((t,e)=>I(t,y[e]))):I(t,y)))&&(p&&p(),f(o,"watcher callback",[t,y===Ze?void 0:y,g]),y=t)}else v.get()},"sync"===c?v.update=v.run:"post"===c?(v.id=1/0,v.update=()=>qe(v)):v.update=()=>{if(u&&u===it&&!u._isMounted){const t=u._preWatchers||(u._preWatchers=[]);t.indexOf(v)<0&&t.push(v)}else qe(v)},o?r?v.run():y=v.get():"post"===c&&u?u.$once("hook:mounted",(()=>v.get())):v.get(),()=>{v.teardown()}}let Xe;class Ye{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Xe&&(this.parent=Xe,this.index=(Xe.scopes||(Xe.scopes=[])).push(this)-1)}run(t){if(this.active){const e=Xe;try{return Xe=this,t()}finally{Xe=e}}}on(){Xe=this}off(){Xe=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;etn(t,o,r+" (Promise/async)"))),s._handled=!0)}catch(t){tn(t,o,r)}return s}function nn(t,e,n){if(F.errorHandler)try{return F.errorHandler.call(null,t,e,n)}catch(e){e!==t&&on(e)}on(t)}function on(t,e,n){if(!K||"undefined"==typeof console)throw t;console.error(t)}let rn=!1;const sn=[];let cn,an=!1;function ln(){an=!1;const t=sn.slice(0);sn.length=0;for(let e=0;e{t.then(ln),G&&setTimeout(j)},rn=!0}else if(q||"undefined"==typeof MutationObserver||!ot(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())cn="undefined"!=typeof setImmediate&&ot(setImmediate)?()=>{setImmediate(ln)}:()=>{setTimeout(ln,0)};else{let t=1;const e=new MutationObserver(ln),n=document.createTextNode(String(t));e.observe(n,{characterData:!0}),cn=()=>{t=(t+1)%2,n.data=String(t)},rn=!0}function un(t,e){let n;if(sn.push((()=>{if(t)try{t.call(e)}catch(t){tn(t,e,"nextTick")}else n&&n(e)})),an||(an=!0,cn()),!t&&"undefined"!=typeof Promise)return new Promise((t=>{n=t}))}function fn(t){return(e,n=it)=>{if(n)return function(t,e,n){const o=t.$options;o[e]=Qn(o[e],n)}(n,t,e)}}const dn=fn("beforeMount"),pn=fn("mounted"),hn=fn("beforeUpdate"),mn=fn("updated"),gn=fn("beforeDestroy"),vn=fn("destroyed"),yn=fn("errorCaptured"),_n=fn("activated"),$n=fn("deactivated"),bn=fn("serverPrefetch"),wn=fn("renderTracked"),xn=fn("renderTriggered");var Cn=Object.freeze({__proto__:null,version:"2.7.5",defineComponent:function(t){return t},ref:function(t){return It(t,!1)},shallowRef:function(t){return It(t,!0)},isRef:Pt,toRef:Lt,toRefs:function(t){const n=e(t)?new Array(t.length):{};for(const e in t)n[e]=Lt(t,e);return n},unref:function(t){return Pt(t)?t.value:t},proxyRefs:function(t){if(Nt(t))return t;const e={},n=Object.keys(t);for(let o=0;o{e.depend()}),(()=>{e.notify()})),r={get value(){return n()},set value(t){o(t)}};return U(r,"__v_isRef",!0),r},triggerRef:function(t){t.dep&&t.dep.notify()},reactive:function(t){return Et(t,!1),t},isReactive:Nt,isReadonly:Mt,isShallow:Dt,isProxy:function(t){return Nt(t)||Mt(t)},shallowReactive:jt,markRaw:function(t){return U(t,"__v_skip",!0),t},toRaw:function t(e){const n=e&&e.__v_raw;return n?t(n):e},readonly:Ft,shallowReadonly:function(t){return Ht(t,!0)},computed:function(t,e){let n,o;const r=i(t);r?(n=t,o=j):(n=t.get,o=t.set);const s=et()?null:new An(it,n,j,{lazy:!0}),c={effect:s,get value(){return s?(s.dirty&&s.evaluate(),pt.target&&s.depend(),s.value):n()},set value(t){o(t)}};return U(c,"__v_isRef",!0),U(c,"__v_isReadonly",r),c},watch:function(t,e,n){return Ge(t,e,n)},watchEffect:function(t,e){return Ge(t,null,e)},watchPostEffect:We,watchSyncEffect:function(t,e){return Ge(t,null,{flush:"sync"})},EffectScope:Ye,effectScope:function(t){return new Ye(t)},onScopeDispose:function(t){Xe&&Xe.cleanups.push(t)},getCurrentScope:function(){return Xe},provide:Qe,inject:function(t,e,n=!1){const o=it;if(o){const r=o.$parent&&o.$parent._provided;if(r&&t in r)return r[t];if(arguments.length>1)return n&&i(e)?e.call(o):e}},h:function(t,e,n){return Gt(it,t,e,n,2,!0)},getCurrentInstance:function(){return it&&{proxy:it}},useSlots:function(){return xe().slots},useAttrs:function(){return xe().attrs},mergeDefaults:function(t,n){const o=e(t)?t.reduce(((t,e)=>(t[e]={},t)),{}):t;for(const t in n){const r=o[t];r?e(r)||i(r)?o[t]={type:r,default:n[t]}:r.default=n[t]:null===r&&(o[t]={default:n[t]})}return o},nextTick:un,set:Ot,del:Tt,useCssModule:function(e="$style"){{if(!it)return t;const n=it[e];return n||t}},useCssVars:function(t){if(!K)return;const e=it;e&&We((()=>{const n=e.$el,o=t(e,e._setupProxy);if(n&&1===n.nodeType){const t=n.style;for(const e in o)t.setProperty(`--${e}`,o[e])}}))},defineAsyncComponent:function(t){i(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:c=!1,onError:a}=t;let l=null,u=0;const f=()=>{let t;return l||(t=l=e().catch((t=>{if(t=t instanceof Error?t:new Error(String(t)),a)return new Promise(((e,n)=>{a(t,(()=>e((u++,l=null,f()))),(()=>n(t)),u+1)}));throw t})).then((e=>t!==l&&l?l:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),e))))};return()=>({component:f(),delay:r,timeout:s,error:o,loading:n})},onBeforeMount:dn,onMounted:pn,onBeforeUpdate:hn,onUpdated:mn,onBeforeUnmount:gn,onUnmounted:vn,onErrorCaptured:yn,onActivated:_n,onDeactivated:$n,onServerPrefetch:bn,onRenderTracked:wn,onRenderTriggered:xn});const kn=new st;function Sn(t){return On(t,kn),kn.clear(),t}function On(t,n){let o,r;const s=e(t);if(!(!s&&!c(t)||Object.isFrozen(t)||t instanceof at)){if(t.__ob__){const e=t.__ob__.dep.id;if(n.has(e))return;n.add(e)}if(s)for(o=t.length;o--;)On(t[o],n);else if(Pt(t))On(t.value,n);else for(r=Object.keys(t),o=r.length;o--;)On(t[r[o]],n)}}let Tn=0;class An{constructor(t,e,n,o,r){!function(t,e=Xe){e&&e.active&&e.effects.push(t)}(this,Xe||(t?t._scope:void 0)),(this.vm=t)&&r&&(t._watcher=this),o?(this.deep=!!o.deep,this.user=!!o.user,this.lazy=!!o.lazy,this.sync=!!o.sync,this.before=o.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Tn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression="",i(e)?this.getter=e:(this.getter=function(t){if(z.test(t))return;const e=t.split(".");return function(t){for(let n=0;n(this.$slots||ge(i,n.scopedSlots,this.$slots=pe(s,i)),this.$slots),Object.defineProperty(this,"scopedSlots",{enumerable:!0,get(){return ge(i,n.scopedSlots,this.slots())}}),u&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=ge(i,n.scopedSlots,this.$slots)),a._scopeId?this._c=(t,n,o,r)=>{const s=Gt(l,t,n,o,r,f);return s&&!e(s)&&(s.fnScopeId=a._scopeId,s.fnContext=i),s}:this._c=(t,e,n,o)=>Gt(l,t,e,n,o,f)}function Un(t,e,n,o,r){const s=ft(t);return s.fnContext=n,s.fnOptions=o,e.slot&&((s.data||(s.data={})).slot=e.slot),s}function zn(t,e){for(const n in e)t[w(n)]=e[n]}function Vn(t){return t.name||t.__name||t._componentTag}de(Bn.prototype);const Kn={init(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){const e=t;Kn.prepatch(e,e)}else{(t.componentInstance=function(t,e){const n={_isComponent:!0,_parentVnode:t,parent:e},r=t.data.inlineTemplate;o(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,Ne)).$mount(e?t.elm:void 0,e)}},prepatch(e,n){const o=n.componentOptions;!function(e,n,o,r,s){const i=r.data.scopedSlots,c=e.$scopedSlots,a=!!(i&&!i.$stable||c!==t&&!c.$stable||i&&e.$scopedSlots.$key!==i.$key||!i&&e.$scopedSlots.$key);let l=!!(s||e.$options._renderChildren||a);const u=e.$vnode;e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=s;const f=r.data.attrs||t;if(e._attrsProxy&&$e(e._attrsProxy,f,u.data&&u.data.attrs||t,e)&&(l=!0),e.$attrs=f,e.$listeners=o||t,n&&e.$options.props){wt(!1);const t=e._props,o=e.$options._propKeys||[];for(let r=0;rv(r,s)));const u=t=>{for(let t=0,e=r.length;t{t.resolved=Se(n,e),i?r.length=0:u(!0)})),p=P((e=>{o(t.errorComp)&&(t.error=!0,u(!0))})),h=t(d,p);return c(h)&&(f(h)?n(t.resolved)&&h.then(d,p):f(h.component)&&(h.component.then(d,p),o(h.error)&&(t.errorComp=Se(h.error,e)),o(h.loading)&&(t.loadingComp=Se(h.loading,e),0===h.delay?t.loading=!0:a=setTimeout((()=>{a=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,u(!1))}),h.delay||200)),o(h.timeout)&&(l=setTimeout((()=>{l=null,n(t.resolved)&&p(null)}),h.timeout)))),i=!1,t.loading?t.loadingComp:t.resolved}}(p,d),void 0===s))return function(t,e,n,o,r){const s=lt();return s.asyncFactory=t,s.asyncMeta={data:e,context:n,children:o,tag:r},s}(p,i,a,l,u);i=i||{},Hn(s),o(i.model)&&function(t,n){const r=t.model&&t.model.prop||"value",s=t.model&&t.model.event||"input";(n.attrs||(n.attrs={}))[r]=n.model.value;const i=n.on||(n.on={}),c=i[s],a=n.model.callback;o(c)?(e(c)?-1===c.indexOf(a):c!==a)&&(i[s]=[a].concat(c)):i[s]=a}(s.options,i);const h=function(t,e,r){const s=e.options.props;if(n(s))return;const i={},{attrs:c,props:a}=t;if(o(c)||o(a))for(const t in s){const e=k(t);Jt(i,a,t,e,!0)||Jt(i,c,t,e,!1)}return i}(i,s);if(r(s.options.functional))return function(n,r,s,i,c){const a=n.options,l={},u=a.props;if(o(u))for(const e in u)l[e]=ro(e,u,r||t);else o(s.attrs)&&zn(l,s.attrs),o(s.props)&&zn(l,s.props);const f=new Bn(s,l,c,i,n),d=a.render.call(null,f._c,f);if(d instanceof at)return Un(d,s,f.parent,a);if(e(d)){const t=qt(d)||[],e=new Array(t.length);for(let n=0;n{t(n,o),e(n,o)};return n._merged=!0,n}let Zn=j;const Gn=F.optionMergeStrategies;function Xn(t,e){if(!e)return t;let n,o,r;const s=rt?Reflect.ownKeys(e):Object.keys(e);for(let i=0;i{Gn[t]=Qn})),R.forEach((function(t){Gn[t+"s"]=to})),Gn.watch=function(t,n,o,r){if(t===Y&&(t=void 0),n===Y&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;const s={};T(s,t);for(const t in n){let o=s[t];const r=n[t];o&&!e(o)&&(o=[o]),s[t]=o?o.concat(r):e(r)?r:[r]}return s},Gn.props=Gn.methods=Gn.inject=Gn.computed=function(t,e,n,o){if(!t)return e;const r=Object.create(null);return T(r,t),e&&T(r,e),r},Gn.provide=Yn;const eo=function(t,e){return void 0===e?t:e};function no(t,n,o){if(i(n)&&(n=n.options),function(t,n){const o=t.props;if(!o)return;const r={};let s,i,c;if(e(o))for(s=o.length;s--;)i=o[s],"string"==typeof i&&(c=w(i),r[c]={type:null});else if(l(o))for(const t in o)i=o[t],c=w(t),r[c]=l(i)?i:{type:i};t.props=r}(n),function(t,n){const o=t.inject;if(!o)return;const r=t.inject={};if(e(o))for(let t=0;t-1)if(s&&!_(r,"default"))c=!1;else if(""===c||c===k(t)){const t=ao(String,r.type);(t<0||a-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(o=t,"[object RegExp]"===a.call(o)&&t.test(n));var o}function ho(t,e){const{cache:n,keys:o,_vnode:r}=t;for(const t in n){const s=n[t];if(s){const i=s.name;i&&!e(i)&&mo(n,t,o,r)}}}function mo(t,e,n,o){const r=t[e];!r||o&&r.tag===o.tag||r.componentInstance.$destroy(),t[e]=null,v(n,e)}!function(e){e.prototype._init=function(e){const n=this;n._uid=Fn++,n._isVue=!0,n.__v_skip=!0,n._scope=new Ye(!0),e&&e._isComponent?function(t,e){const n=t.$options=Object.create(t.constructor.options),o=e._parentVnode;n.parent=e.parent,n._parentVnode=o;const r=o.componentOptions;n.propsData=r.propsData,n._parentListeners=r.listeners,n._renderChildren=r.children,n._componentTag=r.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=no(Hn(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){const e=t.$options;let n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;const e=t.$options._parentListeners;e&&Ee(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;const n=e.$options,o=e.$vnode=n._parentVnode,r=o&&o.context;e.$slots=pe(n._renderChildren,r),e.$scopedSlots=t,e._c=(t,n,o,r)=>Gt(e,t,n,o,r,!1),e.$createElement=(t,n,o,r)=>Gt(e,t,n,o,r,!0);const s=o&&o.data;St(e,"$attrs",s&&s.attrs||t,null,!0),St(e,"$listeners",n._parentListeners||t,null,!0)}(n),Re(n,"beforeCreate",void 0,!1),function(t){const e=Ln(t.$options.inject,t);e&&(wt(!1),Object.keys(e).forEach((n=>{St(t,n,e[n])})),wt(!0))}(n),Nn(n),function(t){const e=t.$options.provide;if(e){const n=i(e)?e.call(t):e;if(!c(n))return;const o=rt?Reflect.ownKeys(n):Object.keys(n);ct(t);for(let t=0;t1?O(n):n;const o=O(arguments,1),r=`event handler for "${t}"`;for(let t=0,s=n.length;tparseInt(this.max)&&mo(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created(){this.cache=Object.create(null),this.keys=[]},destroyed(){for(const t in this.cache)mo(this.cache,t,this.keys)},mounted(){this.cacheVNode(),this.$watch("include",(t=>{ho(this,(e=>po(t,e)))})),this.$watch("exclude",(t=>{ho(this,(e=>!po(t,e)))}))},updated(){this.cacheVNode()},render(){const t=this.$slots.default,e=Oe(t),n=e&&e.componentOptions;if(n){const t=fo(n),{include:o,exclude:r}=this;if(o&&(!t||!po(o,t))||r&&t&&po(r,t))return e;const{cache:s,keys:i}=this,c=null==e.key?n.Ctor.cid+(n.tag?`::${n.tag}`:""):e.key;s[c]?(e.componentInstance=s[c].componentInstance,v(i,c),i.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){const e={get:()=>F};Object.defineProperty(t,"config",e),t.util={warn:Zn,extend:T,mergeOptions:no,defineReactive:St},t.set=Ot,t.delete=Tt,t.nextTick=un,t.observable=t=>(kt(t),t),t.options=Object.create(null),R.forEach((e=>{t.options[e+"s"]=Object.create(null)})),t.options._base=t,T(t.options.components,vo),function(t){t.use=function(t){const e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;const n=O(arguments,1);return n.unshift(this),i(t.install)?t.install.apply(t,n):i(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=no(this.options,t),this}}(t),uo(t),function(t){R.forEach((e=>{t[e]=function(t,n){return n?("component"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&i(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(lo),Object.defineProperty(lo.prototype,"$isServer",{get:et}),Object.defineProperty(lo.prototype,"$ssrContext",{get(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(lo,"FunctionalRenderContext",{value:Bn}),lo.version="2.7.5";const yo=h("style,class"),_o=h("input,textarea,option,select,progress"),$o=(t,e,n)=>"value"===n&&_o(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t,bo=h("contenteditable,draggable,spellcheck"),wo=h("events,caret,typing,plaintext-only"),xo=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Co="http://www.w3.org/1999/xlink",ko=t=>":"===t.charAt(5)&&"xlink"===t.slice(0,5),So=t=>ko(t)?t.slice(6,t.length):"",Oo=t=>null==t||!1===t;function To(t){let e=t.data,n=t,r=t;for(;o(r.componentInstance);)r=r.componentInstance._vnode,r&&r.data&&(e=Ao(r.data,e));for(;o(n=n.parent);)n&&n.data&&(e=Ao(e,n.data));return function(t,e){if(o(t)||o(e))return jo(t,Eo(e));return""}(e.staticClass,e.class)}function Ao(t,e){return{staticClass:jo(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function jo(t,e){return t?e?t+" "+e:t:e||""}function Eo(t){return Array.isArray(t)?function(t){let e,n="";for(let r=0,s=t.length;rDo(t)||Mo(t);function Io(t){return Mo(t)?"svg":"math"===t?"math":void 0}const Ro=Object.create(null);const Lo=h("text,number,password,search,email,tel,url");function Fo(t){if("string"==typeof t){const e=document.querySelector(t);return e||document.createElement("div")}return t}var Ho=Object.freeze({__proto__:null,createElement:function(t,e){const n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(No[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),Bo={create(t,e){Uo(e)},update(t,e){t.data.ref!==e.data.ref&&(Uo(t,!0),Uo(e))},destroy(t){Uo(t,!0)}};function Uo(t,n){const r=t.data.ref;if(!o(r))return;const s=t.context,c=t.componentInstance||t.elm,a=n?null:c,l=n?void 0:c;if(i(r))return void en(r,s,[a],s,"template ref function");const u=t.data.refInFor,f="string"==typeof r||"number"==typeof r,d=Pt(r),p=s.$refs;if(f||d)if(u){const t=f?p[r]:r.value;n?e(t)&&v(t,c):e(t)?t.includes(c)||t.push(c):f?(p[r]=[c],zo(s,r,p[r])):r.value=[c]}else if(f){if(n&&p[r]!==c)return;p[r]=l,zo(s,r,a)}else if(d){if(n&&r.value!==c)return;r.value=a}}function zo({_setupState:t},e,n){t&&_(t,e)&&(Pt(t[e])?t[e].value=n:t[e]=n)}const Vo=new at("",{},[]),Ko=["create","activate","update","remove","destroy"];function Jo(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&function(t,e){if("input"!==t.tag)return!0;let n;const r=o(n=t.data)&&o(n=n.attrs)&&n.type,s=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===s||Lo(r)&&Lo(s)}(t,e)||r(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function qo(t,e,n){let r,s;const i={};for(r=e;r<=n;++r)s=t[r].key,o(s)&&(i[s]=r);return i}var Wo={create:Zo,update:Zo,destroy:function(t){Zo(t,Vo)}};function Zo(t,e){(t.data.directives||e.data.directives)&&function(t,e){const n=t===Vo,o=e===Vo,r=Xo(t.data.directives,t.context),s=Xo(e.data.directives,e.context),i=[],c=[];let a,l,u;for(a in s)l=r[a],u=s[a],l?(u.oldValue=l.value,u.oldArg=l.arg,Qo(u,"update",e,t),u.def&&u.def.componentUpdated&&c.push(u)):(Qo(u,"bind",e,t),u.def&&u.def.inserted&&i.push(u));if(i.length){const o=()=>{for(let n=0;n{for(let n=0;n-1?or(t,e,n):xo(e)?Oo(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):bo(e)?t.setAttribute(e,((t,e)=>Oo(e)||"false"===e?"false":"contenteditable"===t&&wo(e)?e:"true")(e,n)):ko(e)?Oo(n)?t.removeAttributeNS(Co,So(e)):t.setAttributeNS(Co,e,n):or(t,e,n)}function or(t,e,n){if(Oo(n))t.removeAttribute(e);else{if(q&&!W&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){const e=n=>{n.stopImmediatePropagation(),t.removeEventListener("input",e)};t.addEventListener("input",e),t.__ieph=!0}t.setAttribute(e,n)}}var rr={create:er,update:er};function sr(t,e){const r=e.elm,s=e.data,i=t.data;if(n(s.staticClass)&&n(s.class)&&(n(i)||n(i.staticClass)&&n(i.class)))return;let c=To(e);const a=r._transitionClasses;o(a)&&(c=jo(c,Eo(a))),c!==r._prevClass&&(r.setAttribute("class",c),r._prevClass=c)}var ir={create:sr,update:sr};const cr=/[\w).+\-_$\]]/;function ar(t){let e,n,o,r,s,i=!1,c=!1,a=!1,l=!1,u=0,f=0,d=0,p=0;for(o=0;o=0&&(e=t.charAt(n)," "===e);n--);e&&cr.test(e)||(l=!0)}}else void 0===r?(p=o+1,r=t.slice(0,o).trim()):h();function h(){(s||(s=[])).push(t.slice(p,o).trim()),p=o+1}if(void 0===r?r=t.slice(0,o).trim():0!==p&&h(),s)for(o=0;ot[e])).filter((t=>t)):[]}function dr(t,e,n,o,r){(t.props||(t.props=[])).push(br({name:e,value:n,dynamic:r},o)),t.plain=!1}function pr(t,e,n,o,r){(r?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(br({name:e,value:n,dynamic:r},o)),t.plain=!1}function hr(t,e,n,o){t.attrsMap[e]=n,t.attrsList.push(br({name:e,value:n},o))}function mr(t,e,n,o,r,s,i,c){(t.directives||(t.directives=[])).push(br({name:e,rawName:n,value:o,arg:r,isDynamicArg:s,modifiers:i},c)),t.plain=!1}function gr(t,e,n){return n?`_p(${e},"${t}")`:t+e}function vr(e,n,o,r,s,i,c,a){let l;(r=r||t).right?a?n=`(${n})==='click'?'contextmenu':(${n})`:"click"===n&&(n="contextmenu",delete r.right):r.middle&&(a?n=`(${n})==='click'?'mouseup':(${n})`:"click"===n&&(n="mouseup")),r.capture&&(delete r.capture,n=gr("!",n,a)),r.once&&(delete r.once,n=gr("~",n,a)),r.passive&&(delete r.passive,n=gr("&",n,a)),r.native?(delete r.native,l=e.nativeEvents||(e.nativeEvents={})):l=e.events||(e.events={});const u=br({value:o.trim(),dynamic:a},c);r!==t&&(u.modifiers=r);const f=l[n];Array.isArray(f)?s?f.unshift(u):f.push(u):l[n]=f?s?[u,f]:[f,u]:u,e.plain=!1}function yr(t,e,n){const o=_r(t,":"+e)||_r(t,"v-bind:"+e);if(null!=o)return ar(o);if(!1!==n){const n=_r(t,e);if(null!=n)return JSON.stringify(n)}}function _r(t,e,n){let o;if(null!=(o=t.attrsMap[e])){const n=t.attrsList;for(let t=0,o=n.length;t-1?{exp:t.slice(0,Or),key:'"'+t.slice(Or+1)+'"'}:{exp:t,key:null};kr=t,Or=Tr=Ar=0;for(;!Er();)Sr=jr(),Nr(Sr)?Mr(Sr):91===Sr&&Dr(Sr);return{exp:t.slice(0,Tr),key:t.slice(Tr+1,Ar)}}(t);return null===n.key?`${t}=${e}`:`$set(${n.exp}, ${n.key}, ${e})`}let Cr,kr,Sr,Or,Tr,Ar;function jr(){return kr.charCodeAt(++Or)}function Er(){return Or>=Cr}function Nr(t){return 34===t||39===t}function Dr(t){let e=1;for(Tr=Or;!Er();)if(Nr(t=jr()))Mr(t);else if(91===t&&e++,93===t&&e--,0===e){Ar=Or;break}}function Mr(t){const e=t;for(;!Er()&&(t=jr())!==e;);}let Pr;function Ir(t,e,n){const o=Pr;return function r(){const s=e.apply(null,arguments);null!==s&&Fr(t,r,n,o)}}const Rr=rn&&!(X&&Number(X[1])<=53);function Lr(t,e,n,o){if(Rr){const t=Ve,n=e;e=n._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=t||e.timeStamp<=0||e.target.ownerDocument!==document)return n.apply(this,arguments)}}Pr.addEventListener(t,e,tt?{capture:n,passive:o}:n)}function Fr(t,e,n,o){(o||Pr).removeEventListener(t,e._wrapper||e,n)}function Hr(t,e){if(n(t.data.on)&&n(e.data.on))return;const r=e.data.on||{},s=t.data.on||{};Pr=e.elm||t.elm,function(t){if(o(t.__r)){const e=q?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}o(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(r),Vt(r,s,Lr,Fr,Ir,e.context),Pr=void 0}var Br={create:Hr,update:Hr,destroy:t=>Hr(t,Vo)};let Ur;function zr(t,e){if(n(t.data.domProps)&&n(e.data.domProps))return;let s,i;const c=e.elm,a=t.data.domProps||{};let l=e.data.domProps||{};for(s in(o(l.__ob__)||r(l._v_attr_proxy))&&(l=e.data.domProps=T({},l)),a)s in l||(c[s]="");for(s in l){if(i=l[s],"textContent"===s||"innerHTML"===s){if(e.children&&(e.children.length=0),i===a[s])continue;1===c.childNodes.length&&c.removeChild(c.childNodes[0])}if("value"===s&&"PROGRESS"!==c.tagName){c._value=i;const t=n(i)?"":String(i);Vr(c,t)&&(c.value=t)}else if("innerHTML"===s&&Mo(c.tagName)&&n(c.innerHTML)){Ur=Ur||document.createElement("div"),Ur.innerHTML=`${i}`;const t=Ur.firstChild;for(;c.firstChild;)c.removeChild(c.firstChild);for(;t.firstChild;)c.appendChild(t.firstChild)}else if(i!==a[s])try{c[s]=i}catch(t){}}}function Vr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){let n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){const n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return p(n)!==p(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Kr={create:zr,update:zr};const Jr=$((function(t){const e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){const o=t.split(n);o.length>1&&(e[o[0].trim()]=o[1].trim())}})),e}));function qr(t){const e=Wr(t.style);return t.staticStyle?T(t.staticStyle,e):e}function Wr(t){return Array.isArray(t)?A(t):"string"==typeof t?Jr(t):t}const Zr=/^--/,Gr=/\s*!important$/,Xr=(t,e,n)=>{if(Zr.test(e))t.style.setProperty(e,n);else if(Gr.test(n))t.style.setProperty(k(e),n.replace(Gr,""),"important");else{const o=ts(e);if(Array.isArray(n))for(let e=0,r=n.length;e-1?e.split(os).forEach((e=>t.classList.add(e))):t.classList.add(e);else{const n=` ${t.getAttribute("class")||""} `;n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ss(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(os).forEach((e=>t.classList.remove(e))):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{let n=` ${t.getAttribute("class")||""} `;const o=" "+e+" ";for(;n.indexOf(o)>=0;)n=n.replace(o," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function is(t){if(t){if("object"==typeof t){const e={};return!1!==t.css&&T(e,cs(t.name||"v")),T(e,t),e}return"string"==typeof t?cs(t):void 0}}const cs=$((t=>({enterClass:`${t}-enter`,enterToClass:`${t}-enter-to`,enterActiveClass:`${t}-enter-active`,leaveClass:`${t}-leave`,leaveToClass:`${t}-leave-to`,leaveActiveClass:`${t}-leave-active`}))),as=K&&!W;let ls="transition",us="transitionend",fs="animation",ds="animationend";as&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ls="WebkitTransition",us="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(fs="WebkitAnimation",ds="webkitAnimationEnd"));const ps=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:t=>t();function hs(t){ps((()=>{ps(t)}))}function ms(t,e){const n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),rs(t,e))}function gs(t,e){t._transitionClasses&&v(t._transitionClasses,e),ss(t,e)}function vs(t,e,n){const{type:o,timeout:r,propCount:s}=_s(t,e);if(!o)return n();const i="transition"===o?us:ds;let c=0;const a=()=>{t.removeEventListener(i,l),n()},l=e=>{e.target===t&&++c>=s&&a()};setTimeout((()=>{c0&&(l="transition",u=s,f=r.length):"animation"===e?a>0&&(l="animation",u=a,f=c.length):(u=Math.max(s,a),l=u>0?s>a?"transition":"animation":null,f=l?"transition"===l?r.length:c.length:0);return{type:l,timeout:u,propCount:f,hasTransform:"transition"===l&&ys.test(n[ls+"Property"])}}function $s(t,e){for(;t.lengthbs(e)+bs(t[n]))))}function bs(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function ws(t,e){const r=t.elm;o(r._leaveCb)&&(r._leaveCb.cancelled=!0,r._leaveCb());const s=is(t.data.transition);if(n(s))return;if(o(r._enterCb)||1!==r.nodeType)return;const{css:a,type:l,enterClass:u,enterToClass:f,enterActiveClass:d,appearClass:h,appearToClass:m,appearActiveClass:g,beforeEnter:v,enter:y,afterEnter:_,enterCancelled:$,beforeAppear:b,appear:w,afterAppear:x,appearCancelled:C,duration:k}=s;let S=Ne,O=Ne.$vnode;for(;O&&O.parent;)S=O.context,O=O.parent;const T=!S._isMounted||!t.isRootInsert;if(T&&!w&&""!==w)return;const A=T&&h?h:u,j=T&&g?g:d,E=T&&m?m:f,N=T&&b||v,D=T&&i(w)?w:y,M=T&&x||_,I=T&&C||$,R=p(c(k)?k.enter:k),L=!1!==a&&!W,F=ks(D),H=r._enterCb=P((()=>{L&&(gs(r,E),gs(r,j)),H.cancelled?(L&&gs(r,A),I&&I(r)):M&&M(r),r._enterCb=null}));t.data.show||Kt(t,"insert",(()=>{const e=r.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),D&&D(r,H)})),N&&N(r),L&&(ms(r,A),ms(r,j),hs((()=>{gs(r,A),H.cancelled||(ms(r,E),F||(Cs(R)?setTimeout(H,R):vs(r,l,H)))}))),t.data.show&&(e&&e(),D&&D(r,H)),L||F||H()}function xs(t,e){const r=t.elm;o(r._enterCb)&&(r._enterCb.cancelled=!0,r._enterCb());const s=is(t.data.transition);if(n(s)||1!==r.nodeType)return e();if(o(r._leaveCb))return;const{css:i,type:a,leaveClass:l,leaveToClass:u,leaveActiveClass:f,beforeLeave:d,leave:h,afterLeave:m,leaveCancelled:g,delayLeave:v,duration:y}=s,_=!1!==i&&!W,$=ks(h),b=p(c(y)?y.leave:y),w=r._leaveCb=P((()=>{r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[t.key]=null),_&&(gs(r,u),gs(r,f)),w.cancelled?(_&&gs(r,l),g&&g(r)):(e(),m&&m(r)),r._leaveCb=null}));function x(){w.cancelled||(!t.data.show&&r.parentNode&&((r.parentNode._pending||(r.parentNode._pending={}))[t.key]=t),d&&d(r),_&&(ms(r,l),ms(r,f),hs((()=>{gs(r,l),w.cancelled||(ms(r,u),$||(Cs(b)?setTimeout(w,b):vs(r,a,w)))}))),h&&h(r,w),_||$||w())}v?v(x):x()}function Cs(t){return"number"==typeof t&&!isNaN(t)}function ks(t){if(n(t))return!1;const e=t.fns;return o(e)?ks(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Ss(t,e){!0!==e.data.show&&ws(e)}const Os=function(t){let i,c;const a={},{modules:l,nodeOps:u}=t;for(i=0;im?(f=n(r[y+1])?null:r[y+1].elm,$(t,f,r,h,y,s)):h>y&&w(e,p,m)}(f,m,g,s,l):o(g)?(o(t.text)&&u.setTextContent(f,""),$(f,null,g,0,g.length-1,s)):o(m)?w(m,0,m.length-1):o(t.text)&&u.setTextContent(f,""):t.text!==e.text&&u.setTextContent(f,e.text),o(h)&&o(p=h.hook)&&o(p=p.postpatch)&&p(t,e)}function S(t,e,n){if(r(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(let t=0;t{const t=document.activeElement;t&&t.vmodel&&Ps(t,"input")}));const Ts={inserted(t,e,n,o){"select"===n.tag?(o.elm&&!o.elm._vOptions?Kt(n,"postpatch",(()=>{Ts.componentUpdated(t,e,n)})):As(t,e,n.context),t._vOptions=[].map.call(t.options,Ns)):("textarea"===n.tag||Lo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Ds),t.addEventListener("compositionend",Ms),t.addEventListener("change",Ms),W&&(t.vmodel=!0)))},componentUpdated(t,e,n){if("select"===n.tag){As(t,e,n.context);const o=t._vOptions,r=t._vOptions=[].map.call(t.options,Ns);if(r.some(((t,e)=>!D(t,o[e])))){(t.multiple?e.value.some((t=>Es(t,r))):e.value!==e.oldValue&&Es(e.value,r))&&Ps(t,"change")}}}};function As(t,e,n){js(t,e),(q||Z)&&setTimeout((()=>{js(t,e)}),0)}function js(t,e,n){const o=e.value,r=t.multiple;if(r&&!Array.isArray(o))return;let s,i;for(let e=0,n=t.options.length;e-1,i.selected!==s&&(i.selected=s);else if(D(Ns(i),o))return void(t.selectedIndex!==e&&(t.selectedIndex=e));r||(t.selectedIndex=-1)}function Es(t,e){return e.every((e=>!D(e,t)))}function Ns(t){return"_value"in t?t._value:t.value}function Ds(t){t.target.composing=!0}function Ms(t){t.target.composing&&(t.target.composing=!1,Ps(t.target,"input"))}function Ps(t,e){const n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Is(t){return!t.componentInstance||t.data&&t.data.transition?t:Is(t.componentInstance._vnode)}var Rs={bind(t,{value:e},n){const o=(n=Is(n)).data&&n.data.transition,r=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;e&&o?(n.data.show=!0,ws(n,(()=>{t.style.display=r}))):t.style.display=e?r:"none"},update(t,{value:e,oldValue:n},o){if(!e==!n)return;(o=Is(o)).data&&o.data.transition?(o.data.show=!0,e?ws(o,(()=>{t.style.display=t.__vOriginalDisplay})):xs(o,(()=>{t.style.display="none"}))):t.style.display=e?t.__vOriginalDisplay:"none"},unbind(t,e,n,o,r){r||(t.style.display=t.__vOriginalDisplay)}},Ls={model:Ts,show:Rs};const Fs={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Hs(t){const e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Hs(Oe(e.children)):t}function Bs(t){const e={},n=t.$options;for(const o in n.propsData)e[o]=t[o];const o=n._parentListeners;for(const t in o)e[w(t)]=o[t];return e}function Us(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}const zs=t=>t.tag||me(t),Vs=t=>"show"===t.name;var Ks={name:"transition",props:Fs,abstract:!0,render(t){let e=this.$slots.default;if(!e)return;if(e=e.filter(zs),!e.length)return;const n=this.mode,o=e[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;const r=Hs(o);if(!r)return o;if(this._leaving)return Us(t,o);const i=`__transition-${this._uid}-`;r.key=null==r.key?r.isComment?i+"comment":i+r.tag:s(r.key)?0===String(r.key).indexOf(i)?r.key:i+r.key:r.key;const c=(r.data||(r.data={})).transition=Bs(this),a=this._vnode,l=Hs(a);if(r.data.directives&&r.data.directives.some(Vs)&&(r.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(r,l)&&!me(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){const e=l.data.transition=T({},c);if("out-in"===n)return this._leaving=!0,Kt(e,"afterLeave",(()=>{this._leaving=!1,this.$forceUpdate()})),Us(t,o);if("in-out"===n){if(me(r))return a;let t;const n=()=>{t()};Kt(c,"afterEnter",n),Kt(c,"enterCancelled",n),Kt(e,"delayLeave",(e=>{t=e}))}}return o}};const Js=T({tag:String,moveClass:String},Fs);delete Js.mode;var qs={props:Js,beforeMount(){const t=this._update;this._update=(e,n)=>{const o=De(this);this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept,o(),t.call(this,e,n)}},render(t){const e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),o=this.prevChildren=this.children,r=this.$slots.default||[],s=this.children=[],i=Bs(this);for(let t=0;t{if(t.data.moved){const n=t.elm,o=n.style;ms(n,e),o.transform=o.WebkitTransform=o.transitionDuration="",n.addEventListener(us,n._moveCb=function t(o){o&&o.target!==n||o&&!/transform$/.test(o.propertyName)||(n.removeEventListener(us,t),n._moveCb=null,gs(n,e))})}})))},methods:{hasMove(t,e){if(!as)return!1;if(this._hasMove)return this._hasMove;const n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((t=>{ss(n,t)})),rs(n,e),n.style.display="none",this.$el.appendChild(n);const o=_s(n);return this.$el.removeChild(n),this._hasMove=o.hasTransform}}};function Ws(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Zs(t){t.data.newPos=t.elm.getBoundingClientRect()}function Gs(t){const e=t.data.pos,n=t.data.newPos,o=e.left-n.left,r=e.top-n.top;if(o||r){t.data.moved=!0;const e=t.elm.style;e.transform=e.WebkitTransform=`translate(${o}px,${r}px)`,e.transitionDuration="0s"}}var Xs={Transition:Ks,TransitionGroup:qs};lo.config.mustUseProp=$o,lo.config.isReservedTag=Po,lo.config.isReservedAttr=yo,lo.config.getTagNamespace=Io,lo.config.isUnknownElement=function(t){if(!K)return!0;if(Po(t))return!1;if(t=t.toLowerCase(),null!=Ro[t])return Ro[t];const e=document.createElement(t);return t.indexOf("-")>-1?Ro[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Ro[t]=/HTMLUnknownElement/.test(e.toString())},T(lo.options.directives,Ls),T(lo.options.components,Xs),lo.prototype.__patch__=K?Os:j,lo.prototype.$mount=function(t,e){return function(t,e,n){let o;t.$el=e,t.$options.render||(t.$options.render=lt),Re(t,"beforeMount"),o=()=>{t._update(t._render(),n)},new An(t,o,j,{before(){t._isMounted&&!t._isDestroyed&&Re(t,"beforeUpdate")}},!0),n=!1;const r=t._preWatchers;if(r)for(let t=0;t{F.devtools&&nt&&nt.emit("init",lo)}),0);const Ys=/\{\{((?:.|\r?\n)+?)\}\}/g,Qs=/[-.*+?^${}()|[\]\/\\]/g,ti=$((t=>{const e=t[0].replace(Qs,"\\$&"),n=t[1].replace(Qs,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var ei={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;const n=_r(t,"class");n&&(t.staticClass=JSON.stringify(n.replace(/\s+/g," ").trim()));const o=yr(t,"class",!1);o&&(t.classBinding=o)},genData:function(t){let e="";return t.staticClass&&(e+=`staticClass:${t.staticClass},`),t.classBinding&&(e+=`class:${t.classBinding},`),e}};var ni={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;const n=_r(t,"style");n&&(t.staticStyle=JSON.stringify(Jr(n)));const o=yr(t,"style",!1);o&&(t.styleBinding=o)},genData:function(t){let e="";return t.staticStyle&&(e+=`staticStyle:${t.staticStyle},`),t.styleBinding&&(e+=`style:(${t.styleBinding}),`),e}};let oi;var ri={decode:t=>(oi=oi||document.createElement("div"),oi.innerHTML=t,oi.textContent)};const si=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ii=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ci=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ai=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,li=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ui=`[a-zA-Z_][\\-\\.0-9_a-zA-Z${H.source}]*`,fi=`((?:${ui}\\:)?${ui})`,di=new RegExp(`^<${fi}`),pi=/^\s*(\/?)>/,hi=new RegExp(`^<\\/${fi}[^>]*>`),mi=/^]+>/i,gi=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},bi=/&(?:lt|gt|quot|amp|#39);/g,wi=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,xi=h("pre,textarea",!0),Ci=(t,e)=>t&&xi(t)&&"\n"===e[0];function ki(t,e){const n=e?wi:bi;return t.replace(n,(t=>$i[t]))}const Si=/^@|^v-on:/,Oi=/^v-|^@|^:|^#/,Ti=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Ai=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ji=/^\(|\)$/g,Ei=/^\[.*\]$/,Ni=/:(.*)$/,Di=/^:|^\.|^v-bind:/,Mi=/\.[^.\]]+(?=[^\]]*$)/g,Pi=/^v-slot(:|$)|^#/,Ii=/[\r\n]/,Ri=/[ \f\t\r\n]+/g,Li=$(ri.decode);let Fi,Hi,Bi,Ui,zi,Vi,Ki,Ji;function qi(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:tc(e),rawAttrsMap:{},parent:n,children:[]}}function Wi(t,e){Fi=e.warn||ur,Vi=e.isPreTag||E,Ki=e.mustUseProp||E,Ji=e.getTagNamespace||E,e.isReservedTag,Bi=fr(e.modules,"transformNode"),Ui=fr(e.modules,"preTransformNode"),zi=fr(e.modules,"postTransformNode"),Hi=e.delimiters;const n=[],o=!1!==e.preserveWhitespace,r=e.whitespace;let s,i,c=!1,a=!1;function l(t){if(u(t),c||t.processed||(t=Zi(t,e)),n.length||t===s||s.if&&(t.elseif||t.else)&&Xi(s,{exp:t.elseif,block:t}),i&&!t.forbidden)if(t.elseif||t.else)!function(t,e){const n=function(t){let e=t.length;for(;e--;){if(1===t[e].type)return t[e];t.pop()}}(e.children);n&&n.if&&Xi(n,{exp:t.elseif,block:t})}(t,i);else{if(t.slotScope){const e=t.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[e]=t}i.children.push(t),t.parent=i}t.children=t.children.filter((t=>!t.slotScope)),u(t),t.pre&&(c=!1),Vi(t.tag)&&(a=!1);for(let n=0;n]*>)","i")),s=t.replace(r,(function(t,r,s){return n=s.length,yi(o)||"noscript"===o||(r=r.replace(//g,"$1").replace(//g,"$1")),Ci(o,r)&&(r=r.slice(1)),e.chars&&e.chars(r),""}));a+=t.length-s.length,t=s,d(o,a-n,a)}else{let n,o,r,s=t.indexOf("<");if(0===s){if(gi.test(t)){const n=t.indexOf("--\x3e");if(n>=0){e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,n),a,a+n+3),l(n+3);continue}}if(vi.test(t)){const e=t.indexOf("]>");if(e>=0){l(e+2);continue}}const n=t.match(mi);if(n){l(n[0].length);continue}const o=t.match(hi);if(o){const t=a;l(o[0].length),d(o[1],t,a);continue}const r=u();if(r){f(r),Ci(r.tagName,t)&&l(1);continue}}if(s>=0){for(o=t.slice(s);!(hi.test(o)||di.test(o)||gi.test(o)||vi.test(o)||(r=o.indexOf("<",1),r<0));)s+=r,o=t.slice(s);n=t.substring(0,s)}s<0&&(n=t),n&&l(n.length),e.chars&&n&&e.chars(n,a-n.length,a)}if(t===i){e.chars&&e.chars(t);break}}function l(e){a+=e,t=t.substring(e)}function u(){const e=t.match(di);if(e){const n={tagName:e[1],attrs:[],start:a};let o,r;for(l(e[0].length);!(o=t.match(pi))&&(r=t.match(li)||t.match(ai));)r.start=a,l(r[0].length),r.end=a,n.attrs.push(r);if(o)return n.unarySlash=o[1],l(o[0].length),n.end=a,n}}function f(t){const i=t.tagName,a=t.unarySlash;o&&("p"===c&&ci(i)&&d(c),s(i)&&c===i&&d(i));const l=r(i)||!!a,u=t.attrs.length,f=new Array(u);for(let n=0;n=0&&n[s].lowerCasedTag!==i;s--);else s=0;if(s>=0){for(let t=n.length-1;t>=s;t--)e.end&&e.end(n[t].tag,o,r);n.length=s,c=s&&n[s-1].tag}else"br"===i?e.start&&e.start(t,[],!0,o,r):"p"===i&&(e.start&&e.start(t,[],!1,o,r),e.end&&e.end(t,o,r))}d()}(t,{warn:Fi,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start(t,o,r,u,f){const d=i&&i.ns||Ji(t);q&&"svg"===d&&(o=function(t){const e=[];for(let n=0;na&&(r.push(c=t.slice(a,i)),o.push(JSON.stringify(c)));const e=ar(s[1].trim());o.push(`_s(${e})`),r.push({"@binding":e}),a=i+s[0].length}return a{if(!t.slotScope)return t.parent=s,!0})),s.slotScope=e.value||"_empty_",t.children=[],t.plain=!1}}}(t),"slot"===(n=t).tag&&(n.slotName=yr(n,"name")),function(t){let e;(e=yr(t,"is"))&&(t.component=e);null!=_r(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(let n=0;n{t[e.slice(1)]=!0})),t}}function tc(t){const e={};for(let n=0,o=t.length;n-1`+("true"===s?`:(${e})`:`:_q(${e},${s})`)),vr(t,"change",`var $$a=${e},$$el=$event.target,$$c=$$el.checked?(${s}):(${i});if(Array.isArray($$a)){var $$v=${o?"_n("+r+")":r},$$i=_i($$a,$$v);if($$el.checked){$$i<0&&(${xr(e,"$$a.concat([$$v])")})}else{$$i>-1&&(${xr(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")})}}else{${xr(e,"$$c")}}`,null,!0)}(t,o,r);else if("input"===s&&"radio"===i)!function(t,e,n){const o=n&&n.number;let r=yr(t,"value")||"null";r=o?`_n(${r})`:r,dr(t,"checked",`_q(${e},${r})`),vr(t,"change",xr(e,r),null,!0)}(t,o,r);else if("input"===s||"textarea"===s)!function(t,e,n){const o=t.attrsMap.type,{lazy:r,number:s,trim:i}=n||{},c=!r&&"range"!==o,a=r?"change":"range"===o?"__r":"input";let l="$event.target.value";i&&(l="$event.target.value.trim()");s&&(l=`_n(${l})`);let u=xr(e,l);c&&(u=`if($event.target.composing)return;${u}`);dr(t,"value",`(${e})`),vr(t,a,u,null,!0),(i||s)&&vr(t,"blur","$forceUpdate()")}(t,o,r);else if(!F.isReservedTag(s))return wr(t,o,r),!1;return!0},text:function(t,e){e.value&&dr(t,"textContent",`_s(${e.value})`,e)},html:function(t,e){e.value&&dr(t,"innerHTML",`_s(${e.value})`,e)}},isPreTag:t=>"pre"===t,isUnaryTag:si,mustUseProp:$o,canBeLeftOpenTag:ii,isReservedTag:Po,getTagNamespace:Io,staticKeys:function(t){return t.reduce(((t,e)=>t.concat(e.staticKeys||[])),[]).join(",")}(rc)};let ic,cc;const ac=$((function(t){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function lc(t,e){t&&(ic=ac(e.staticKeys||""),cc=e.isReservedTag||E,uc(t),fc(t,!1))}function uc(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||m(t.tag)||!cc(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(ic)))}(t),1===t.type){if(!cc(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(let e=0,n=t.children.length;e|^function(?:\s+[\w$]+)?\s*\(/,pc=/\([^)]*?\);*$/,hc=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,mc={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},gc={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},vc=t=>`if(${t})return null;`,yc={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:vc("$event.target !== $event.currentTarget"),ctrl:vc("!$event.ctrlKey"),shift:vc("!$event.shiftKey"),alt:vc("!$event.altKey"),meta:vc("!$event.metaKey"),left:vc("'button' in $event && $event.button !== 0"),middle:vc("'button' in $event && $event.button !== 1"),right:vc("'button' in $event && $event.button !== 2")};function _c(t,e){const n=e?"nativeOn:":"on:";let o="",r="";for(const e in t){const n=$c(t[e]);t[e]&&t[e].dynamic?r+=`${e},${n},`:o+=`"${e}":${n},`}return o=`{${o.slice(0,-1)}}`,r?n+`_d(${o},[${r.slice(0,-1)}])`:n+o}function $c(t){if(!t)return"function(){}";if(Array.isArray(t))return`[${t.map((t=>$c(t))).join(",")}]`;const e=hc.test(t.value),n=dc.test(t.value),o=hc.test(t.value.replace(pc,""));if(t.modifiers){let r="",s="";const i=[];for(const e in t.modifiers)if(yc[e])s+=yc[e],mc[e]&&i.push(e);else if("exact"===e){const e=t.modifiers;s+=vc(["ctrl","shift","alt","meta"].filter((t=>!e[t])).map((t=>`$event.${t}Key`)).join("||"))}else i.push(e);i.length&&(r+=function(t){return`if(!$event.type.indexOf('key')&&${t.map(bc).join("&&")})return null;`}(i)),s&&(r+=s);return`function($event){${r}${e?`return ${t.value}.apply(null, arguments)`:n?`return (${t.value}).apply(null, arguments)`:o?`return ${t.value}`:t.value}}`}return e||n?t.value:`function($event){${o?`return ${t.value}`:t.value}}`}function bc(t){const e=parseInt(t,10);if(e)return`$event.keyCode!==${e}`;const n=mc[t],o=gc[t];return`_k($event.keyCode,${JSON.stringify(t)},${JSON.stringify(n)},$event.key,${JSON.stringify(o)})`}var wc={on:function(t,e){t.wrapListeners=t=>`_g(${t},${e.value})`},bind:function(t,e){t.wrapData=n=>`_b(${n},'${t.tag}',${e.value},${e.modifiers&&e.modifiers.prop?"true":"false"}${e.modifiers&&e.modifiers.sync?",true":""})`},cloak:j};class xc{constructor(t){this.options=t,this.warn=t.warn||ur,this.transforms=fr(t.modules,"transformCode"),this.dataGenFns=fr(t.modules,"genData"),this.directives=T(T({},wc),t.directives);const e=t.isReservedTag||E;this.maybeComponent=t=>!!t.component||!e(t.tag),this.onceId=0,this.staticRenderFns=[],this.pre=!1}}function Cc(t,e){const n=new xc(e);return{render:`with(this){return ${t?"script"===t.tag?"null":kc(t,n):'_c("div")'}}`,staticRenderFns:n.staticRenderFns}}function kc(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Oc(t,e);if(t.once&&!t.onceProcessed)return Tc(t,e);if(t.for&&!t.forProcessed)return Ec(t,e);if(t.if&&!t.ifProcessed)return Ac(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){const n=t.slotName||'"default"',o=Pc(t,e);let r=`_t(${n}${o?`,function(){return ${o}}`:""}`;const s=t.attrs||t.dynamicAttrs?Lc((t.attrs||[]).concat(t.dynamicAttrs||[]).map((t=>({name:w(t.name),value:t.value,dynamic:t.dynamic})))):null,i=t.attrsMap["v-bind"];!s&&!i||o||(r+=",null");s&&(r+=`,${s}`);i&&(r+=`${s?"":",null"},${i}`);return r+")"}(t,e);{let n;if(t.component)n=function(t,e,n){const o=e.inlineTemplate?null:Pc(e,n,!0);return`_c(${t},${Nc(e,n)}${o?`,${o}`:""})`}(t.component,t,e);else{let o,r;(!t.plain||t.pre&&e.maybeComponent(t))&&(o=Nc(t,e));const s=e.options.bindings;s&&!1!==s.__isScriptSetup&&(r=Sc(s,t.tag)||Sc(s,w(t.tag))||Sc(s,x(w(t.tag)))),r||(r=`'${t.tag}'`);const i=t.inlineTemplate?null:Pc(t,e,!0);n=`_c(${r}${o?`,${o}`:""}${i?`,${i}`:""})`}for(let o=0;o{const n=e[t];return n.slotTargetDynamic||n.if||n.for||Dc(n)})),r=!!t.if;if(!o){let e=t.parent;for(;e;){if(e.slotScope&&"_empty_"!==e.slotScope||e.for){o=!0;break}e.if&&(r=!0),e=e.parent}}const s=Object.keys(e).map((t=>Mc(e[t],n))).join(",");return`scopedSlots:_u([${s}]${o?",null,true":""}${!o&&r?`,null,false,${function(t){let e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(s)}`:""})`}(t,t.scopedSlots,e)},`),t.model&&(n+=`model:{value:${t.model.value},callback:${t.model.callback},expression:${t.model.expression}},`),t.inlineTemplate){const o=function(t,e){const n=t.children[0];if(n&&1===n.type){const t=Cc(n,e.options);return`inlineTemplate:{render:function(){${t.render}},staticRenderFns:[${t.staticRenderFns.map((t=>`function(){${t}}`)).join(",")}]}`}}(t,e);o&&(n+=`${o},`)}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n=`_b(${n},"${t.tag}",${Lc(t.dynamicAttrs)})`),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Dc(t){return 1===t.type&&("slot"===t.tag||t.children.some(Dc))}function Mc(t,e){const n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Ac(t,e,Mc,"null");if(t.for&&!t.forProcessed)return Ec(t,e,Mc);const o="_empty_"===t.slotScope?"":String(t.slotScope),r=`function(${o}){return ${"template"===t.tag?t.if&&n?`(${t.if})?${Pc(t,e)||"undefined"}:undefined`:Pc(t,e)||"undefined":kc(t,e)}}`,s=o?"":",proxy:true";return`{key:${t.slotTarget||'"default"'},fn:${r}${s}}`}function Pc(t,e,n,o,r){const s=t.children;if(s.length){const t=s[0];if(1===s.length&&t.for&&"template"!==t.tag&&"slot"!==t.tag){const r=n?e.maybeComponent(t)?",1":",0":"";return`${(o||kc)(t,e)}${r}`}const i=n?function(t,e){let n=0;for(let o=0;oIc(t.block)))){n=2;break}(e(r)||r.ifConditions&&r.ifConditions.some((t=>e(t.block))))&&(n=1)}}return n}(s,e.maybeComponent):0,c=r||Rc;return`[${s.map((t=>c(t,e))).join(",")}]${i?`,${i}`:""}`}}function Ic(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function Rc(t,e){return 1===t.type?kc(t,e):3===t.type&&t.isComment?function(t){return`_e(${JSON.stringify(t.text)})`}(t):function(t){return`_v(${2===t.type?t.expression:Fc(JSON.stringify(t.text))})`}(t)}function Lc(t){let e="",n="";for(let o=0;oHc(t,a))),e[s]=c}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");const Uc=(zc=function(t,e){const n=Wi(t.trim(),e);!1!==e.optimize&&lc(n,e);const o=Cc(n,e);return{ast:n,render:o.render,staticRenderFns:o.staticRenderFns}},function(t){function e(e,n){const o=Object.create(t),r=[],s=[];if(n){n.modules&&(o.modules=(t.modules||[]).concat(n.modules)),n.directives&&(o.directives=T(Object.create(t.directives||null),n.directives));for(const t in n)"modules"!==t&&"directives"!==t&&(o[t]=n[t])}o.warn=(t,e,n)=>{(n?s:r).push(t)};const i=zc(e.trim(),o);return i.errors=r,i.tips=s,i}return{compile:e,compileToFunctions:Bc(e)}});var zc;const{compile:Vc,compileToFunctions:Kc}=Uc(sc);let Jc;function qc(t){return Jc=Jc||document.createElement("div"),Jc.innerHTML=t?'':'

',Jc.innerHTML.indexOf(" ")>0}const Wc=!!K&&qc(!1),Zc=!!K&&qc(!0),Gc=$((t=>{const e=Fo(t);return e&&e.innerHTML})),Xc=lo.prototype.$mount;lo.prototype.$mount=function(t,e){if((t=t&&Fo(t))===document.body||t===document.documentElement)return this;const n=this.$options;if(!n.render){let e=n.template;if(e)if("string"==typeof e)"#"===e.charAt(0)&&(e=Gc(e));else{if(!e.nodeType)return this;e=e.innerHTML}else t&&(e=function(t){if(t.outerHTML)return t.outerHTML;{const e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}}(t));if(e){const{render:t,staticRenderFns:o}=Kc(e,{outputSourceRange:!1,shouldDecodeNewlines:Wc,shouldDecodeNewlinesForHref:Zc,delimiters:n.delimiters,comments:n.comments},this);n.render=t,n.staticRenderFns=o}}return Xc.call(this,t,e)},lo.compile=Kc,T(lo,Cn),lo.effect=function(t,e){const n=new An(it,t,j,{sync:!0});e&&(n.update=()=>{e((()=>n.run()))})},module.exports=lo; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ !function() { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function() { return module['default']; } : +/******/ function() { return module; }; +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be in strict mode. +!function() { +"use strict"; + +// EXTERNAL MODULE: ./node_modules/vue/dist/vue.common.prod.js +var vue_common_prod = __webpack_require__(317); +var vue_common_prod_default = /*#__PURE__*/__webpack_require__.n(vue_common_prod); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/utils/event-bus.js + +/* harmony default export */ var event_bus = (new (vue_common_prod_default())()); +;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./lib/view/assets-development/javascript/vue-components/archive/browser.vue?vue&type=template&id=727e58b0& +var render = function render() { + var _vm = this, + _c = _vm._self._c; + + return _vm.archive ? _c("div", { + staticClass: "ai1wm-overlay", + staticStyle: { + display: "block" + } + }, [_c("div", { + staticClass: "ai1wm-modal-container ai1wm-modal-container-v2", + "class": { + "ai1wm-modal-loading": _vm.loading + }, + attrs: { + role: "dialog", + tabindex: "-1" + }, + on: { + click: function click($event) { + $event.stopPropagation(); + } + } + }, [_vm.error ? _c("div", { + staticClass: "ai1wm-folder-container" + }, [_c("h1", [_vm._v("\n " + _vm._s(_vm.__("archive_browser_error")) + "\n "), _c("a", { + attrs: { + href: "#" + }, + on: { + click: function click($event) { + $event.preventDefault(); + _vm.archive = null; + } + } + }, [_c("i", { + staticClass: "ai1wm-icon-close" + })])]), _vm._v(" "), _c("p", [_vm._v(_vm._s(_vm.error))])]) : _vm.loading ? _c("ai1wm-spinner") : _vm.processing ? _c("progress-bar", { + attrs: { + title: _vm.__("progress_bar_title"), + total: _vm.total, + processed: _vm.processed + } + }) : _c("div", { + staticClass: "ai1wm-folder-container" + }, [_c("h1", [_vm._v("\n " + _vm._s(_vm.__("archive_browser_title")) + "\n "), _c("a", { + attrs: { + href: "#" + }, + on: { + click: function click($event) { + $event.preventDefault(); + _vm.archive = null; + } + } + }, [_c("i", { + staticClass: "ai1wm-icon-close" + })])]), _vm._v(" "), _c("folder", { + attrs: { + folder: _vm.tree.root, + index: 0 + } + })], 1)], 1)]) : _vm._e(); +}; + +var staticRenderFns = []; +render._withStripped = true; + +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/archive/browser.vue?vue&type=template&id=727e58b0& + +;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./lib/view/assets-development/javascript/vue-components/archive/folder.vue?vue&type=template&id=ceb1e49c& +var foldervue_type_template_id_ceb1e49c_render = function render() { + var _vm = this, + _c = _vm._self._c; + + return _c("ul", [_vm.tree.expanded ? _c("li", [_c("a", { + style: { + "padding-left": _vm.index + "rem" + }, + attrs: { + href: "#" + }, + on: { + click: function click($event) { + $event.preventDefault(); + return _vm.__toggle.apply(null, arguments); + } + } + }, [_c("i", { + staticClass: "ai1wm-icon-folder-secondary-open" + }), _vm._v(" " + _vm._s(_vm.__name(_vm.tree.name)) + "\n ")]), _vm._v(" "), _vm._l(_vm.tree.children, function (child) { + return _c("folder", { + key: "folder_" + child.name, + attrs: { + folder: child, + index: _vm.index + 1 + } + }); + }), _vm._v(" "), _vm._l(_vm.tree.files, function (file) { + return _c("ul", { + key: "files_" + file.name + }, [_c("li", [_c("a", { + style: { + "padding-left": _vm.index + 1 + "rem" + }, + attrs: { + href: "#" + }, + on: { + click: function click($event) { + $event.preventDefault(); + return _vm.download(file); + } + } + }, [_c("i", { + staticClass: "ai1wm-icon-file" + }), _vm._v(" "), _c("span", { + staticClass: "ai1wm-archive-browser-filename" + }, [_vm._v(_vm._s(_vm.__name(file.name)))]), _vm._v(" "), _c("span", { + staticClass: "ai1wm-archive-browser-filesize" + }, [_vm._v(_vm._s(_vm.__size(file.size)))]), _vm._v(" "), _c("i", { + staticClass: "ai1wm-icon-arrow-down" + })])])]); + })], 2) : _c("li", [_c("a", { + style: { + "padding-left": _vm.index + "rem" + }, + attrs: { + href: "#" + }, + on: { + click: function click($event) { + $event.preventDefault(); + _vm.tree.expanded = !_vm.tree.expanded; + } + } + }, [_c("i", { + staticClass: "ai1wm-icon-folder-secondary" + }), _vm._v(" " + _vm._s(_vm.__name(_vm.tree.name)) + "\n ")])])]); +}; + +var foldervue_type_template_id_ceb1e49c_staticRenderFns = []; +foldervue_type_template_id_ceb1e49c_render._withStripped = true; + +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/archive/folder.vue?vue&type=template&id=ceb1e49c& + +;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./lib/view/assets-development/javascript/vue-components/archive/folder.vue?vue&type=script&lang=js& + +/* harmony default export */ var foldervue_type_script_lang_js_ = ({ + name: 'Folder', + props: { + folder: { + type: Object, + required: true + }, + index: { + type: Number, + "default": 0 + } + }, + data: function data() { + return { + tree: this.folder + }; + }, + methods: { + download: function download(file) { + event_bus.$emit('ai1wm-download-file', file); + }, + __toggle: function __toggle() { + if (this.index > 0) { + this.tree.expanded = !this.tree.expanded; + } + }, + __name: function __name(filename) { + return Ai1wm.Util.basename(filename); + }, + __size: function __size(size) { + return Ai1wm.Util.sizeFormat(size); + } + } +}); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/archive/folder.vue?vue&type=script&lang=js& + /* harmony default export */ var archive_foldervue_type_script_lang_js_ = (foldervue_type_script_lang_js_); +;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. + +function normalizeComponent( + scriptExports, + render, + staticRenderFns, + functionalTemplate, + injectStyles, + scopeId, + moduleIdentifier /* server only */, + shadowMode /* vue-cli only */ +) { + // Vue.extend constructor export interop + var options = + typeof scriptExports === 'function' ? scriptExports.options : scriptExports + + // render functions + if (render) { + options.render = render + options.staticRenderFns = staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true + } + + // scopedId + if (scopeId) { + options._scopeId = 'data-v-' + scopeId + } + + var hook + if (moduleIdentifier) { + // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = shadowMode + ? function () { + injectStyles.call( + this, + (options.functional ? this.parent : this).$root.$options.shadowRoot + ) + } + : injectStyles + } + + if (hook) { + if (options.functional) { + // for template-only hot-reload because in that case the render fn doesn't + // go through the normalizer + options._injectStyles = hook + // register for functional component in vue file + var originalRender = options.render + options.render = function renderWithStyleInjection(h, context) { + hook.call(context) + return originalRender(h, context) + } + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate + options.beforeCreate = existing ? [].concat(existing, hook) : [hook] + } + } + + return { + exports: scriptExports, + options: options + } +} + +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/archive/folder.vue + + + + + +/* normalize component */ +; +var component = normalizeComponent( + archive_foldervue_type_script_lang_js_, + foldervue_type_template_id_ceb1e49c_render, + foldervue_type_template_id_ceb1e49c_staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var folder = (component.exports); +;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./lib/view/assets-development/javascript/vue-components/progress-bar.vue?vue&type=template&id=8b61c75e& +var progress_barvue_type_template_id_8b61c75e_render = function render() { + var _vm = this, + _c = _vm._self._c; + + return _c("div", { + staticClass: "ai1wm-progress-bar-v2" + }, [_c("h1", { + domProps: { + textContent: _vm._s(_vm.title) + } + }), _vm._v(" "), _c("div", { + staticClass: "ai1wm-progress-bar-v2-container" + }, [_c("div", { + key: "progres" + _vm.progress, + staticClass: "ai1wm-progress-bar-v2-meter" + }, [_c("div", { + staticClass: "ai1wm-progress-bar-v2-percent", + style: { + left: _vm.progress + "%" + } + }, [_vm._v("\n " + _vm._s(_vm.progress) + "%\n ")]), _vm._v(" "), _c("span", { + staticClass: "ai1wm-progress-bar-v2-slider", + style: { + width: _vm.progress + "%" + } + })])])]); +}; + +var progress_barvue_type_template_id_8b61c75e_staticRenderFns = []; +progress_barvue_type_template_id_8b61c75e_render._withStripped = true; + +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/progress-bar.vue?vue&type=template&id=8b61c75e& + +;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./lib/view/assets-development/javascript/vue-components/progress-bar.vue?vue&type=script&lang=js& +/* harmony default export */ var progress_barvue_type_script_lang_js_ = ({ + props: { + title: { + type: String, + required: true + }, + total: { + type: Number, + required: true + }, + processed: { + type: Number, + required: true + } + }, + computed: { + progress: function progress() { + if (this.total > 0) { + return parseInt(this.processed / this.total * 100); + } + + return 0; + } + } +}); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/progress-bar.vue?vue&type=script&lang=js& + /* harmony default export */ var vue_components_progress_barvue_type_script_lang_js_ = (progress_barvue_type_script_lang_js_); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/progress-bar.vue + + + + + +/* normalize component */ +; +var progress_bar_component = normalizeComponent( + vue_components_progress_barvue_type_script_lang_js_, + progress_barvue_type_template_id_8b61c75e_render, + progress_barvue_type_template_id_8b61c75e_staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var progress_bar = (progress_bar_component.exports); +;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./lib/view/assets-development/javascript/vue-components/ai1wm-spinner.vue?vue&type=template&id=62088451& +var ai1wm_spinnervue_type_template_id_62088451_render = function render() { + var _vm = this, + _c = _vm._self._c; + + return _vm._m(0); +}; + +var ai1wm_spinnervue_type_template_id_62088451_staticRenderFns = [function () { + var _vm = this, + _c = _vm._self._c; + + return _c("div", { + staticClass: "ai1wm-spin-container" + }, [_c("div", { + staticClass: "ai1wm-spinner ai1wm-spin-right" + }, [_c("img", { + attrs: { + src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAF1QTFRFAAAAkpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWakpWaDpDRYAAAAB90Uk5TABAwsM/A/9h/Tz/v37+fIPBQQG/McIDgr2CQ0KCPX6xBX1EAAALLSURBVHic7Zp/c7MgDMfFVh43rVr3SOuP9f2/zFnbmqAIiMTb3fr9Y7e7Uj+GhBBCg+C3iu3ACA/0DHaMdmBwckjPIIfcGdSQgUEMeTBoIU8GKeTF4P/i+OOTZkWODJ4Mf9NTHNIxnpDhv+yDiIEgd4Pi3BskLBYgvTJvGESZQnqMrzAAyhzCk7NvigLC+cnTnL0oSghPSq8UNYTzL5+U/2UlokJByTxSHrkrrw6UlDFBsuoyoVy9UXAWri9EtsipvpK903iiTEqiPJIotR/KLIcIab143wCeOuMpOxJBpCTtyy0GCtWEBSGCnKggQY0ovhL/XA1AUjJI0O5hCnILnVeCbocACxjEMdlawfmF0PX5Hq5HXiGcrzN9muwFric87Xd7OAUymKCDQHx1dJBghFCeLMcsqVyOLH5pU70BpYvq09LPbDaWkE1xId4QCsgmx+uji/lZRnoIrNVNu1qif9VW/w52gvlQ91zB0A2HZdi11OEjDJ9bCRa8ej+Bl9jgeWgmqTsUMJ0LAywE28llYQR4vnKFwJQvLTaYT+dSIx0fsbRfoILZMb7QGWWxWIGDv2NVDoYsp6ZqoykQn5qCCJWyLqmFgSGFZhg6YDgsSGH3bWTK+mMM7BW80NaoyJR0ZTHLUENPPw3YlHURhrvTekPkXsyq3lWGvmgq3NjFjYIZ5vyKYt2ewjCjsAiZBlOOVt7H/rDsqrX4GzYt5VJqFNvVOrncVPw2GMO+peGtZeSHMiW56Qbf5H63KXoRhctKFzG3VB5p4/SX6gmFJ5nCN2E27dqvYcxmbOBcv9CV3OftOr8XWMdQUgadBqnvHdrV9UfeKh+k0cGlPdCYn4vlWOGU0zsFjVrnLhoT5qcPKpwLtbvyzkzoM8nWZo0RUwgf93J5pQm0tvbWcgpFpCJElb9734fOogNSETXC072iSnlZ7vELnLfe+mv6AYyEOZ4mvtpBAAAAAElFTkSuQmCC" + } + })]), _vm._v(" "), _c("div", { + staticClass: "ai1wm-spinner ai1wm-spin-left" + }, [_c("img", { + attrs: { + src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAFpQTFRFAAAABp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/jBp/j79BQvAAAAB50Uk5TACA/f19Pn9//EO9vMM9gkMDgQIDwr7BwoL/QUPSTc7QwrgAAAa9JREFUeJztmGuXgiAQQFE3AyMzZdVy9///zdXaYJRHLqDn7DlzPwbN5TEDFCEIgiAIgiAI8s9J0mziI022MhzyI5Uc8wOLbmAZMDwpssiaU7FURNfws0kxceaxHKVxGr+TOUVy2BUT+Q6OKJa3DkovoQ6uhayu2kd1mIPNquN6eSZTUlYzSRGWyQ0IJUrQwGeazxBHAgK1i+F2ItKC9SpMrzVyYLn5OxKXg5AaTMX/WO5kjLtxazv3INahUsuy5iqbC1+HWq3K0gNUqu9JqUIMyybWTPdjmn7JLt/pxN8LRhaJcA0AYpuxg8r1XZPFnB4rJY2ptY/iIGenRLMIrxOMuiULi/DLL/dyjSl2D3coia2coUXL8pW0rwBHWw8mS760dXmHukysS/E6ib0dZHi389IScMszKSnsJzl37Nkq1L467tcyzAGPDseiD2HPCCZWWQKBj5VIj14dOBV62+rnFbjFR/LDNpb7zEKLWx74JjWRCLrAXpj+aC/uLSTaPbuJhAxiBwnh1x0khPU7SMa3dbWDZNS0O0jGkulasbnkIarraP9BIAiCIAiCIIiNHyohJRyvfZJVAAAAAElFTkSuQmCC" + } + })])]); +}]; +ai1wm_spinnervue_type_template_id_62088451_render._withStripped = true; + +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/ai1wm-spinner.vue?vue&type=template&id=62088451& + +;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./lib/view/assets-development/javascript/vue-components/ai1wm-spinner.vue?vue&type=script&lang=js& +/* harmony default export */ var ai1wm_spinnervue_type_script_lang_js_ = ({}); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/ai1wm-spinner.vue?vue&type=script&lang=js& + /* harmony default export */ var vue_components_ai1wm_spinnervue_type_script_lang_js_ = (ai1wm_spinnervue_type_script_lang_js_); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/ai1wm-spinner.vue + + + + + +/* normalize component */ +; +var ai1wm_spinner_component = normalizeComponent( + vue_components_ai1wm_spinnervue_type_script_lang_js_, + ai1wm_spinnervue_type_template_id_62088451_render, + ai1wm_spinnervue_type_template_id_62088451_staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var ai1wm_spinner = (ai1wm_spinner_component.exports); +// EXTERNAL MODULE: ./node_modules/file-saver/dist/FileSaver.min.js +var FileSaver_min = __webpack_require__(162); +;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./lib/view/assets-development/javascript/vue-components/archive/browser.vue?vue&type=script&lang=js& +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Tree = /*#__PURE__*/_createClass(function Tree(name) { + _classCallCheck(this, Tree); + + this.root = new Node(name, true); + this.root.parent = null; + this.root.tree = this; +}); + +var Node = /*#__PURE__*/function () { + function Node(name, expanded) { + _classCallCheck(this, Node); + + this.name = name; + this.children = []; + this.files = []; + this.expanded = !!expanded; + } + + _createClass(Node, [{ + key: "addChild", + value: function addChild(child) { + child.parent = this; + this.children.push(child); + return child; + } + }, { + key: "findNode", + value: function findNode(name) { + if (this.name === name) { + return this; + } + + return this.children.find(function (child) { + return child.findNode(name); + }); + } + }, { + key: "getRootNode", + value: function getRootNode() { + if (this.parent === null) { + return this; + } + + return this.parent.getRootNode(); + } + }]); + + return Node; +}(); + +var $ = jQuery; + + + + + +/* harmony default export */ var browservue_type_script_lang_js_ = ({ + components: { + Ai1wmSpinner: ai1wm_spinner, + ProgressBar: progress_bar, + Folder: folder + }, + data: function data() { + return { + error: null, + loading: true, + processing: true, + archive: null, + tree: null, + total: 100, + processed: 0 + }; + }, + watch: { + processed: function processed(newValue) { + var _this2 = this; + + if (newValue >= this.total) { + setTimeout(function () { + return _this2.processing = false; + }, 100); + } + } + }, + mounted: function mounted() { + event_bus.$on('ai1wm-list-content', this.listContent); + event_bus.$on('ai1wm-download-file', this.downloadFile); + }, + methods: { + listContent: function listContent(archive) { + this.error = null; + this.loading = true; + this.processing = true; + this.tree = new Tree(archive); + + var _this = this; + + this.archive = archive; + _this.processed = 0; + $.ajax({ + url: ai1wm_list.ajax.url, + type: 'POST', + dataType: 'json', + data: { + secret_key: ai1wm_list.secret_key, + archive: archive + } + }).done(function (data) { + if (data.error) { + _this.error = data.error; + _this.loading = false; + _this.processing = true; + return; + } + + setTimeout(function () { + _this.total = data.length; + _this.loading = false; + }, 5); + data.forEach(function (d) { + setTimeout(function () { + _this.addFile(d); + + _this.processed += 1; + }, 50); + }); + }).fail(function () { + _this.error = _this.__('archive_browser_list_error'); + _this.loading = false; + _this.processing = false; + }); + }, + downloadFile: function downloadFile(file) { + var params = { + secret_key: ai1wm_list.secret_key, + archive: this.archive, + file_name: file.name, + file_size: file.size, + offset: file.offset + }; + var request = new XMLHttpRequest(); + request.addEventListener('readystatechange', function () { + if (request.readyState === 2 && request.status === 200) {// Download is being started + } else if (request.readyState === 3) {// Download is under progress + } else if (request.readyState === 4) { + // Downloading has finished + if (request.status < 400) { + (0,FileSaver_min.saveAs)(request.response, Ai1wm.Util.basename(file.name)); + } else { + /* eslint-disable no-alert */ + alert(ai1wm_locale.archive_browser_download_error); + /* eslint-enable no-alert */ + } + } + }); + request.responseType = 'blob'; + var formData = new FormData(); + + for (var key in params) { + formData.append(key, params[key]); + } + + request.open('post', ai1wm_list.download.url); + request.send(formData); + }, + addFile: function addFile(f) { + var node = this.tree.root; + var name = f.filename; + var size = f.size; + var offset = f.offset; + var prefix = name.match(/[\\|/]/) ? this.getPrefix(name) : ''; + + if (prefix.length > 0) { + var parent = ''; + prefix.split('/').forEach(function (path) { + parent += '/' + path; + var foundNode = node.findNode(parent); + node = foundNode ? foundNode : node.addChild(new Node(parent)); + }); + } + + node.files.push({ + name: name, + size: size, + offset: offset + }); + }, + getPrefix: function getPrefix(filename) { + return Ai1wm.Util.dirname(filename); + }, + __: function __(key) { + return ai1wm_locale[key]; + } + } +}); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/archive/browser.vue?vue&type=script&lang=js& + /* harmony default export */ var archive_browservue_type_script_lang_js_ = (browservue_type_script_lang_js_); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/vue-components/archive/browser.vue + + + + + +/* normalize component */ +; +var browser_component = normalizeComponent( + archive_browservue_type_script_lang_js_, + render, + staticRenderFns, + false, + null, + null, + null + +) + +/* harmony default export */ var browser = (browser_component.exports); +;// CONCATENATED MODULE: ./lib/view/assets-development/javascript/backups.js +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Feedback = __webpack_require__(332); + +var Import = __webpack_require__(936); + +var Export = __webpack_require__(12); + +var Restore = __webpack_require__(874); + + + + // Vue.config.devtools = true; + +vue_common_prod_default().component('ArchiveBrowser', browser); +window.addEventListener('DOMContentLoaded', function () { + new (vue_common_prod_default())({ + el: '#ai1wm-backups-list-archive-browser' + }); +}); +jQuery(document).ready(function ($) { + 'use strict'; // 3 dots menu + + $('#ai1wm-backups-list').on('click', '.ai1wm-backup-dots', function (e) { + e.preventDefault(); + e.stopPropagation(); + var menu = $(this).next('div.ai1wm-backup-dots-menu'); + $('div.ai1wm-backup-dots-menu').not(menu).hide(); + $(menu).toggle(); + }); + $(document).on('click', 'body', function () { + $('div.ai1wm-backup-dots-menu').hide(); + }); // Delete file + + $('#ai1wm-backups-list').on('click', '.ai1wm-backup-delete', function (e) { + var self = $(this); + var counter = $('.ai1wm-menu-count'); // Delete file + + /* eslint-disable no-alert */ + + if (confirm(ai1wm_locale.want_to_delete_this_file)) { + /* eslint-enable no-alert */ + $.ajax({ + url: ai1wm_backups.ajax.url, + type: 'POST', + dataType: 'json', + data: { + secret_key: ai1wm_backups.secret_key, + archive: self.data('archive') + }, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (data) { + if (data.errors.length === 0) { + self.closest('tr').remove(); + counter.text(+counter.text() - 1); + + if (counter.text() > 1) { + counter.prop('title', ai1wm_locale.backups_count_plural.replace('%d', counter.text())); + } else { + if (+counter.text() === 0) { + counter.addClass('ai1wm-menu-hide'); + } + + counter.prop('title', ai1wm_locale.backups_count_singular.replace('%d', counter.text())); + } + + if ($('.ai1wm-backups tbody tr').length === 1) { + $('.ai1wm-backups').hide(); + $('.ai1wm-backups-empty').show(); + } + } + }); + } + + e.preventDefault(); + }); // Restore from file + + $('#ai1wm-backups-list').on('click', '.ai1wm-backup-restore', function (e) { + e.preventDefault(); + /* eslint-disable no-unused-vars */ + + if (Ai1wm.MultisiteExtensionRestore) { + var restore = new Ai1wm.MultisiteExtensionRestore($(this).data('archive'), $(this).data('size')); + } else if (Ai1wm.UnlimitedExtensionRestore) { + var _restore = new Ai1wm.UnlimitedExtensionRestore($(this).data('archive'), $(this).data('size')); + } else if (Ai1wm.FreeExtensionRestore) { + var _restore2 = new Ai1wm.FreeExtensionRestore($(this).data('archive'), $(this).data('size')); + } else { + var _restore3 = new Ai1wm.Restore($(this).data('archive'), $(this).data('size')); + } + /* eslint-enable no-unused-vars */ + + }); // List file content + + $('#ai1wm-backups-list').on('click', '.ai1wm-backup-list-content', function (e) { + e.preventDefault(); + event_bus.$emit('ai1wm-list-content', $(this).data('archive')); + }); + $('#ai1wm-backups-list').on('click', '.ai1wm-backup-label-description, .ai1wm-backup-label-text', function () { + $(this).hide(); + $(this).closest('.ai1wm-column-name').find('.ai1wm-backup-label-holder').show(); + $(this).closest('.ai1wm-column-name').find('.ai1wm-backup-label-field').trigger('focus'); + }); + $('#ai1wm-backups-list').on('keydown', '.ai1wm-backup-label-field', function (e) { + var self = $(this); + var spinner = $(''); // Update backup label + + if (e.which === 13) { + e.preventDefault(); + self.hide(); + self.closest('.ai1wm-backup-label-holder').append(spinner); + $.ajax({ + url: ai1wm_backups.labels.url, + type: 'POST', + dataType: 'json', + data: { + secret_key: ai1wm_backups.secret_key, + archive: self.data('archive'), + label: self.val() + }, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (data) { + if (data.errors.length === 0) { + spinner.remove(); + self.show(); + + if (self.val()) { + self.closest('.ai1wm-backup-label-holder').hide(); + self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').show(); + self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-colored').text(self.val()); + } else { + self.closest('.ai1wm-backup-label-holder').hide(); + self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-description').removeClass('ai1wm-backup-label-selected').removeAttr('style'); + } + + self.data('value', self.val()); + } + }); + } else if (e.which === 27) { + e.preventDefault(); + + if (self.data('value')) { + self.closest('.ai1wm-backup-label-holder').hide(); + self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').show(); + } else { + self.closest('.ai1wm-backup-label-holder').hide(); + self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-text').hide(); + self.closest('.ai1wm-column-name').find('.ai1wm-backup-label-description').removeClass('ai1wm-backup-label-selected').removeAttr('style'); + } + + self.val(self.data('value')); + } + }); + $(document).on('ai1wm-export-status', function (e, params) { + if (params.type === 'download') { + if ($('.ai1wm-backups tbody tr').length > 1) { + $('.ai1wm-backups-list-spinner-holder').show(); + } else { + $('.ai1wm-backups-empty').hide(); + $('.ai1wm-backups-empty-spinner-holder').show(); + } + + $.get(ai1wm_backups.backups.url, { + secret_key: ai1wm_backups.secret_key + }).done(function (data) { + $('#ai1wm-backups-create').find('.ai1wm-backups-empty').hide(); + $('#ai1wm-backups-create').find('.ai1wm-backups-empty-spinner-holder').hide(); + $('#ai1wm-backups-list').html(data); + }); + } + }); + var model = new Export(); + $('#ai1wm-create-backup').on('click', function (e) { + var storage = Ai1wm.Util.random(12); + var options = Ai1wm.Util.form('#ai1wm-export-form').concat({ + name: 'storage', + value: storage + }).concat({ + name: 'file', + value: 1 + }); // Set global params + + model.setParams(options); // Start export + + model.start(); + e.preventDefault(); + }); +}); +__webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, { + Feedback: Feedback, + Import: Import, + Restore: Restore, + Export: Export +}); +}(); +/******/ })() +; \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/export.min.js b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/export.min.js new file mode 100644 index 0000000..cff789b --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/export.min.js @@ -0,0 +1,901 @@ +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 12: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Modal = __webpack_require__(326), + $ = jQuery; + +var Export = function Export() { + var self = this; // Set params + + this.params = []; // Set modal + + this.modal = new Modal(); // Set stop listener + + this.modal.onStop = function (options) { + self.onStop(options); + }; +}; + +Export.prototype.setParams = function (params) { + this.params = Ai1wm.Util.list(params); +}; + +Export.prototype.start = function (options, retries) { + var self = this; + retries = retries || 0; // Reset stop flag + + if (retries === 0) { + this.stopExport(false); + } // Stop running export + + + if (this.isExportStopped()) { + return; + } // Initializing beforeunload event + + + $(window).bind('beforeunload', function () { + return ai1wm_locale.stop_exporting_your_website; + }); // Set initial status + + this.setStatus({ + type: 'info', + message: ai1wm_locale.preparing_to_export + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_export.secret_key + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Export + + + $.ajax({ + url: ai1wm_export.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: ai1wm_locale.unable_to_start_the_export + }); + return; + } + + retries++; + setTimeout(self.start.bind(self, options, retries), timeout); + }); +}; + +Export.prototype.run = function (params, retries) { + var self = this; + retries = retries || 0; // Stop running export + + if (this.isExportStopped()) { + return; + } // Export + + + $.ajax({ + url: ai1wm_export.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: ai1wm_locale.unable_to_run_the_export + }); + return; + } + + retries++; + setTimeout(self.run.bind(self, params, retries), timeout); + }); +}; + +Export.prototype.clean = function (options, retries) { + var self = this; + retries = retries || 0; // Reset stop flag + + if (retries === 0) { + this.stopExport(true); + } // Set initial status + + + this.setStatus({ + type: 'info', + message: ai1wm_locale.please_wait_stopping_the_export + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_export.secret_key + }).concat({ + name: 'priority', + value: 300 + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Clean + + + $.ajax({ + url: ai1wm_export.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + // Unbinding the beforeunload event when we stop exporting + $(window).unbind('beforeunload'); // Destroy modal + + self.modal.destroy(); + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopExport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_export, + message: ai1wm_locale.unable_to_stop_the_export + }); + return; + } + + retries++; + setTimeout(self.clean.bind(self, options, retries), timeout); + }); +}; + +Export.prototype.getStatus = function () { + var self = this; // Stop getting status + + if (this.isExportStopped()) { + return; + } + + this.statusXhr = $.ajax({ + url: ai1wm_export.status.url, + type: 'GET', + dataType: 'json', + cache: false, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (params) { + if (params) { + self.setStatus(params); // Next status + + switch (params.type) { + case 'done': + case 'error': + case 'download': + // Unbinding beforeunload event when any case is performed + $(window).unbind('beforeunload'); + return; + } + } // Export is not done yet, let's check status in 3 seconds + + + setTimeout(self.getStatus.bind(self), 3000); + }).fail(function () { + // Export is not done yet, let's check status in 3 seconds + setTimeout(self.getStatus.bind(self), 3000); + }); +}; + +Export.prototype.setStatus = function (params) { + this.modal.render(params); +}; + +Export.prototype.onStop = function (options) { + this.clean(options); +}; + +Export.prototype.stopExport = function (isStopped) { + try { + if (isStopped && this.statusXhr) { + this.statusXhr.abort(); + } + } finally { + this.isStopped = isStopped; + } +}; + +Export.prototype.isExportStopped = function () { + return this.isStopped; +}; + +module.exports = Export; + +/***/ }), + +/***/ 326: +/***/ (function(module) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var $ = jQuery; + +var Modal = function Modal() { + var self = this; // Error Modal + + this.error = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-red').text(params.title); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_export); // Append close button to action + + action.append(closeButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Info Modal + + + this.info = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold loader + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create loader + + var loader = $(''); // Create stop export + + var stopButton = $('').on('click', function () { + stopButton.attr('disabled', 'disabled'); + self.onStop(); + }); // Append text to stop button + + stopButton.append(' ' + ai1wm_locale.stop_export); // Append stop button to action + + action.append(stopButton); // Append loader to header + + header.append(loader); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Done Modal + + + this.done = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-green').text(params.title); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_export); // Append close button to action + + action.append(closeButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Download Modal + + + this.download = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); + var counter = $('.ai1wm-menu-count'); // Update counter text + + counter.text(+counter.text() + 1); + + if (counter.text() > 1) { + counter.prop('title', ai1wm_locale.backups_count_plural.replace('%d', counter.text())); + } else { + counter.removeClass('ai1wm-menu-hide'); + counter.prop('title', ai1wm_locale.backups_count_singular.replace('%d', counter.text())); + } // Append text to close button + + + closeButton.append(ai1wm_locale.close_export); // Append close button to action + + action.append(closeButton); // Append message to section + + section.append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Create the overlay + + + this.overlay = $('
'); // Create the modal container + + this.modal = $(''); + $('body').append(this.overlay) // Append overlay to body + .append(this.modal); // Append modal to body +}; + +Modal.prototype.render = function (params) { + $(document).trigger('ai1wm-export-status', params); // Show modal + + switch (params.type) { + case 'error': + this.error(params); + break; + + case 'info': + this.info(params); + break; + + case 'done': + this.done(params); + break; + + case 'download': + this.download(params); + break; + } +}; + +Modal.prototype.destroy = function () { + this.modal.hide(); + this.overlay.hide(); +}; + +module.exports = Modal; + +/***/ }), + +/***/ 813: +/***/ (function() { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +(function ($) { + $.fn.ai1wm_find_replace = function () { + $(this).on('click', function (e) { + e.preventDefault(); + var row = $('#ai1wm-queries > li:first').clone(); // Reset input values + + row.find('input').val(''); // Reset ai1wm-query-find-text + + row.find('.ai1wm-query-find-text').html('<text>'); // Reset ai1wm-query-replace-text + + row.find('.ai1wm-query-replace-text').html('<another-text>'); + $('#ai1wm-queries > li').removeClass('ai1wm-open'); + $(row).addClass('ai1wm-open'); // Add new replace fields + + $('#ai1wm-queries').append(row); + $(row).ai1wm_query(); + $(row).find('p:first').on('click', function () { + $(this).parent().toggleClass('ai1wm-open'); + }); + }); + return this; + }; +})(jQuery); + +/***/ }), + +/***/ 88: +/***/ (function() { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +(function ($) { + $.fn.ai1wm_query = function () { + var findInput = $(this).find('input.ai1wm-query-find-input'), + replaceInput = $(this).find('input.ai1wm-query-replace-input'), + findText = $(this).find('small.ai1wm-query-find-text'), + replaceText = $(this).find('small.ai1wm-query-replace-text'); + findInput.on('change paste input keypress keydown keyup', function () { + var _inputValue = $(this).val().length > 0 ? $(this).val() : ''; + + findText.text(_inputValue); + }); + replaceInput.on('change paste input keypress keydown keyup', function () { + var _inputValue = $(this).val().length > 0 ? $(this).val() : ''; + + replaceText.text(_inputValue); + }); + return this; + }; +})(jQuery); + +/***/ }), + +/***/ 332: +/***/ (function() { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +jQuery(document).ready(function ($) { + 'use strict'; // Idea + + $('#ai1wm-feedback-type-link-1').on('click', function () { + var radio = $('#ai1wm-feedback-type-1'); + + if (radio.is(':checked')) { + radio.attr('checked', false); + } else { + radio.attr('checked', true); + } + }); // Help + + $('#ai1wm-feedback-type-2').on('click', function () { + // Hide other options + $('#ai1wm-feedback-type-1').closest('li').hide(); // Change placeholder message + + $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you); // Show feedback form + + $('.ai1wm-feedback-form').fadeIn(); + }); // Cancel feedback form + + $('#ai1wm-feedback-cancel').on('click', function (e) { + $('.ai1wm-feedback-form').fadeOut(function () { + $('.ai1wm-feedback-type').attr('checked', false).closest('li').show(); + }); + e.preventDefault(); + }); // Send feedback form + + $('#ai1wm-feedback-submit').on('click', function (e) { + var self = $(this); + var spinner = self.next(); + var type = $('.ai1wm-feedback-type:checked').val(); + var email = $('.ai1wm-feedback-email').val(); + var message = $('.ai1wm-feedback-message').val(); + var terms = $('.ai1wm-feedback-terms').is(':checked'); + self.attr('disabled', true); + spinner.css('visibility', 'visible'); + $.ajax({ + url: ai1wm_feedback.ajax.url, + type: 'POST', + dataType: 'json', + async: true, + data: { + secret_key: ai1wm_feedback.secret_key, + ai1wm_type: type, + ai1wm_email: email, + ai1wm_message: message, + ai1wm_terms: +terms + }, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (data) { + self.attr('disabled', false); + spinner.css('visibility', 'hidden'); + + if (data.errors.length > 0) { + $('.ai1wm-feedback .ai1wm-message').remove(); + var errorMessage = $('
').addClass('ai1wm-message ai1wm-error-message'); + $.each(data.errors, function (key, value) { + errorMessage.append($('

').text(value)); + }); + $('.ai1wm-feedback').prepend(errorMessage); + } else { + var successMessage = $('

').addClass('ai1wm-message ai1wm-success-message'); + successMessage.append($('

').text(ai1wm_locale.thanks_for_submitting_your_feedback)); + $('.ai1wm-feedback').html(successMessage); + } + }); + e.preventDefault(); + }); +}); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Query = __webpack_require__(88), + FindReplace = __webpack_require__(813), + Feedback = __webpack_require__(332), + Export = __webpack_require__(12); + +jQuery(document).ready(function ($) { + 'use strict'; + + var model = new Export(); // Export to file + + $('#ai1wm-export-file').on('click', function (e) { + if ($('#ai1wm-encrypt-backups').is(':checked')) { + var passwordInput = $('#ai1wm-backup-encrypt-password'); + var passwordConfirmationInput = $('#ai1wm-backup-encrypt-password-confirmation'); + + if (!passwordInput.val().length) { + passwordInput.parent().addClass('ai1wm-has-error'); + passwordInput.focus(); + return false; + } + + if (passwordInput.val() !== passwordConfirmationInput.val()) { + passwordConfirmationInput.parent().addClass('ai1wm-has-error'); + passwordConfirmationInput.focus(); + return false; + } + } + + var storage = Ai1wm.Util.random(12); + var options = Ai1wm.Util.form('#ai1wm-export-form').concat({ + name: 'storage', + value: storage + }).concat({ + name: 'file', + value: 1 + }); // Set global params + + model.setParams(options); // Start export + + model.start(); + e.preventDefault(); + }); + $('.ai1wm-accordion > .ai1wm-title').on('click', function () { + $(this).parent().toggleClass('ai1wm-active'); + }); + $('#ai1wm-add-new-replace-button').ai1wm_find_replace(); + $('.ai1wm-expandable > p:first, .ai1wm-expandable > h4:first, .ai1wm-expandable > div.ai1wm-button-main').on('click', function () { + $(this).parent().toggleClass('ai1wm-open'); + }); + $('.ai1wm-query').ai1wm_query(); + $('.ai1wm-toggle-password-visibility').on('click', function () { + $(this).toggleClass('ai1wm-icon-eye ai1wm-icon-eye-blocked'); + $(this).prev().prop('type', function (index, oldPropertyValue) { + return oldPropertyValue === 'text' ? 'password' : 'text'; + }); + return false; + }); + $('#ai1wm-encrypt-backups').on('click', function () { + $('.ai1wm-encrypt-backups-passwords-toggle').toggle(); + }); + $('#ai1wm-backup-encrypt-password').on('keyup', function () { + var passwordInput = $(this); + var passwordConfirmationInput = $('#ai1wm-backup-encrypt-password-confirmation'); + + if (passwordInput.val() !== passwordConfirmationInput.val()) { + passwordConfirmationInput.parent().addClass('ai1wm-has-error'); + } + + if (passwordInput.val().length) { + passwordInput.parent().removeClass('ai1wm-has-error'); + } + }); + $('#ai1wm-backup-encrypt-password-confirmation').on('keyup', function () { + var passwordConfirmationInput = $(this); + var passwordInput = $('#ai1wm-backup-encrypt-password'); + + if (passwordInput.val() !== passwordConfirmationInput.val()) { + passwordConfirmationInput.parent().addClass('ai1wm-has-error'); + } else { + passwordConfirmationInput.parent().removeClass('ai1wm-has-error'); + } + }); +}); +__webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, { + Query: Query, + FindReplace: FindReplace, + Feedback: Feedback, + Export: Export +}); +}(); +/******/ })() +; \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/import.min.js b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/import.min.js new file mode 100644 index 0000000..e0b9af9 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/import.min.js @@ -0,0 +1,1573 @@ +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 936: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Modal = __webpack_require__(544), + $ = jQuery; + +var Import = function Import() { + var self = this; // Set params + + this.params = []; // Set modal + + this.modal = new Modal(); // Set confirm listener + + this.modal.onConfirm = function (options) { + self.onConfirm(options); + }; // Set blogs listener + + + this.modal.onBlogs = function (options) { + self.onBlogs(options); + }; // Set stop listener + + + this.modal.onStop = function (options) { + self.onStop(options); + }; // Set disk space listener + + + this.modal.onDiskSpaceConfirm = function (options) { + self.onDiskSpaceConfirm(options); + }; // Set decrypt password listener + + + this.modal.onDecryptPassword = function (password, options) { + self.onDecryptPassword(password, options); + }; +}; + +Import.prototype.setParams = function (params) { + this.params = Ai1wm.Util.list(params); +}; + +Import.prototype.start = function (options, retries) { + var self = this; + retries = retries || 0; // Reset stop flag + + if (retries === 0) { + this.stopImport(false); + } // Stop running import + + + if (this.isImportStopped()) { + return; + } // Initializing beforeunload event + + + $(window).bind('beforeunload', function () { + return ai1wm_locale.stop_importing_your_website; + }); // Set initial status + + this.setStatus({ + type: 'info', + message: ai1wm_locale.preparing_to_import + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Import + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_start_the_import + }); + return; + } + + retries++; + setTimeout(self.start.bind(self, options, retries), timeout); + }); +}; + +Import.prototype.run = function (params, retries) { + var self = this; + retries = retries || 0; // Stop running import + + if (this.isImportStopped()) { + return; + } // Import + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + retries++; + setTimeout(self.run.bind(self, params, retries), timeout); + }); +}; + +Import.prototype.decryptPassword = function (options, password, retries) { + var self = this; + retries = retries || 0; // Stop running import + + if (this.isImportStopped()) { + return; + } + + this.params = this.params.concat({ + name: 'decryption_password', + value: password + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }).concat({ + name: 'priority', + value: 90 + }); + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_check_decryption_password + }); + return; + } + + retries++; + setTimeout(self.decryptPassword.bind(self, options, password, retries), timeout); + }); +}; + +Import.prototype.confirm = function (options, retries) { + var self = this; + retries = retries || 0; // Stop running import + + if (this.isImportStopped()) { + return; + } // Set params + + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }).concat({ + name: 'priority', + value: 150 + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Confirm + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_confirm_the_import + }); + return; + } + + retries++; + setTimeout(self.confirm.bind(self, options, retries), timeout); + }); +}; + +Import.prototype.checkDiskSpace = function (fileSize, callback) { + this.diskSpaceCallback = callback; + var diskSpaceFree = parseInt(ai1wm_disk_space.free, 10); + var diskSpaceFactor = parseInt(ai1wm_disk_space.factor, 10); + var diskSpaceExtra = parseInt(ai1wm_disk_space.extra, 10); + + if (diskSpaceFree >= 0) { + var diskSpaceRequired = fileSize * diskSpaceFactor + diskSpaceExtra; + + if (diskSpaceRequired > diskSpaceFree) { + this.setStatus({ + type: 'disk_space_confirm', + message: ai1wm_locale.out_of_disk_space.replace('%s', Ai1wm.Util.sizeFormat(diskSpaceRequired - diskSpaceFree)) + }); + return; + } + } + + callback(); +}; + +Import.prototype.blogs = function (options, retries) { + var self = this; + retries = retries || 0; // Stop running import + + if (this.isImportStopped()) { + return; + } // Set params + + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }).concat({ + name: 'priority', + value: 150 + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Blogs + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + self.getStatus(); + }).done(function (result) { + if (result) { + self.run(result); + } + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_prepare_blogs_on_import + }); + return; + } + + retries++; + setTimeout(self.blogs.bind(self, options, retries), timeout); + }); +}; + +Import.prototype.clean = function (options, retries) { + var self = this; + retries = retries || 0; // Reset stop flag + + if (retries === 0) { + this.stopImport(true); + } // Set initial status + + + this.setStatus({ + type: 'info', + message: ai1wm_locale.please_wait_stopping_the_import + }); // Set params + + var params = this.params.concat({ + name: 'secret_key', + value: ai1wm_import.secret_key + }).concat({ + name: 'priority', + value: 400 + }); // Set additional params + + if (options) { + params = params.concat(Ai1wm.Util.list(options)); + } // Clean + + + $.ajax({ + url: ai1wm_import.ajax.url, + type: 'POST', + dataType: 'json', + data: params, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + // Unbinding the beforeunload event when we stop importing + $(window).unbind('beforeunload'); // Destroy modal + + self.modal.destroy(); + }).fail(function (xhr) { + var timeout = retries * 1000; + + try { + var json = Ai1wm.Util.json(xhr.responseText); + + if (json) { + var result = JSON.parse(json); + var error = result.errors.pop(); + + if (error.message) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); + return; + } + } + } catch (e) {} + + if (retries >= 5) { + self.stopImport(true); + self.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: ai1wm_locale.unable_to_stop_the_import + }); + return; + } + + retries++; + setTimeout(self.clean.bind(self, options, retries), timeout); + }); +}; + +Import.prototype.getStatus = function () { + var self = this; // Stop getting status + + if (this.isImportStopped()) { + return; + } + + this.statusXhr = $.ajax({ + url: ai1wm_import.status.url, + type: 'GET', + dataType: 'json', + cache: false, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (params) { + if (params) { + self.setStatus(params); // Next status + + switch (params.type) { + case 'done': + case 'error': + // Unbinding the beforeunload event when any case is performed + $(window).unbind('beforeunload'); + return; + + case 'confirm': + case 'disk_space_confirm': + case 'blogs': + case 'backup_is_encrypted': + return; + } + } // Import is not done yet, let's check status in 3 seconds + + + setTimeout(self.getStatus.bind(self), 3000); + }).fail(function () { + // Import is not done yet, let's check status in 3 seconds + setTimeout(self.getStatus.bind(self), 3000); + }); +}; + +Import.prototype.setStatus = function (params) { + this.modal.render(params); +}; + +Import.prototype.onConfirm = function (options) { + this.confirm(options); +}; + +Import.prototype.onDecryptPassword = function (password, options) { + this.decryptPassword(options, password); +}; + +Import.prototype.onBlogs = function (options) { + this.blogs(options); +}; + +Import.prototype.onStop = function (options) { + this.clean(options); +}; + +Import.prototype.onDiskSpaceConfirm = function (options) { + this.diskSpaceCallback(options); +}; + +Import.prototype.stopImport = function (isStopped) { + try { + if (isStopped && this.statusXhr) { + this.statusXhr.abort(); + } + } finally { + this.isStopped = isStopped; + } +}; + +Import.prototype.isImportStopped = function () { + return this.isStopped; +}; + +module.exports = Import; + +/***/ }), + +/***/ 544: +/***/ (function(module) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var $ = jQuery; + +var Modal = function Modal() { + var self = this; // Error Modal + + this.error = function (params) { + // Create the modal container + var container = $('

'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-red').text(params.title); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append close button to action + + action.append(closeButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Progress Modal + + + this.progress = function (params) { + // Update progress bar meter + if (this.progress.progressBarMeter) { + this.progress.progressBarMeter.width(params.percent + '%'); + } // Update progress bar percent + + + if (this.progress.progressBarPercent) { + this.progress.progressBarPercent.text(params.percent + '%'); + return; + } // Create the modal container + + + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold progress bar + + var header = $('

'); // Create action section + + var action = $('
'); // Create progress bar + + var progressBar = $(''); // Create progress bar meter + + this.progress.progressBarMeter = $('').width(params.percent + '%'); // Create progress bar percent + + this.progress.progressBarPercent = $('').text(params.percent + '%'); // Create stop import + + var stopButton = $('').on('click', function () { + stopButton.attr('disabled', 'disabled'); + self.onStop(); + }); // Append text to stop button + + stopButton.append(' ' + ai1wm_locale.stop_import); // Append progress meter and progress percent + + progressBar.append(this.progress.progressBarMeter).append(this.progress.progressBarPercent); // Append stop button to action + + action.append(stopButton); // Append progress bar to section + + header.append(progressBar); // Append header to section + + section.append(header); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Pro Modal + + + this.pro = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold warning + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create warning + + var warning = $(''); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append close button to action + + action.append(closeButton); // Append warning to section + + header.append(warning); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Confirm Modal + + + this.confirm = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold warning + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create warning + + var warning = $(''); // Create close button + + var closeButton = $('').on('click', function () { + closeButton.attr('disabled', 'disabled'); + self.onStop(); + }); // Create confirm button + + var confirmButton = $('').on('click', function () { + confirmButton.attr('disabled', 'disabled'); + self.onConfirm(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append text to confirm button + + confirmButton.append(ai1wm_locale.confirm_import + ' >'); // Append close button to action + + action.append(closeButton); // Append confirm button to action + + action.append(confirmButton); // Append warning to section + + header.append(warning); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Disk space Confirm Modal + + + this.diskSpaceConfirm = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold warning + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create warning + + var warning = $(''); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Create confirm button + + var confirmButton = $('').on('click', function () { + $(this).attr('disabled', 'disabled'); + self.onDiskSpaceConfirm(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append text to confirm button + + confirmButton.append(ai1wm_locale.confirm_disk_space); // Append close button to action + + action.append(closeButton); // Append confirm button to action + + action.append(confirmButton); // Append warning to section + + header.append(warning); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Blogs Modal + + + this.blogs = function (params) { + // Create the modal container + var container = $('
').on('submit', function (e) { + e.preventDefault(); + continueButton.attr('disabled', 'disabled'); + self.onBlogs(container.serializeArray()); + }); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-grey').text(params.title); // Create continue button + + var continueButton = $(''); // Append text to continue button + + continueButton.append(ai1wm_locale.continue_import); // Append continue button to action + + action.append(continueButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Info Modal + + + this.info = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold loader + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create loader + + var loader = $(''); // Create warning + + var warning = $('

').html(ai1wm_locale.please_do_not_close_this_browser); // Create notice to be displayed during import process + + var notice = $('
'); // Append warning to notice + + notice.append(warning); // Append stop button to action + + action.append(notice); // Append loader to header + + header.append(loader); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Done Modal + + + this.done = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create action section + + var action = $('
'); // Create title + + var title = $('').addClass('ai1wm-title-green').text(params.title); // Create close button + + var closeButton = $('').on('click', function () { + self.destroy(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.finish_import + ' >'); // Append close button to action + + action.append(closeButton); // Append title to section + + header.append(title); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; + + this.backup_is_encrypted = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

').html(ai1wm_locale.backup_encrypted); + var message = $('

').html(ai1wm_locale.backup_encrypted_message); + var confirmButton = $('').on('click', function () { + var password = $('#ai1wm-backup-decrypt-password'); + var passwordConfirmation = $('#ai1wm-backup-decrypt-password-confirmation'); + + if (password.val().length && password.val() === passwordConfirmation.val()) { + confirmButton.attr('disabled', 'disabled'); + self.onDecryptPassword(password.val()); + } else { + passwordConfirmation.parent().addClass('ai1wm-has-error'); + password.parent().addClass('ai1wm-has-error'); + } + }); + var closeButton = $('').on('click', function () { + closeButton.attr('disabled', 'disabled'); + self.onStop(); + }); + var form = $('
'); + var passwordContainer = $('
'); + var passwordInput = $('').prop('placeholder', ai1wm_locale.enter_password).on('keyup', function () { + var password = $(this); + var passwordConfirmation = $('#ai1wm-backup-decrypt-password-confirmation'); + + if (password.val() !== passwordConfirmation.val()) { + passwordConfirmation.parent().addClass('ai1wm-has-error'); + password.parent().addClass('ai1wm-has-error'); + } else { + password.parent().removeClass('ai1wm-has-error'); + passwordConfirmation.parent().removeClass('ai1wm-has-error'); + } + }); + var passwordView = $('
').on('click', function () { + $(this).toggleClass('ai1wm-icon-eye ai1wm-icon-eye-blocked'); + $(this).prev().prop('type', function (index, oldPropertyValue) { + return oldPropertyValue === 'text' ? 'password' : 'text'; + }); + return false; + }); + passwordContainer.append(passwordInput).append(passwordView); + + if (params.error) { + passwordContainer.addClass('ai1wm-has-error'); + var passwordError = $('
').html(params.error); + passwordContainer.append(passwordError); + } + + var passwordConfirmationContainer = $('
'); + var passwordConfirmationInput = $('').prop('placeholder', ai1wm_locale.repeat_password).on('keyup', function () { + var passwordConfirmation = $(this); + var password = $('#ai1wm-backup-decrypt-password'); + + if (passwordInput.val() !== passwordConfirmation.val()) { + password.parent().addClass('ai1wm-has-error'); + passwordConfirmation.parent().addClass('ai1wm-has-error'); + } else { + password.parent().removeClass('ai1wm-has-error'); + passwordConfirmation.parent().removeClass('ai1wm-has-error'); + } + }); + var passwordConfirmationView = $('').on('click', function () { + $(this).toggleClass('ai1wm-icon-eye ai1wm-icon-eye-blocked'); + $(this).prev().prop('type', function (index, oldPropertyValue) { + return oldPropertyValue === 'text' ? 'password' : 'text'; + }); + return false; + }); + var passwordConfirmationError = $('
').html(ai1wm_locale.passwords_do_not_match); + passwordConfirmationContainer.append(passwordConfirmationInput).append(passwordConfirmationView).append(passwordConfirmationError); + confirmButton.append(ai1wm_locale.submit); + closeButton.append(ai1wm_locale.close_import); + var buttonContainer = $('
'); + buttonContainer.append(closeButton).append(confirmButton); + form.append(passwordContainer).append(passwordConfirmationContainer); // Append header and message to section + + section.append(header).append(message).append(form).append(buttonContainer); // Append section and action to container + + container.append(section); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Server cannot decrypt Modal + + + this.server_cannot_decrypt = function (params) { + // Create the modal container + var container = $('
'); // Create section to hold title, message and action + + var section = $('
'); // Create header to hold title + + var header = $('

'); // Create paragraph to hold mesage + + var message = $('

').html(params.message); // Create warning + + var warning = $(''); // Create action section + + var action = $('
'); // Create close button + + var closeButton = $('').on('click', function () { + closeButton.attr('disabled', 'disabled'); + self.onStop(); + }); // Append text to close button + + closeButton.append(ai1wm_locale.close_import); // Append close button to action + + action.append(closeButton); // Append warning to header + + header.append(warning); // Append header and message to section + + section.append(header).append(message); // Append section and action to container + + container.append(section).append(action); // Render modal + + self.modal.html(container).show(); + self.modal.trigger('focus'); + self.overlay.show(); + }; // Create the overlay + + + this.overlay = $('
'); // Create the modal container + + this.modal = $(''); + $('body').append(this.overlay) // Append overlay to body + .append(this.modal); // Append modal to body +}; + +Modal.prototype.render = function (params) { + $(document).trigger('ai1wm-import-status', params); // Show modal + + switch (params.type) { + case 'pro': + this.pro(params); + break; + + case 'error': + this.error(params); + break; + + case 'confirm': + this.confirm(params); + break; + + case 'disk_space_confirm': + this.diskSpaceConfirm(params); + break; + + case 'blogs': + this.blogs(params); + break; + + case 'progress': + this.progress(params); + break; + + case 'info': + this.info(params); + break; + + case 'done': + this.done(params); + break; + + case 'backup_is_encrypted': + this.backup_is_encrypted(params); + break; + + case 'server_cannot_decrypt': + this.server_cannot_decrypt(params); + break; + } +}; + +Modal.prototype.destroy = function () { + this.modal.hide(); + this.overlay.hide(); // Reset progress bar + + this.progress.progressBarMeter = null; + this.progress.progressBarPercent = null; +}; + +module.exports = Modal; + +/***/ }), + +/***/ 814: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Import = __webpack_require__(936), + $ = jQuery; + +var FileUploader = function FileUploader() {}; + +FileUploader.prototype.setDefaultValues = function () { + this.model = new Import(); + this.stopUpload = false; +}; + +FileUploader.prototype.init = function () { + var _this = this; + + var formElement = $('#ai1wm-import-form'); + var selectElement = $('#ai1wm-import-file'); + var dropElement = $('#ai1wm-drag-drop-area'); + selectElement.on('change', function (e) { + _this.setDefaultValues(); + + var file = e.target.files.item(0); + + if (file) { + _this.fileSize = file.size; + + if (_this.fileSize > ai1wm_uploader.max_file_size) { + _this.model.setStatus({ + type: 'pro', + message: ai1wm_locale.import_from_file + }); + } else { + _this.model.checkDiskSpace(_this.fileSize, function () { + try { + _this.onFilesAdded(file); + + _this.onBeforeUpload(file); + + _this.upload(file); + } catch (error) { + _this.onError(error); + } + }); + } + } + + formElement.trigger('reset'); + e.preventDefault(); + }); + dropElement.on('dragenter', function (e) { + dropElement.addClass('ai1wm-drag-over'); + e.preventDefault(); + }); + dropElement.on('dragover', function (e) { + dropElement.addClass('ai1wm-drag-over'); + e.preventDefault(); + }); + dropElement.on('dragleave', function (e) { + dropElement.removeClass('ai1wm-drag-over'); + e.preventDefault(); + }); + dropElement.on('drop', function (e) { + _this.setDefaultValues(); + + dropElement.removeClass('ai1wm-drag-over'); + var file = e.originalEvent.dataTransfer.files.item(0); + + if (file) { + _this.fileSize = file.size; + + if (_this.fileSize > ai1wm_uploader.max_file_size) { + _this.model.setStatus({ + type: 'pro', + message: ai1wm_locale.import_from_file + }); + } else { + _this.model.checkDiskSpace(_this.fileSize, function () { + try { + _this.onFilesAdded(file); + + _this.onBeforeUpload(file); + + _this.upload(file); + } catch (error) { + _this.onError(error); + } + }); + } + } + + formElement.trigger('reset'); + e.preventDefault(); + }); +}; // Check extension + + +FileUploader.prototype.c1 = function (file) { + if (file.name.substr(-6) !== 'wpress') { + throw new Error(ai1wm_locale.invalid_archive_extension); + } +}; // Check compatibility + + +FileUploader.prototype.c3 = function () { + if (ai1wm_compatibility.messages.length > 0) { + throw new Error(ai1wm_compatibility.messages.join()); + } +}; + +FileUploader.prototype.onFilesAdded = function (file) { + this.c1(file); + this.c3(file); // Initializing beforeunload event + + $(window).bind('beforeunload', function () { + return ai1wm_locale.stop_importing_your_website; + }); +}; + +FileUploader.prototype.onBeforeUpload = function (file) { + var self = this; + var storage = Ai1wm.Util.random(12); + var options = Ai1wm.Util.form('#ai1wm-import-form').concat({ + name: 'storage', + value: storage + }).concat({ + name: 'archive', + value: file.name + }).concat({ + name: 'file', + value: 1 + }); // Set global params + + this.model.setParams(options); // Set multipart params + + $.extend(ai1wm_uploader.params, { + storage: storage, + archive: file.name + }); // Set stop + + this.model.onStop = function () { + self.stopUpload = true; // Clean storage + + self.model.clean(); + }; // Set status + + + this.model.setStatus({ + type: 'progress', + percent: '0.00' + }); +}; + +FileUploader.prototype.upload = function (file) { + var self = this; + var formData = new FormData(); + formData.append('upload-file', file); + + for (var name in ai1wm_uploader.params) { + formData.append(name, ai1wm_uploader.params[name]); + } + + $.ajax({ + url: ai1wm_uploader.url, + type: 'POST', + data: formData, + cache: false, + contentType: false, + processData: false, + xhr: function xhr() { + var handle = $.ajaxSettings.xhr(); + + if (handle.upload) { + handle.upload.addEventListener('progress', function (event) { + var percent = event.loaded / event.total * 100; + self.model.setStatus({ + type: 'progress', + percent: percent.toFixed(2) + }); + }); + } + + return handle; + }, + success: function success() { + if (self.stopUpload) { + return; + } + + self.onFileUploaded(); + }, + error: function error(jqXHR, textStatus) { + throw new Error(textStatus); + } + }); +}; + +FileUploader.prototype.onUploadProgress = function (percent) { + this.model.setStatus({ + type: 'progress', + percent: percent + }); +}; + +FileUploader.prototype.onFileUploaded = function () { + this.model.start(); +}; + +FileUploader.prototype.onError = function (error) { + this.model.setStatus({ + type: 'error', + title: ai1wm_locale.unable_to_import, + message: error.message + }); +}; + +module.exports = FileUploader; + +/***/ }), + +/***/ 332: +/***/ (function() { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +jQuery(document).ready(function ($) { + 'use strict'; // Idea + + $('#ai1wm-feedback-type-link-1').on('click', function () { + var radio = $('#ai1wm-feedback-type-1'); + + if (radio.is(':checked')) { + radio.attr('checked', false); + } else { + radio.attr('checked', true); + } + }); // Help + + $('#ai1wm-feedback-type-2').on('click', function () { + // Hide other options + $('#ai1wm-feedback-type-1').closest('li').hide(); // Change placeholder message + + $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you); // Show feedback form + + $('.ai1wm-feedback-form').fadeIn(); + }); // Cancel feedback form + + $('#ai1wm-feedback-cancel').on('click', function (e) { + $('.ai1wm-feedback-form').fadeOut(function () { + $('.ai1wm-feedback-type').attr('checked', false).closest('li').show(); + }); + e.preventDefault(); + }); // Send feedback form + + $('#ai1wm-feedback-submit').on('click', function (e) { + var self = $(this); + var spinner = self.next(); + var type = $('.ai1wm-feedback-type:checked').val(); + var email = $('.ai1wm-feedback-email').val(); + var message = $('.ai1wm-feedback-message').val(); + var terms = $('.ai1wm-feedback-terms').is(':checked'); + self.attr('disabled', true); + spinner.css('visibility', 'visible'); + $.ajax({ + url: ai1wm_feedback.ajax.url, + type: 'POST', + dataType: 'json', + async: true, + data: { + secret_key: ai1wm_feedback.secret_key, + ai1wm_type: type, + ai1wm_email: email, + ai1wm_message: message, + ai1wm_terms: +terms + }, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (data) { + self.attr('disabled', false); + spinner.css('visibility', 'hidden'); + + if (data.errors.length > 0) { + $('.ai1wm-feedback .ai1wm-message').remove(); + var errorMessage = $('
').addClass('ai1wm-message ai1wm-error-message'); + $.each(data.errors, function (key, value) { + errorMessage.append($('

').text(value)); + }); + $('.ai1wm-feedback').prepend(errorMessage); + } else { + var successMessage = $('

').addClass('ai1wm-message ai1wm-success-message'); + successMessage.append($('

').text(ai1wm_locale.thanks_for_submitting_your_feedback)); + $('.ai1wm-feedback').html(successMessage); + } + }); + e.preventDefault(); + }); +}); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var FileUploader = __webpack_require__(814), + Feedback = __webpack_require__(332), + Import = __webpack_require__(936); + +jQuery(document).ready(function ($) { + 'use strict'; + + var uploader; + + if (Ai1wm.MultisiteExtensionUploader) { + uploader = new Ai1wm.MultisiteExtensionUploader(); + } else if (Ai1wm.UnlimitedExtensionUploader) { + uploader = new Ai1wm.UnlimitedExtensionUploader(); + } else if (Ai1wm.FileExtensionUploader) { + uploader = new Ai1wm.FileExtensionUploader(); + } else { + uploader = new Ai1wm.FileUploader(); + } + + uploader.init(); // Expands/Collapses Import from + + $('.ai1wm-expandable > div.ai1wm-button-main').on('click', function () { + $(this).parent().toggleClass('ai1wm-open'); + }); +}); +__webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, { + FileUploader: FileUploader, + Feedback: Feedback, + Import: Import +}); +}(); +/******/ })() +; \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/reset.min.js b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/reset.min.js new file mode 100644 index 0000000..94926a2 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/reset.min.js @@ -0,0 +1,46 @@ +/******/ (function() { // webpackBootstrap +var __webpack_exports__ = {}; +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +jQuery(document).ready(function ($) { + 'use strict'; + + var resetNavClick = function resetNavClick(e) { + e.preventDefault(); + e.stopPropagation(); + + if ($(this).hasClass('active')) { + return; + } + + var tab = $(this).data('tab'); + $('[data-tab]').removeClass('active'); + $('[data-tab=' + tab + ']').addClass('active'); + }; + + $('.ai1wm-reset-container .ai1wm-reset-content aside nav').on('click', 'a', resetNavClick); + $('.ai1wm-reset-container .ai1wm-reset-content section').on('click', ' article>a', resetNavClick); +}); +/******/ })() +; \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/schedules.min.js b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/schedules.min.js new file mode 100644 index 0000000..28553b9 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/schedules.min.js @@ -0,0 +1,46 @@ +/******/ (function() { // webpackBootstrap +var __webpack_exports__ = {}; +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +jQuery(document).ready(function ($) { + 'use strict'; + + var schedulesNavClick = function schedulesNavClick(e) { + e.preventDefault(); + e.stopPropagation(); + + if ($(this).hasClass('active')) { + return; + } + + var tab = $(this).data('tab'); + $('[data-tab]').removeClass('active'); + $('[data-tab=' + tab + ']').addClass('active'); + }; + + $('.ai1wm-schedules-container .ai1wm-schedules-content aside nav').on('click', 'a', schedulesNavClick); + $('.ai1wm-schedules-container .ai1wm-schedules-content section').on('click', ' article>a', schedulesNavClick); +}); +/******/ })() +; \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/settings.min.js b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/settings.min.js new file mode 100644 index 0000000..388884c --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/settings.min.js @@ -0,0 +1,182 @@ +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 332: +/***/ (function() { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +jQuery(document).ready(function ($) { + 'use strict'; // Idea + + $('#ai1wm-feedback-type-link-1').on('click', function () { + var radio = $('#ai1wm-feedback-type-1'); + + if (radio.is(':checked')) { + radio.attr('checked', false); + } else { + radio.attr('checked', true); + } + }); // Help + + $('#ai1wm-feedback-type-2').on('click', function () { + // Hide other options + $('#ai1wm-feedback-type-1').closest('li').hide(); // Change placeholder message + + $('.ai1wm-feedback-form').find('.ai1wm-feedback-message').attr('placeholder', ai1wm_locale.how_may_we_help_you); // Show feedback form + + $('.ai1wm-feedback-form').fadeIn(); + }); // Cancel feedback form + + $('#ai1wm-feedback-cancel').on('click', function (e) { + $('.ai1wm-feedback-form').fadeOut(function () { + $('.ai1wm-feedback-type').attr('checked', false).closest('li').show(); + }); + e.preventDefault(); + }); // Send feedback form + + $('#ai1wm-feedback-submit').on('click', function (e) { + var self = $(this); + var spinner = self.next(); + var type = $('.ai1wm-feedback-type:checked').val(); + var email = $('.ai1wm-feedback-email').val(); + var message = $('.ai1wm-feedback-message').val(); + var terms = $('.ai1wm-feedback-terms').is(':checked'); + self.attr('disabled', true); + spinner.css('visibility', 'visible'); + $.ajax({ + url: ai1wm_feedback.ajax.url, + type: 'POST', + dataType: 'json', + async: true, + data: { + secret_key: ai1wm_feedback.secret_key, + ai1wm_type: type, + ai1wm_email: email, + ai1wm_message: message, + ai1wm_terms: +terms + }, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (data) { + self.attr('disabled', false); + spinner.css('visibility', 'hidden'); + + if (data.errors.length > 0) { + $('.ai1wm-feedback .ai1wm-message').remove(); + var errorMessage = $('

').addClass('ai1wm-message ai1wm-error-message'); + $.each(data.errors, function (key, value) { + errorMessage.append($('

').text(value)); + }); + $('.ai1wm-feedback').prepend(errorMessage); + } else { + var successMessage = $('

').addClass('ai1wm-message ai1wm-success-message'); + successMessage.append($('

').text(ai1wm_locale.thanks_for_submitting_your_feedback)); + $('.ai1wm-feedback').html(successMessage); + } + }); + e.preventDefault(); + }); +}); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Feedback = __webpack_require__(332); + +jQuery(document).ready(function () { + 'use strict'; +}); +__webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, { + Feedback: Feedback +}); +}(); +/******/ })() +; \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/updater.min.js b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/updater.min.js new file mode 100644 index 0000000..8a2a269 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/updater.min.js @@ -0,0 +1,80 @@ +/******/ (function() { // webpackBootstrap +var __webpack_exports__ = {}; +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +jQuery(document).ready(function ($) { + 'use strict'; + + $('.ai1wm-purchase-add').on('click', function (e) { + var self = $(this); + self.attr('disabled', true); + var dialog = self.closest('.ai1wm-modal-dialog'); + var error = dialog.find('.ai1wm-modal-error'); + var index = dialog.attr('id').split('-').pop(); + var purchaseId = dialog.find('.ai1wm-purchase-id').val(); + var updateLink = dialog.find('.ai1wm-update-link').val(); // Check Purchase ID + + $.ajax({ + url: 'https://servmask.com/purchase/' + purchaseId + '/check', + type: 'GET', + dataType: 'json', + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function (product) { + // Update Purchase ID + $.ajax({ + url: ai1wm_updater.ajax.url, + type: 'POST', + dataType: 'json', + data: { + ai1wm_uuid: product.uuid, + ai1wm_extension: product.extension + }, + dataFilter: function dataFilter(data) { + return Ai1wm.Util.json(data); + } + }).done(function () { + window.location.hash = ''; // Update plugin row + + $('#ai1wm-update-section-' + index).html($('').attr('href', updateLink).text(ai1wm_locale.check_for_updates)); + self.attr('disabled', false); + }); + }).fail(function () { + self.attr('disabled', false); + error.html(ai1wm_locale.invalid_purchase_id); + }); + e.preventDefault(); + }); + $('.ai1wm-purchase-discard').on('click', function (e) { + window.location.hash = ''; + e.preventDefault(); + }); // This is to prevent W3TC plugin showing our Purchase ID modal + + setTimeout(function () { + $('.ai1wm-modal-dialog-purchase-id').unbind('click'); + }, 300); +}); +/******/ })() +; \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/util.min.js b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/util.min.js new file mode 100644 index 0000000..2f5685c --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/assets/javascript/util.min.js @@ -0,0 +1,180 @@ +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 139: +/***/ (function(module) { + +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var $ = jQuery; +module.exports = { + random: function random(len, suffix) { + var text = ''; + var possible = 'abcdefghijklmnopqrstuvwxyz0123456789'; + + for (var i = 0; i < len; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + } + + if (suffix) { + return text + suffix; + } + + return text; + }, + form: function form(id) { + return $(id).serializeArray(); + }, + ucfirst: function ucfirst(text) { + return text.charAt(0).toUpperCase() + text.slice(1); + }, + list: function list(input) { + // Convert object to list + if ($.isPlainObject(input)) { + var result = []; + var params = decodeURIComponent($.param(input)).split('&'); // Loop over params + + $.each(params, function (index, item) { + var value = item.split('='); // Add item + + result.push({ + name: value[0], + value: value[1] + }); + }); + return result; + } + + return input; + }, + json: function json(input) { + if (typeof input === 'string') { + var result = input.match(/{[\s\S]+}/); + + if (result !== null) { + return result[0]; + } + } + + return false; + }, + sizeFormat: function sizeFormat(bytes) { + if (parseInt(bytes) === 0) { + return '0 B'; + } + + var i = Math.floor(Math.log(bytes) / Math.log(1024)); + var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + var size = (bytes / Math.pow(1024, i)).toFixed(2) * 1; + + if (isNaN(size)) { + return '0 B'; + } + + return size + ' ' + sizes[i]; + }, + dirname: function dirname(path) { + return path.replace(/\\/g, '/').replace(/\/[^/]*\/?$/, ''); + }, + basename: function basename(path) { + return path.replace(/\\/g, '/').replace(/.*\//, ''); + } +}; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +/** + * Copyright (C) 2014-2023 ServMask Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ +var Util = __webpack_require__(139); + +__webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, { + Util: Util +}); +}(); +/******/ })() +; \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/lib/view/backups/backups-list.php b/plugin-file/all-in-one-wp-migration/lib/view/backups/backups-list.php new file mode 100644 index 0000000..1f7c724 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/backups/backups-list.php @@ -0,0 +1,142 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + +

+ + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+ +
+ +
+
+ + + + + + + + +
+ + + +
+ +
+
+
+ + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/backups/backups-permissions.php b/plugin-file/all-in-one-wp-migration/lib/view/backups/backups-permissions.php new file mode 100644 index 0000000..f623e2b --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/backups/backups-permissions.php @@ -0,0 +1,43 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/backups/index.php b/plugin-file/all-in-one-wp-migration/lib/view/backups/index.php new file mode 100644 index 0000000..7d09705 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/backups/index.php @@ -0,0 +1,82 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+
+
+
+

+ + +

+ + +
+ +
+ +
+
+

+ + +

+

+ +

+

+ + + + +

+
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + +
+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/common/http-authentication.php b/plugin-file/all-in-one-wp-migration/lib/view/common/http-authentication.php new file mode 100644 index 0000000..005bb7f --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/common/http-authentication.php @@ -0,0 +1,28 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} diff --git a/plugin-file/all-in-one-wp-migration/lib/view/common/leave-feedback.php b/plugin-file/all-in-one-wp-migration/lib/view/common/leave-feedback.php new file mode 100644 index 0000000..a61fd65 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/common/leave-feedback.php @@ -0,0 +1,74 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/common/maintenance-mode.php b/plugin-file/all-in-one-wp-migration/lib/view/common/maintenance-mode.php new file mode 100644 index 0000000..005bb7f --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/common/maintenance-mode.php @@ -0,0 +1,28 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} diff --git a/plugin-file/all-in-one-wp-migration/lib/view/common/report-problem.php b/plugin-file/all-in-one-wp-migration/lib/view/common/report-problem.php new file mode 100644 index 0000000..005bb7f --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/common/report-problem.php @@ -0,0 +1,28 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} diff --git a/plugin-file/all-in-one-wp-migration/lib/view/common/share-buttons.php b/plugin-file/all-in-one-wp-migration/lib/view/common/share-buttons.php new file mode 100644 index 0000000..452d93c --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/common/share-buttons.php @@ -0,0 +1,80 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+ + + + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/common/sidebar-right.php b/plugin-file/all-in-one-wp-migration/lib/view/common/sidebar-right.php new file mode 100644 index 0000000..aafa050 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/common/sidebar-right.php @@ -0,0 +1,48 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+
+
+ + + + + +

+ + + + +
+ +
+
+ diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/advanced-settings.php b/plugin-file/all-in-one-wp-migration/lib/view/export/advanced-settings.php new file mode 100644 index 0000000..e5ad525 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/advanced-settings.php @@ -0,0 +1,130 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+
+

+ + + +

+
    + +
  • + +
    +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
  • + +
  • + + + +
  • + +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • + + + +
  • + +
  • + +
  • + +
  • + + + + + +
  • + +
  • +
  • + +
  • + + + + +
+
+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-azure-storage.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-azure-storage.php new file mode 100644 index 0000000..52b03eb --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-azure-storage.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Azure Storage diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-b2.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-b2.php new file mode 100644 index 0000000..eff1fb8 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-b2.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Backblaze B2 diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-box.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-box.php new file mode 100644 index 0000000..d0b3531 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-box.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Box diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-digitalocean.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-digitalocean.php new file mode 100644 index 0000000..f329c07 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-digitalocean.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +DigitalOcean diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-dropbox.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-dropbox.php new file mode 100644 index 0000000..2c2eb97 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-dropbox.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Dropbox diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-file.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-file.php new file mode 100644 index 0000000..b7d0f59 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-file.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-ftp.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-ftp.php new file mode 100644 index 0000000..3cce67e --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-ftp.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +FTP diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-gcloud-storage.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-gcloud-storage.php new file mode 100644 index 0000000..61441cd --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-gcloud-storage.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Google Cloud diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-gdrive.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-gdrive.php new file mode 100644 index 0000000..8494928 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-gdrive.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Google Drive diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-glacier.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-glacier.php new file mode 100644 index 0000000..8894fda --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-glacier.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Amazon Glacier diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-mega.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-mega.php new file mode 100644 index 0000000..c062585 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-mega.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Mega diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-onedrive.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-onedrive.php new file mode 100644 index 0000000..fcc13c5 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-onedrive.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +OneDrive diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-pcloud.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-pcloud.php new file mode 100644 index 0000000..1a87c74 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-pcloud.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +pCloud diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-s3-client.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-s3-client.php new file mode 100644 index 0000000..8930dec --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-s3-client.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +S3 Client diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-s3.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-s3.php new file mode 100644 index 0000000..459c07a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-s3.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Amazon S3 diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/button-webdav.php b/plugin-file/all-in-one-wp-migration/lib/view/export/button-webdav.php new file mode 100644 index 0000000..5394c47 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/button-webdav.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +WebDAV diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/export-buttons.php b/plugin-file/all-in-one-wp-migration/lib/view/export/export-buttons.php new file mode 100644 index 0000000..518c9d2 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/export-buttons.php @@ -0,0 +1,51 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+
+
+
+ + + + + + +
+
    + +
  • + +
  • + +
+
+
+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/export-permissions.php b/plugin-file/all-in-one-wp-migration/lib/view/export/export-permissions.php new file mode 100644 index 0000000..ec85e2e --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/export-permissions.php @@ -0,0 +1,43 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+ Site could not be exported' . + '

Please make sure that storage directory %s has read and write permissions.

' . + '

Technical details

', + AI1WM_PLUGIN_NAME + ), + AI1WM_STORAGE_PATH + ); + ?> +
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/find-replace.php b/plugin-file/all-in-one-wp-migration/lib/view/export/find-replace.php new file mode 100644 index 0000000..19efe1f --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/find-replace.php @@ -0,0 +1,53 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
    +
  • +

    + + + ', AI1WM_PLUGIN_NAME ) ); ?> + + ', AI1WM_PLUGIN_NAME ) ); ?> + + + +

    +
    + + +
    +
  • +
+ + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/help-section.php b/plugin-file/all-in-one-wp-migration/lib/view/export/help-section.php new file mode 100644 index 0000000..4ae1a31 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/help-section.php @@ -0,0 +1,53 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +

+
+ +

+ +

+ +

+ +
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/export/index.php b/plugin-file/all-in-one-wp-migration/lib/view/export/index.php new file mode 100644 index 0000000..bc4daa6 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/export/index.php @@ -0,0 +1,69 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+
+
+
+

+ + +

+ + + +
+ + + + + + + + + + + +
+ + + + + + + + +
+
+ + + +
+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/avada.php b/plugin-file/all-in-one-wp-migration/lib/view/import/avada.php new file mode 100644 index 0000000..bbc42de --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/avada.php @@ -0,0 +1,41 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +if ( $should_reset_permalinks ) { + print( __( '» Permalinks are set to default. Why? (opens a new window)
', AI1WM_PLUGIN_NAME ) ); +} else { + printf( __( '» Save permalinks structure. (opens a new window)
', AI1WM_PLUGIN_NAME ), admin_url( 'options-permalink.php#submit' ) ); +} + +if ( ai1wm_validate_plugin_basename( 'oxygen/functions.php' ) ) { + print( __( '» Re-sign Oxygen Builder shortcodes. (opens a new window)
', AI1WM_PLUGIN_NAME ) ); +} + +print( __( '» Reset Avada Fusion Builder cache. (opens a new window)
', AI1WM_PLUGIN_NAME ) ); +print( __( '» Optionally, review the plugin. (opens a new window)', AI1WM_PLUGIN_NAME ) ); diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-azure-storage.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-azure-storage.php new file mode 100644 index 0000000..52b03eb --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-azure-storage.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Azure Storage diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-b2.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-b2.php new file mode 100644 index 0000000..eff1fb8 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-b2.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Backblaze B2 diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-box.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-box.php new file mode 100644 index 0000000..d0b3531 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-box.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Box diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-digitalocean.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-digitalocean.php new file mode 100644 index 0000000..f329c07 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-digitalocean.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +DigitalOcean diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-dropbox.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-dropbox.php new file mode 100644 index 0000000..2c2eb97 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-dropbox.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Dropbox diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-file.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-file.php new file mode 100644 index 0000000..2cbaaa5 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-file.php @@ -0,0 +1,34 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + + + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-ftp.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-ftp.php new file mode 100644 index 0000000..3cce67e --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-ftp.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +FTP diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-gcloud-storage.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-gcloud-storage.php new file mode 100644 index 0000000..61441cd --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-gcloud-storage.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Google Cloud diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-gdrive.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-gdrive.php new file mode 100644 index 0000000..8494928 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-gdrive.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Google Drive diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-glacier.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-glacier.php new file mode 100644 index 0000000..8894fda --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-glacier.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Amazon Glacier diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-mega.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-mega.php new file mode 100644 index 0000000..c062585 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-mega.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Mega diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-onedrive.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-onedrive.php new file mode 100644 index 0000000..fcc13c5 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-onedrive.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +OneDrive diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-pcloud.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-pcloud.php new file mode 100644 index 0000000..1a87c74 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-pcloud.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +pCloud diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-s3-client.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-s3-client.php new file mode 100644 index 0000000..8930dec --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-s3-client.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +S3 Client diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-s3.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-s3.php new file mode 100644 index 0000000..459c07a --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-s3.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +Amazon S3 diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-url.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-url.php new file mode 100644 index 0000000..8a35221 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-url.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +URL diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/button-webdav.php b/plugin-file/all-in-one-wp-migration/lib/view/import/button-webdav.php new file mode 100644 index 0000000..5394c47 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/button-webdav.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +WebDAV diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/done.php b/plugin-file/all-in-one-wp-migration/lib/view/import/done.php new file mode 100644 index 0000000..4edffd4 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/done.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +if ( $should_reset_permalinks ) { + _e( + '» Permalinks are set to default. Why? (opens a new window)
' . + '» Optionally, review the plugin. (opens a new window)', + AI1WM_PLUGIN_NAME + ); +} else { + printf( + __( + '» Save permalinks structure. (opens a new window)
' . + '» Optionally, review the plugin. (opens a new window)', + AI1WM_PLUGIN_NAME + ), + admin_url( 'options-permalink.php#submit' ) + ); +} diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/import-buttons.php b/plugin-file/all-in-one-wp-migration/lib/view/import/import-buttons.php new file mode 100644 index 0000000..9a97470 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/import-buttons.php @@ -0,0 +1,63 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+ +
+
+
+
+

+
+ +

+
+
+ + + + + + +
+
    + +
  • + +
  • + +
+
+
+
+
+
+ +

diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/import-permissions.php b/plugin-file/all-in-one-wp-migration/lib/view/import/import-permissions.php new file mode 100644 index 0000000..83ef7b5 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/import-permissions.php @@ -0,0 +1,43 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+ Site could not be imported' . + '

Please make sure that storage directory %s has read and write permissions.

' . + '

Technical details

', + AI1WM_PLUGIN_NAME + ), + AI1WM_STORAGE_PATH + ); + ?> +
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/index.php b/plugin-file/all-in-one-wp-migration/lib/view/import/index.php new file mode 100644 index 0000000..31bd0c9 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/index.php @@ -0,0 +1,65 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+
+
+
+

+ + +

+ + + +
+ + + + + + + +
+ + + + + + + + +
+
+ + + +
+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/oxygen.php b/plugin-file/all-in-one-wp-migration/lib/view/import/oxygen.php new file mode 100644 index 0000000..eb16f23 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/oxygen.php @@ -0,0 +1,47 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +if ( $should_reset_permalinks ) { + _e( + '» Permalinks are set to default. Why? (opens a new window)
' . + '» Re-sign Oxygen Builder shortcodes. (opens a new window)
' . + '» Optionally, review the plugin. (opens a new window)', + AI1WM_PLUGIN_NAME + ); +} else { + printf( + __( + '» Save permalinks structure. (opens a new window)
' . + '» Re-sign Oxygen Builder shortcodes. (opens a new window)
' . + '» Optionally, review the plugin. (opens a new window)', + AI1WM_PLUGIN_NAME + ), + admin_url( 'options-permalink.php#submit' ) + ); +} diff --git a/plugin-file/all-in-one-wp-migration/lib/view/import/pro.php b/plugin-file/all-in-one-wp-migration/lib/view/import/pro.php new file mode 100644 index 0000000..9594c52 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/import/pro.php @@ -0,0 +1,41 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +

+ %s.', AI1WM_PLUGIN_NAME ), esc_html( ai1wm_size_format( wp_max_upload_size() ) ) ); ?> +

+

+ + + + + + +

diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/admin-head.php b/plugin-file/all-in-one-wp-migration/lib/view/main/admin-head.php new file mode 100644 index 0000000..6fb9f3d --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/admin-head.php @@ -0,0 +1,165 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/backups-htaccess-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-htaccess-notice.php new file mode 100644 index 0000000..3b06c18 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-htaccess-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s file. ' . + 'Try to change permissions of the parent folder or send us an email at ' . + 'support@servmask.com for assistance.', + AI1WM_PLUGIN_NAME + ), + AI1WM_BACKUPS_HTACCESS + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/backups-index-html-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-index-html-notice.php new file mode 100644 index 0000000..0c213ab --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-index-html-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s file. ' . + 'Try to change permissions of the parent folder or send us an email at ' . + 'support@servmask.com for assistance.', + AI1WM_PLUGIN_NAME + ), + AI1WM_BACKUPS_INDEX_HTML + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/backups-index-php-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-index-php-notice.php new file mode 100644 index 0000000..20682eb --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-index-php-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s file. ' . + 'Try to change permissions of the parent folder or send us an email at ' . + 'support@servmask.com for assistance.', + AI1WM_PLUGIN_NAME + ), + AI1WM_BACKUPS_INDEX_PHP + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/backups-path-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-path-notice.php new file mode 100644 index 0000000..98d078f --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-path-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s folder. ' . + 'You will need to create this folder and grant it read/write/execute permissions (0777) ' . + 'for the All-in-One WP Migration plugin to function properly.', + AI1WM_PLUGIN_NAME + ), + AI1WM_BACKUPS_PATH + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/backups-robots-txt-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-robots-txt-notice.php new file mode 100644 index 0000000..80311cd --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-robots-txt-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s file. ' . + 'Try to change permissions of the parent folder or send us an email at ' . + 'support@servmask.com for assistance.', + AI1WM_PLUGIN_NAME + ), + AI1WM_BACKUPS_ROBOTS_TXT + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/backups-webconfig-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-webconfig-notice.php new file mode 100644 index 0000000..e4d2e82 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/backups-webconfig-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s file. ' . + 'Try to change permissions of the parent folder or send us an email at ' . + 'support@servmask.com for assistance.', + AI1WM_PLUGIN_NAME + ), + AI1WM_BACKUPS_WEBCONFIG + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/backups.php b/plugin-file/all-in-one-wp-migration/lib/view/main/backups.php new file mode 100644 index 0000000..8d9679d --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/backups.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +printf( ' %d', ( $count === 0 ? 'ai1wm-menu-hide' : null ), sprintf( _n( 'You have %d backup', 'You have %d backups', $count, AI1WM_PLUGIN_NAME ), $count ), $count ); diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/contact-support.php b/plugin-file/all-in-one-wp-migration/lib/view/main/contact-support.php new file mode 100644 index 0000000..22f77bc --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/contact-support.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/missing-role-capability-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/missing-role-capability-notice.php new file mode 100644 index 0000000..9ce4b16 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/missing-role-capability-notice.php @@ -0,0 +1,41 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ Technical details', + AI1WM_PLUGIN_NAME + ); + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/multisite-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/multisite-notice.php new file mode 100644 index 0000000..d9a0514 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/multisite-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ + + + + +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/premium-badge.php b/plugin-file/all-in-one-wp-migration/lib/view/main/premium-badge.php new file mode 100644 index 0000000..06f6860 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/premium-badge.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +printf( ' %s', __( 'Premium', AI1WM_PLUGIN_NAME ) ); diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/storage-index-html-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/storage-index-html-notice.php new file mode 100644 index 0000000..8360dd8 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/storage-index-html-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s file. ' . + 'Try to change permissions of the parent folder or send us an email at ' . + 'support@servmask.com for assistance.', + AI1WM_PLUGIN_NAME + ), + AI1WM_STORAGE_INDEX_HTML + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/storage-index-php-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/storage-index-php-notice.php new file mode 100644 index 0000000..f7b212d --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/storage-index-php-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s file. ' . + 'Try to change permissions of the parent folder or send us an email at ' . + 'support@servmask.com for assistance.', + AI1WM_PLUGIN_NAME + ), + AI1WM_STORAGE_INDEX_PHP + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/storage-path-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/storage-path-notice.php new file mode 100644 index 0000000..4829489 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/storage-path-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s folder. ' . + 'You will need to create this folder and grant it read/write/execute permissions (0777) ' . + 'for the All-in-One WP Migration plugin to function properly.', + AI1WM_PLUGIN_NAME + ), + AI1WM_STORAGE_PATH + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/translate.php b/plugin-file/all-in-one-wp-migration/lib/view/main/translate.php new file mode 100644 index 0000000..8643f14 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/translate.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/main/wordpress-htaccess-notice.php b/plugin-file/all-in-one-wp-migration/lib/view/main/wordpress-htaccess-notice.php new file mode 100644 index 0000000..3664e82 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/main/wordpress-htaccess-notice.php @@ -0,0 +1,45 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+

+ %s file. ' . + 'Try to change permissions of the parent folder or send us an email at ' . + 'support@servmask.com for assistance.', + AI1WM_PLUGIN_NAME + ), + AI1WM_WORDPRESS_HTACCESS + ) + ?> +

+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/reset/index.php b/plugin-file/all-in-one-wp-migration/lib/view/reset/index.php new file mode 100644 index 0000000..d2d5c21 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/reset/index.php @@ -0,0 +1,41 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+
+

+ <?php _e( 'Star', AI1WM_PLUGIN_NAME ); ?> + +

+

upgrade to Premium now! Elevate your website management experience with these exclusive functionalities and priority support.', AI1WM_PLUGIN_NAME ); ?>

+ + <?php _e( 'Reset Hub Demo', AI1WM_PLUGIN_NAME ); ?> +
+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/schedules/index.php b/plugin-file/all-in-one-wp-migration/lib/view/schedules/index.php new file mode 100644 index 0000000..653b9f7 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/schedules/index.php @@ -0,0 +1,166 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+
+ +
+ + + + + + + + + +
+
+
diff --git a/plugin-file/all-in-one-wp-migration/lib/view/updater/check.php b/plugin-file/all-in-one-wp-migration/lib/view/updater/check.php new file mode 100644 index 0000000..9e986f4 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/updater/check.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/updater/error.php b/plugin-file/all-in-one-wp-migration/lib/view/updater/error.php new file mode 100644 index 0000000..5dbaa85 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/updater/error.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/updater/modal.php b/plugin-file/all-in-one-wp-migration/lib/view/updater/modal.php new file mode 100644 index 0000000..35043b7 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/updater/modal.php @@ -0,0 +1,57 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
+ +
+ + + + + . + diff --git a/plugin-file/all-in-one-wp-migration/lib/view/updater/update.php b/plugin-file/all-in-one-wp-migration/lib/view/updater/update.php new file mode 100644 index 0000000..f361a08 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/lib/view/updater/update.php @@ -0,0 +1,31 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} +?> + +
diff --git a/plugin-file/all-in-one-wp-migration/loader.php b/plugin-file/all-in-one-wp-migration/loader.php new file mode 100644 index 0000000..4ae201e --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/loader.php @@ -0,0 +1,414 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +// Include all the files that you want to load in here +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'bandar' . + DIRECTORY_SEPARATOR . + 'bandar' . + DIRECTORY_SEPARATOR . + 'lib' . + DIRECTORY_SEPARATOR . + 'Bandar.php'; + + +if ( defined( 'WP_CLI' ) ) { + require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'command' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-wp-cli-command.php'; +} + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'filesystem' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-directory.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'filesystem' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-file.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'filesystem' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-file-index.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'filesystem' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-file-htaccess.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'filesystem' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-file-webconfig.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'filesystem' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-file-robots.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'cron' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-cron.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'iterator' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-recursive-directory-iterator.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'iterator' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-recursive-iterator-iterator.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'filter' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-recursive-extension-filter.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'filter' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-recursive-exclude-filter.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'archiver' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-archiver.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'archiver' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-compressor.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'archiver' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-extractor.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'database' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-database.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'database' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-database-mysql.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'database' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-database-mysqli.php'; + +require_once AI1WM_VENDOR_PATH . + DIRECTORY_SEPARATOR . + 'servmask' . + DIRECTORY_SEPARATOR . + 'database' . + DIRECTORY_SEPARATOR . + 'class-ai1wm-database-utility.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-main-controller.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-controller.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-controller.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-status-controller.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-backups-controller.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-updater-controller.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-feedback-controller.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-schedules-controller.php'; + +require_once AI1WM_CONTROLLER_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-reset-controller.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-init.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-compatibility.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-archive.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-config.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-config-file.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-enumerate-content.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-enumerate-media.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-enumerate-plugins.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-enumerate-tables.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-enumerate-themes.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-content.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-media.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-plugins.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-themes.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-database.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-database-file.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-download.php'; + +require_once AI1WM_EXPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-export-clean.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-upload.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-users.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-compatibility.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-validate.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-confirm.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-check-encryption.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-check-decryption-password.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-blogs.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-options.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-permalinks.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-enumerate.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-content.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-mu-plugins.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-database.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-done.php'; + +require_once AI1WM_IMPORT_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-import-clean.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-deprecated.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-extensions.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-compatibility.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-backups.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-updater.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-feedback.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-template.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-status.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-log.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-message.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-notification.php'; + +require_once AI1WM_MODEL_PATH . + DIRECTORY_SEPARATOR . + 'class-ai1wm-handler.php'; diff --git a/plugin-file/all-in-one-wp-migration/readme.txt b/plugin-file/all-in-one-wp-migration/readme.txt new file mode 100644 index 0000000..dc8a6c2 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/readme.txt @@ -0,0 +1,128 @@ +=== All-in-One WP Migration === +Contributors: yani.iliev, bangelov, pimjitsawang +Tags: move, transfer, copy, migrate, backup, clone, restore, db migration, wordpress migration, website migration, database export, database import, apoyo, sauvegarde, di riserva, バックアップ +Requires at least: 3.3 +Tested up to: 6.5 +Requires PHP: 5.3 +Stable tag: 7.81 +License: GPLv2 or later + +Move, transfer, copy, migrate, and backup a site with 1-click. Quick, easy, and reliable. + +== Description == +Introduced in 2013 and used by over 60 million websites, All-in-One WP Migration is verifiably one of WordPress' most trusted and utilized plugins for moving websites with absolute ease. + +Intently built with the non-technical user in mind, All-in-One WP Migration comes loaded with newbie-friendly functions that allow you to migrate your WordPress website with little to no technical knowledge or experience. + +Ready to migrate your website? It's fast and easy as 1, 2, 3: + +1. Install All-in-One WP Migration plugin. +2. Hit the export button to bundle your database, media files, plugins, and themes into one tidy file. +3. Unpack the file at the new location with an easy-to-use "drag and drop" feature in the WordPress dashboard of your new website. + +Follow these three simple steps, and your site will be live at its new location with minimal stress and **zero downtime**! + +One feature that makes All-in-One WP Migration widely loved (to the tune of over 6,000 5-star user reviews) is that the technical requirements for installing the plugin are simple. + +If you have WordPress version between 3.3 and 6.4.2 and PHP version between 5.3 and 8.3, you are good to go. All-in-One WP Migration also supports all versions of MySQL and MariaDB. + +**Features Spotlight:** + +* Supports custom uploads, plugins, theme folders, and more. +* Available in over 50 language translations - including Japanese. +* Accessible for individuals with disabilities (WCAG 2.1 AA Level compliant) +* No limitations on host or operating system. +* Supports a vast range of hosting providers -- [click here for a full list of supported providers.](https://help.servmask.com/knowledgebase/supported-hosting-providers/) +* A long list of [premium extensions](https://servmask.com/products) that gives you the power to do more. +* Mobile device compatible. +* Intelligent and flawless auto-replacement of website url during import. +* Full product support. +* Browse WPRESS files online with [Traktor Web](https://traktor.servmask.com) +* Extract WPRESS files on your computer with [Traktor Desktop](https://traktor.wp-migration.com) +* And lots more! + +Here are other reasons to use All-in-One WP Migration ... + +**Trusted by the Government and Big Corporations:** + +Many enterprise customers, government organizations, and universities use, love, and trust All-in-One WP Migration. Here are some: Boeing, NASA, VW, IBM, Harvard University, Stanford University, Lego, P&G, Automattic, State of California, State of Hawaii. +This broad adoption and usage of All-in-One WP Migration demonstrate how **safe, reliable and adaptable** the plugin is for just about any website migration need. + +**Full Compatibility and Support:** + +All-in-One WP Migration has been extensively tested and confirmed to be compatible with most WordPress plugins and themes. +This means you don't get to experience cross-plugin compatibility issues that can slow down, bug, or break down your WordPress website when you install and use All-in-One WP Migration. +As a matter of fact, All-in-One WP Migration has partnered with multiple theme/plugin vendors to distribute their themes/plugins with us as a single, easy to use, easy to install package. +These vendors trust us and our plugin to provide their customers with reliable product delivery, support, migrations, and backups. + +**Cloud Storage Supported:** + +All-in-One WP Migration supports and syncs seamlessly with top cloud storage services. +The plugin comes preinstalled on all Bitnami WordPress sites running on AWS, Google Compute Cloud, and Microsoft Azure. + += Contact us = +* [Get free help from us here](https://servmask.com/help) +* [Report a bug or request a feature](https://servmask.com/help) +* [Find out more about us](https://servmask.com) + +[youtube http://www.youtube.com/watch?v=BpWxCeUWBOk] + +[youtube http://www.youtube.com/watch?v=mRp7qTFYKgs] + +== Installation == +1. All-in-One WP Migration can be installed directly through your WordPress Plugins dashboard. +1. Click "Add New" and Search for "All-in-One WP Migration" +1. Install and Activate + +Alternatively, you can download the plugin using the download button on this page and then upload the all-in-one-wp-migration folder to the /wp-content/plugins/ directory then activate throught the Plugins dashboard in WordPress + +== Screenshots == +1. Mobile Export page +2. Mobile Import page +3. Plugin Menu + +== Privacy Policy == +All-in-One WP Migration is designed to fully respect and protect the personal information of its users. It asks for your consent to collect the user's email address when filling the plugin's contact form. +All-in-One WP Migration is in full compliance with General Data Protection Regulation (GDPR). +See our [GDPR Compliant Privacy Policy here](https://www.iubenda.com/privacy-policy/946881). + +== Changelog == += 7.81 = +**Added** + +* Reset Hub Page: Introducing a new reset hub page, providing users with powerful reset tools for efficient site management. This feature allows for easier resets of WordPress environments, facilitating smoother development and testing workflows. + +**Improved** + +* Better W3TC Support +* PHP Compatibility Checks: Display a warning notification, when you move/restore your site to a different PHP version. + += 7.80 = +**Added** + +* Support for update-services plugin +* Domain name conversion to dashes from dots in the backup name for improved hosting providers compatibility + +**Improved** + +* Better support for Multisite to Standalone and Standalone to Multisite exports and imports, streamlining the migration process + += 7.79 = +**Added** + +* Support for WordPress v6.4 + += 7.78 = +**Added** + +* Implemented a new Schedules page within the plugin, displaying various advanced features exclusive to premium extensions + += 7.77 = +**Added** + +* Tested the new version of WordPress 6.3 + += 7.76 = +**Fixed** + +* Removed the [beta] label from advanced settings diff --git a/plugin-file/all-in-one-wp-migration/storage/index.html b/plugin-file/all-in-one-wp-migration/storage/index.html new file mode 100644 index 0000000..cce3445 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/storage/index.html @@ -0,0 +1 @@ +Kangaroos cannot jump here \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/storage/index.php b/plugin-file/all-in-one-wp-migration/storage/index.php new file mode 100644 index 0000000..cce3445 --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/storage/index.php @@ -0,0 +1 @@ +Kangaroos cannot jump here \ No newline at end of file diff --git a/plugin-file/all-in-one-wp-migration/uninstall.php b/plugin-file/all-in-one-wp-migration/uninstall.php new file mode 100644 index 0000000..074069d --- /dev/null +++ b/plugin-file/all-in-one-wp-migration/uninstall.php @@ -0,0 +1,56 @@ +. + * + * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ + * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ + * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ + * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ + * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ + * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ + */ + +if ( ! defined( 'ABSPATH' ) ) { + die( 'Kangaroos cannot jump here' ); +} + +// Include plugin bootstrap file +require_once dirname( __FILE__ ) . + DIRECTORY_SEPARATOR . + 'all-in-one-wp-migration.php'; + +/** + * Trigger Uninstall process only if WP_UNINSTALL_PLUGIN is defined + */ +if ( defined( 'WP_UNINSTALL_PLUGIN' ) ) { + global $wpdb, $wp_filesystem; + + if ( Ai1wm_Cron::exists( 'ai1wm_storage_cleanup' ) ) { + Ai1wm_Cron::clear( 'ai1wm_storage_cleanup' ); + } + + if ( Ai1wm_Cron::exists( 'ai1wm_cleanup_cron' ) ) { + Ai1wm_Cron::clear( 'ai1wm_cleanup_cron' ); + } + + // Delete any options or other data stored in the database here + delete_option( AI1WM_STATUS ); + delete_option( AI1WM_SECRET_KEY ); + delete_option( AI1WM_AUTH_USER ); + delete_option( AI1WM_AUTH_PASSWORD ); + delete_option( AI1WM_AUTH_HEADER ); + delete_option( AI1WM_BACKUPS_PATH_OPTION ); +} diff --git a/reference/Qtraktor-master.zip b/reference/Qtraktor-master.zip new file mode 100644 index 0000000..b63dd42 Binary files /dev/null and b/reference/Qtraktor-master.zip differ diff --git a/reference/Qtraktor-master/.gitignore b/reference/Qtraktor-master/.gitignore new file mode 100644 index 0000000..808b69e --- /dev/null +++ b/reference/Qtraktor-master/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +.qmake.stash +Makefile +*.o +moc_backupfile.cpp +moc_mainwindow.cpp +moc_predefs.h +ui_mainwindow.h +*.app diff --git a/reference/Qtraktor-master/.travis.yml b/reference/Qtraktor-master/.travis.yml new file mode 100644 index 0000000..004c525 --- /dev/null +++ b/reference/Qtraktor-master/.travis.yml @@ -0,0 +1,27 @@ +sudo: required +dist: trusty +language: cpp +branches: + only: + - master + +matrix: + fast_finish: true + include: + - stage: macOS + os: osx + osx_image: xcode10.1 + env: JOB=macOS + +script: "./.travis/$JOB.sh" + +deploy: + provider: releases + file: "./Traktor.dmg" + on: + condition: "$TRAVIS_OS_NAME == osx" + repo: servmask/Qtraktor + tags: true + skip_cleanup: true + api-key: + secure: IVW/r56o5HOhUBTcubKFUZUE2KzHs9BhBCfpH8HcylOTJaL3axqw0pWeN7gTbvl50Jl5/ujaMIVdThc5wKfVBBvXpqEslr/WRb3yp4BOPiiY0Rh7SGRddTHRtwyBih0Yp8JkxIfyT37fEaN5Pqm1X46el7A2sRtKST3Qi09XhOFhRPuAEzsD/3H9cQ/7RJRmbML+6v1VhbkdXDS2s3oU2ZcPPvSv/u1pq3xkm+ay0eKUzJrv354nYGdDB+e9NYsnKz7yggWjZiDk57zktYnxeaOkBaVpotv2etrHR0GTJfVM1PeHmr9Ao1ToXwuF1/Bz8SZ2w1fFhSkf3S6jqVLQpl4riNaW3SS9wu1qANMI51IW5/bitic2ZJT1VJOFf1ZQF3jUbVZpPMyVZ+1jm2b7YDrAV47eT7XtficKYhs0x4TXtPnDMQwoqMCxiIAlGrl8ri2ZJunwgnTwKKag81BKblATYA75IZKhKv1DKlBkySnCyVLO352ysvnkHp2cGXzHut5BTLImqv9ZuNBzEsOQ/TRBZejYc2LbXTHeooxesGioZ7ggOquRqYI0YxJtSrtRowGwhYmPW2dEmhzkXmrLNC1tFhMsF7W5tFvCsJjbwaTopzXJvpt6hK09vIOgNxl7i43v4Vahe1kKM19LPXwwHGspljuDDgv5cQnBjN8yrEg= diff --git a/reference/Qtraktor-master/.travis/macOS.sh b/reference/Qtraktor-master/.travis/macOS.sh new file mode 100755 index 0000000..fa378bc --- /dev/null +++ b/reference/Qtraktor-master/.travis/macOS.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -eu -o pipefail + +brew update > /dev/null + +brew install qt5 + +brew tap yani-/homebrew-qtifw +brew install qt-ifw + +export PATH="/usr/local/opt/qt/bin:/usr/local/opt/qt-ifw/bin:$PATH" +export LDFLAGS="-L/usr/local/opt/qt/lib" +export CPPFLAGS="-I/usr/local/opt/qt/include" + +cd $TRAVIS_BUILD_DIR + +qmake Qtraktor.pro +make -j$(sysctl -n hw.ncpu) + +# add dependencies +macdeployqt Traktor.app + +mkdir packages/com.servmask.traktor/data + +cp -r Traktor.app packages/com.servmask.traktor/data + +sed -i '' s/develop/$(git describe)/ config/config.xml +sed -i '' s/develop/$(git describe)/ packages/com.servmask.traktor/meta/package.xml +sed -i '' s/release-date/$(date "+%Y-%m-%d")/ packages/com.servmask.traktor/meta/package.xml + +binarycreator -c config/config.xml -p packages Traktor diff --git a/reference/Qtraktor-master/LICENSE b/reference/Qtraktor-master/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/reference/Qtraktor-master/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/reference/Qtraktor-master/Qtraktor.pro b/reference/Qtraktor-master/Qtraktor.pro new file mode 100644 index 0000000..de8b274 --- /dev/null +++ b/reference/Qtraktor-master/Qtraktor.pro @@ -0,0 +1,44 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2018-11-06T19:58:14 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = Traktor +TEMPLATE = app + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +CONFIG += c++11 sdk_no_version_check + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h \ + backupfile.h + +FORMS += \ + mainwindow.ui + +RC_ICONS = icons/traktor.ico +ICON = icons/traktor.icns + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/reference/Qtraktor-master/appveyor.yml b/reference/Qtraktor-master/appveyor.yml new file mode 100644 index 0000000..5cb25ce --- /dev/null +++ b/reference/Qtraktor-master/appveyor.yml @@ -0,0 +1,50 @@ +version: 1.0.{build} +skip_non_tags: true +image: Visual Studio 2017 +platform: Any CPU +build_script: +- ps: >- + pushd 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build' + + cmd /c "vcvars64.bat&set" | + + foreach { + if ($_ -match "=") { + $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" + } + } + + popd + + + + C:\Qt\latest\msvc2017_64\bin\qmake.exe Qtraktor.pro + + C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Release + + C:\Qt\latest\msvc2017_64\bin\windeployqt release\Traktor.exe + + + mkdir packages\com.servmask.traktor\data + + Get-ChildItem release | Copy-Item -Destination packages\com.servmask.traktor\data -Recurse + + + (Get-Content -Path "config\config.xml") | ForEach-Object {$_ -Replace "develop", $Env:APPVEYOR_BUILD_VERSION} | Set-Content -Path "config\config.xml" + + + (Get-Content -Path "packages\com.servmask.traktor\meta\package.xml") | ForEach-Object {$_ -Replace "develop", $Env:APPVEYOR_BUILD_VERSION} | Set-Content -Path "packages\com.servmask.traktor\meta\package.xml" + + + (Get-Content -Path "packages\com.servmask.traktor\meta\package.xml") | ForEach-Object {$_ -Replace "release-date", (Get-Date -Format yyyy-M-d)} | Set-Content -Path "packages\com.servmask.traktor\meta\package.xml" + + + C:\Qt\Tools\QtInstallerFramework\3.0\bin\binarycreator.exe -c config\config.xml -p packages Traktor.exe +artifacts: +- path: Traktor.exe + name: Traktor.exe +deploy: +- provider: GitHub + auth_token: + secure: aGMqBS0/Sxmw8f6nkZMH5yl4JUOPCdsZc++OEapEb+2lAw9EUMCUgFkxidGA8k+3 + artifact: Traktor.exe \ No newline at end of file diff --git a/reference/Qtraktor-master/backupfile.cpp b/reference/Qtraktor-master/backupfile.cpp new file mode 100644 index 0000000..75aa299 --- /dev/null +++ b/reference/Qtraktor-master/backupfile.cpp @@ -0,0 +1,6 @@ +#include "backupfile.h" + +BackupFile::BackupFile() +{ + +} diff --git a/reference/Qtraktor-master/backupfile.h b/reference/Qtraktor-master/backupfile.h new file mode 100644 index 0000000..35afcd5 --- /dev/null +++ b/reference/Qtraktor-master/backupfile.h @@ -0,0 +1,97 @@ +#ifndef BACKUPFILE_H +#define BACKUPFILE_H + +#include +#include +#include + +class BackupFile : public QFile +{ + Q_OBJECT + public: + BackupFile(const QString& filename) + : QFile(filename), + bytesRead(0), + eof(4377, '\0') + {} + + bool isValid() + { + if (!seek(size() - 4377)) { + return false; + } + + if (read(4377) != eof) { + return false; + } + + if (!seek(0)) { + return false; + } + + return true; + } + + bool extract(QDir extractTo) + { + while (!atEnd()) { + QByteArray header = read(4377); + if (header == eof) { + return true; + } + + QString fileName = header.chopped(255).constData(); + header.remove(0, 255); + + bool ok; + qint64 fileSize = header.chopped(14).toInt(&ok); + if (!ok) { + return false; + } + + header.remove(0, 14); + header.remove(0, 12); + + QDir filePath(extractTo.path() + "/" + header.constData()); + if (!QDir().exists(filePath.path())) { + if (!QDir().mkpath(filePath.path())) { + return false; + } + } + + QFile file(filePath.path() + "/" + fileName); + if (!file.open(QIODevice::WriteOnly)) { + return false; + } + + while (fileSize > 0) { + qint64 chunk = fileSize > 5 * 1024 * 1024 ? 5 * 1024 * 1024 : fileSize; + file.write(read(chunk)); + fileSize -= chunk; + } + + file.close(); + } + + return false; + } + + signals: + void progress(float percent); + + protected: + qint64 readData(char* data, qint64 maxlen) + { + qint64 _bytesRead = QFile::readData(data, maxlen); + bytesRead += _bytesRead; + emit progress((static_cast(bytesRead) / size()) * 100); + QApplication::processEvents(); + return _bytesRead; + } + + private: + qint64 bytesRead; + QByteArray eof; +}; + +#endif // BACKUPFILE_H diff --git a/reference/Qtraktor-master/config/config.xml b/reference/Qtraktor-master/config/config.xml new file mode 100644 index 0000000..6e0ee45 --- /dev/null +++ b/reference/Qtraktor-master/config/config.xml @@ -0,0 +1,9 @@ + + + Traktor + develop + Traktor Installer + ServMask, Inc. + Traktor + @ApplicationsDir@/Traktor + diff --git a/reference/Qtraktor-master/icons/.VolumeIcon.icns b/reference/Qtraktor-master/icons/.VolumeIcon.icns new file mode 100644 index 0000000..12e7454 Binary files /dev/null and b/reference/Qtraktor-master/icons/.VolumeIcon.icns differ diff --git a/reference/Qtraktor-master/icons/background.png b/reference/Qtraktor-master/icons/background.png new file mode 100644 index 0000000..d7fabfe Binary files /dev/null and b/reference/Qtraktor-master/icons/background.png differ diff --git a/reference/Qtraktor-master/icons/traktor.icns b/reference/Qtraktor-master/icons/traktor.icns new file mode 100644 index 0000000..30616ff Binary files /dev/null and b/reference/Qtraktor-master/icons/traktor.icns differ diff --git a/reference/Qtraktor-master/icons/traktor.ico b/reference/Qtraktor-master/icons/traktor.ico new file mode 100644 index 0000000..33628a2 Binary files /dev/null and b/reference/Qtraktor-master/icons/traktor.ico differ diff --git a/reference/Qtraktor-master/icons/traktor.png b/reference/Qtraktor-master/icons/traktor.png new file mode 100644 index 0000000..2a0cf6b Binary files /dev/null and b/reference/Qtraktor-master/icons/traktor.png differ diff --git a/reference/Qtraktor-master/icons/traktor.svg b/reference/Qtraktor-master/icons/traktor.svg new file mode 100644 index 0000000..e2c6a89 --- /dev/null +++ b/reference/Qtraktor-master/icons/traktor.svg @@ -0,0 +1 @@ +tractor icon \ No newline at end of file diff --git a/reference/Qtraktor-master/main.cpp b/reference/Qtraktor-master/main.cpp new file mode 100644 index 0000000..07eec7b --- /dev/null +++ b/reference/Qtraktor-master/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/reference/Qtraktor-master/mainwindow.cpp b/reference/Qtraktor-master/mainwindow.cpp new file mode 100644 index 0000000..276e682 --- /dev/null +++ b/reference/Qtraktor-master/mainwindow.cpp @@ -0,0 +1,149 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" +#include +#include +#include +#include +#include + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); + ui->progressBar->setVisible(false); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::openBackup() +{ + backupFilename = QFileDialog::getOpenFileName( + this, + tr("Open a backup"), + "", + tr("WordPress backup (*.wpress)") + ); + + if (backupFilename.isNull()) { + return; + } + + QFileInfo fileInfo(backupFilename); + + if (!fileInfo.isReadable()) { + QMessageBox::warning( + this, + tr("Unable to open file"), + tr("Unable to open file: %1").arg(backupFilename), + QMessageBox::StandardButton::Ok + ); + return; + } + + ui->backupNameLabel->setText(fileInfo.fileName()); + ui->extractBackupButton->setEnabled(true); +} + +void MainWindow::extractTo() +{ + QString extractToDir = QFileDialog::getExistingDirectory( + this, + tr("Select extract to folder"), + "" + ); + + if (extractToDir.isNull()) { + return; + } + + QFileInfo fileInfo(backupFilename); + QDir extractTo(extractToDir + "/" + fileInfo.baseName()); + + if (!QDir().mkdir(extractTo.path())) { + QMessageBox::warning( + this, + tr("Unable to create directory"), + tr("Unable to create directory %1. Fix permissions and try again.").arg(extractTo.path()), + QMessageBox::StandardButton::Ok + ); + return; + } + + BackupFile backupFile(backupFilename); + if (!backupFile.open(QIODevice::ReadOnly)) { + QMessageBox::warning( + this, + tr("Unable to open file"), + tr("Unable to open file %1 for reading. Fix permissions and try again.").arg(backupFilename), + QMessageBox::StandardButton::Ok + ); + return; + } + + if (!backupFile.isValid()) { + QMessageBox::warning( + this, + tr("Corrupted backup file"), + tr("The backup file is corrupted. It is missing the end of the file."), + QMessageBox::StandardButton::Ok + ); + backupFile.close(); + return; + } + + ui->backupNameLabel->setVisible(false); + ui->progressBar->setVisible(true); + + connect(&backupFile, &BackupFile::progress, this, &MainWindow::extractProgress); + + if (!backupFile.extract(extractTo)) { + QMessageBox::warning( + this, + tr("Corrupted backup file"), + tr("The backup file is corrupted."), + QMessageBox::StandardButton::Ok + ); + } + + ui->progressBar->setVisible(false); + ui->backupNameLabel->setText(tr("Extracted backup in %1").arg(extractTo.path())); + ui->backupNameLabel->setVisible(true); + ui->extractBackupButton->setDisabled(true); + showInGraphicalShell(extractTo.path()); + backupFile.close(); +} + +void MainWindow::extractProgress(float percent) +{ + ui->progressBar->setValue(static_cast(percent)); +} + +// copied form https://github.com/qt-creator/qt-creator/blob/master/src/plugins/coreplugin/fileutils.cpp#L67 +void MainWindow::showInGraphicalShell(const QString &pathIn) +{ + const QFileInfo fileInfo(pathIn); + +#if defined (Q_OS_WIN) + QStringList param; + if (!fileInfo.isDir()) + param += QLatin1String("/select,"); + param += QDir::toNativeSeparators(fileInfo.canonicalFilePath()); + QProcess::startDetached("explorer", param); +#endif + +#if defined (Q_OS_MAC) + QStringList scriptArgs; + scriptArgs << QLatin1String("-e") + << QString::fromLatin1("tell application \"Finder\" to reveal POSIX file \"%1\"") + .arg(fileInfo.canonicalFilePath()); + QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs); + scriptArgs.clear(); + scriptArgs << QLatin1String("-e") + << QLatin1String("tell application \"Finder\" to activate"); + QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs); +#endif +} diff --git a/reference/Qtraktor-master/mainwindow.h b/reference/Qtraktor-master/mainwindow.h new file mode 100644 index 0000000..82d5310 --- /dev/null +++ b/reference/Qtraktor-master/mainwindow.h @@ -0,0 +1,30 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include "backupfile.h" + +namespace Ui { + class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + + public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + + public slots: + void openBackup(); + void extractTo(); + void extractProgress(float percent); + + private: + Ui::MainWindow *ui; + QString backupFilename; + void showInGraphicalShell(const QString &pathIn); +}; + +#endif // MAINWINDOW_H diff --git a/reference/Qtraktor-master/mainwindow.ui b/reference/Qtraktor-master/mainwindow.ui new file mode 100644 index 0000000..aa3274e --- /dev/null +++ b/reference/Qtraktor-master/mainwindow.ui @@ -0,0 +1,226 @@ + + + MainWindow + + + + 0 + 0 + 320 + 130 + + + + Extract WPRESS + + + + + 0 + 0 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + true + + + + + + 0 + + + true + + + + + + + Qt::LeftToRight + + + Please open a backup. + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + 0 + 0 + + + + &Open backup... + + + + + + + false + + + + 0 + 0 + + + + &Extract to... + + + + + + + + + + + + + 0 + 0 + 320 + 22 + + + + + &File + + + + + + + + + + &Open backup + + + Alt+O + + + + + E&xit + + + Alt+F4 + + + + + + + + actionE_xit + triggered() + MainWindow + close() + + + -1 + -1 + + + 199 + 149 + + + + + actionOpenBackup + triggered() + MainWindow + openBackup() + + + -1 + -1 + + + 159 + 99 + + + + + openBackupButton + clicked() + MainWindow + openBackup() + + + 85 + 100 + + + 159 + 64 + + + + + extractBackupButton + clicked() + MainWindow + extractTo() + + + 233 + 100 + + + 159 + 64 + + + + + + openBackup() + extractTo() + + diff --git a/reference/Qtraktor-master/packages/com.servmask.traktor/meta/LICENSE b/reference/Qtraktor-master/packages/com.servmask.traktor/meta/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/reference/Qtraktor-master/packages/com.servmask.traktor/meta/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/reference/Qtraktor-master/packages/com.servmask.traktor/meta/package.xml b/reference/Qtraktor-master/packages/com.servmask.traktor/meta/package.xml new file mode 100644 index 0000000..0512966 --- /dev/null +++ b/reference/Qtraktor-master/packages/com.servmask.traktor/meta/package.xml @@ -0,0 +1,10 @@ + + + Traktor + Install Traktor - WPRESS Extractor. + develop + release-date + + + + diff --git a/reference/Wpress-Extractor-master.zip b/reference/Wpress-Extractor-master.zip new file mode 100644 index 0000000..e7131d5 Binary files /dev/null and b/reference/Wpress-Extractor-master.zip differ diff --git a/reference/Wpress-Extractor-master/README.md b/reference/Wpress-Extractor-master/README.md new file mode 100644 index 0000000..3c794de --- /dev/null +++ b/reference/Wpress-Extractor-master/README.md @@ -0,0 +1,37 @@ +# Wpress-Extractor Windows/Mac +A simple windows app that allows you to extract .wpress files created by the awesome All-in-one-Wp-Migration Wordpress plugin + +## Credits +The extractor source code : [https://github.com/yani-/wpress](https://github.com/yani-/wpress). I had to make a tiny modification to their reader.go file to allow it to run on Windows systems. + +## Download link +[Windows - Download now](https://github.com/fifthsegment/Wpress-Extractor/raw/master/dist/wpress-extractor.exe) + +[Mac - Download now](https://github.com/fifthsegment/Wpress-Extractor/blob/master/dist/mac/wpress_extractor?raw=true) +*IMPORTANT FOR MAC: Don't forget to make the binary executable by running a `chmod +x wpress_extractor` on the downloaded file via the Terminal. + + +## How to extract/open .wpress files ? +Simply provide a path to your downloaded .wpress file as the first commandline argument to the program. +`./wpress_extractor /path/to/my/backup.wpress` + +## I'm not very technical - How to use this thing? +### Windows Instructions + +Simply download the extractor then drop your.wpress file onto the executable (Wpress-extractor.exe). ([Thanks hughc](https://github.com/hughc)!) + + +OR + + + +1. Download the extractor +2. Create a directory where you wish your files to be extracted to +3. Copy the downloaded extractor to that directory +4. Copy your .wpress file to that directory as well +5. Open up a command prompt +6. CD into the directory you just created, let's say its C:\Wordpress-Backup. The command you'll run would be `cd C:\Wordpress-Backup` +7. Now run the following command `wpress-extractor `. For example my .wpress file was fifthsegment.wpress so the command I ran was `wpress-extractor fifthsegment.wpress`. +8. You'll find your files extracted into the same directory where the extractor was run. In my case it was `C:\Wordpress-Backup` + + diff --git a/reference/Wpress-Extractor-master/inc/common.go b/reference/Wpress-Extractor-master/inc/common.go new file mode 100644 index 0000000..18f37c6 --- /dev/null +++ b/reference/Wpress-Extractor-master/inc/common.go @@ -0,0 +1,147 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2014 Yani Iliev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package wpress + +import ( + "bytes" + "errors" + "os" + "path/filepath" + "strconv" +) + +const ( + headerSize = 4377 // length of the header + filenameSize = 255 // maximum number of bytes allowed for filename + contentSize = 14 // maximum number of bytes allowed for content size + mtimeSize = 12 // maximum number of bytes allowed for last modified date + prefixSize = 4096 // maximum number of bytes allowed for prefix +) + +// Header block format of a file +// Field Name Offset Length Contents +// Name 0 255 filename (no path, no slash) +// Size 255 14 length of file contents +// Mtime 269 12 last modification date +// Prefix 281 4096 path name, no trailing slashes +type Header struct { + Name []byte + Size []byte + Mtime []byte + Prefix []byte +} + +// PopulateFromBytes populates header struct from bytes array +func (h *Header) PopulateFromBytes(block []byte) { + h.Name = block[0:255] + h.Size = block[255:269] + h.Mtime = block[269:281] + h.Prefix = block[281:4377] +} + +// PopulateFromFilename populates header struct from passed filename +func (h *Header) PopulateFromFilename(filename string) error { + + // try to open the file + file, err := os.Open(filename) + if err != nil { + return err + } + + // get the fileinfo + fi, err := file.Stat() + if err != nil { + return err + } + + // validate if filename fits the allowed length + if len(fi.Name()) > filenameSize { + return errors.New("filename is longer than max allowed") + } + // create filename buffer + h.Name = make([]byte, filenameSize) + // copy filename to the buffer leaving available space as zero-bytes + copy(h.Name, fi.Name()) + + // get filesize as string + size := strconv.FormatInt(fi.Size(), 10) + // validate if filesize fits the allowed length + if len(size) > contentSize { + return errors.New("file size is larger than max allowed") + } + // create size buffer + h.Size = make([]byte, contentSize) + // copy content size length to the buffer + copy(h.Size, size) + + // get last modified date as string + unixTime := strconv.FormatInt(fi.ModTime().Unix(), 10) + if len(unixTime) > mtimeSize { + return errors.New("last modified date is after than max allowed") + } + // create mtime buffer + h.Mtime = make([]byte, mtimeSize) + // copy mtime to the buffer + copy(h.Mtime, unixTime) + + // get the path to the file + _path := filepath.Dir(filename) + // validate if path fits the allowed length + if len(_path) > prefixSize { + return errors.New("prefix size is longer than max allowed") + } + // create buffer to put the prefix in + h.Prefix = make([]byte, prefixSize) + // put the prefix in the buffer + copy(h.Prefix, _path) + + // close the file + err = file.Close() + if err != nil { + return err + } + + return nil +} + +// GetHeaderBlock returns byte sequence of header block populated with data +func (h Header) GetHeaderBlock() []byte { + block := append(h.Name, h.Size...) + block = append(block, h.Mtime...) + block = append(block, h.Prefix...) + return block +} + +// GetSize returns content size +func (h Header) GetSize() (int, error) { + // remove any trailing zero bytes, convert to string, then convert to integer + return strconv.Atoi(string(bytes.Trim(h.Size, "\x00"))) +} + +// GetEOFBlock returns byte sequence describing EOF +func (h Header) GetEOFBlock() []byte { + // generate zero-byte sequence of length headerSize + return bytes.Repeat([]byte("\x00"), headerSize) +} diff --git a/reference/Wpress-Extractor-master/inc/reader.go b/reference/Wpress-Extractor-master/inc/reader.go new file mode 100644 index 0000000..0a6aa6f --- /dev/null +++ b/reference/Wpress-Extractor-master/inc/reader.go @@ -0,0 +1,226 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2014 Yani Iliev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package wpress + +import ( + "bytes" + "errors" + "fmt" + "os" + "path" + "runtime" + "strings" +) + +const PATH_SEPARATOR_WIN = '\\' +const PATH_SEPARATOR_UNIX = '/' + +// Reader structure +type Reader struct { + Filename string + File *os.File + NumberOfFiles int +} + +// NewReader creates a new Reader instance and calls its constructor +func NewReader(filename string) (*Reader, error) { + // create a new instance of Reader + r := &Reader{filename, nil, 0} + + // call the constructor + err := r.Init() + if err != nil { + return nil, err + } + + // return Reader instance + return r, nil +} + +// Init is the constructor of Reader struct +func (r *Reader) Init() error { + // try to open the file + file, err := os.Open(r.Filename) + if err != nil { + return err + } + + // file was openned, assign the handle to the holding variable + r.File = file + + return nil +} + +// ExtractFile extracts file that matches tha filename and path from archive +func (r Reader) ExtractFile(filename string, path string) ([]byte, error) { + // TODO: implement + return nil, nil +} + +// Extract all files from archive +func (r Reader) Extract() (int, error) { + // put pointer at the beginning of the file + r.File.Seek(0, 0) + + // loop until end of file was reached + iteration := 0; + for { + iteration++; + // read header block + block, err := r.GetHeaderBlock() + if err != nil { + return 0, err + } + + // initialize new header + h := &Header{} + + // check if block equals EOF sequence + if bytes.Compare(block, h.GetEOFBlock()) == 0 { + // EOF reached, stop the loop + break + } + + // populate header from our block bytes + h.PopulateFromBytes(block) + + pathToFile := path.Clean("." + string(os.PathSeparator) + string(bytes.Trim(h.Prefix, "\x00")) + string(os.PathSeparator) + string(bytes.Trim(h.Name, "\x00"))) + if runtime.GOOS == "windows" { + sep := fmt.Sprintf("%c", PATH_SEPARATOR_UNIX) + pathToFile = strings.Replace(pathToFile,"\\",sep,-1) + fmt.Println(pathToFile) + } + + err = os.MkdirAll(path.Dir(pathToFile), 0777) + if err != nil { + fmt.Println(err) + return r.NumberOfFiles, err + } + + // try to open the file + + + + file, err := os.Create(pathToFile) + if err != nil { + return r.NumberOfFiles, err + } + + totalBytesToRead, _ := h.GetSize() + for { + bytesToRead := 512 + if bytesToRead > totalBytesToRead { + bytesToRead = totalBytesToRead + } + + if bytesToRead == 0 { + break + } + + content := make([]byte, bytesToRead) + bytesRead, err := r.File.Read(content) + if err != nil { + return r.NumberOfFiles, err + } + + totalBytesToRead -= bytesRead + contentRead := content[0:bytesRead] + + _, err = file.Write(contentRead) + if err != nil { + return r.NumberOfFiles, err + } + } + + file.Close() + + // increment file counter + r.NumberOfFiles++ + } + + return r.NumberOfFiles, nil +} + +// GetHeaderBlock reads and returns header block from archive +func (r Reader) GetHeaderBlock() ([]byte, error) { + // create buffer to keep the header block + block := make([]byte, headerSize) + + // read the header block + bytesRead, err := r.File.Read(block) + if err != nil { + return nil, err + } + + if bytesRead != headerSize { + return nil, errors.New("unable to read header block size") + } + + return block, nil +} + +// GetFilesCount returns the number of files in archive +func (r Reader) GetFilesCount() (int, error) { + // test if we have enumerated the archive already + if r.NumberOfFiles != 0 { + return r.NumberOfFiles, nil + } + + // put pointer at the beginning of the file + r.File.Seek(0, 0) + + // loop until end of file was reached + for { + // read header block + block, err := r.GetHeaderBlock() + if err != nil { + return 0, err + } + + // initialize new header + h := &Header{} + + // check if block equals EOF sequence + if bytes.Compare(block, h.GetEOFBlock()) == 0 { + // EOF reached, stop the loop + break + } + + // populate header from our block bytes + h.PopulateFromBytes(block) + + // set pointer after file content, to the next header block + size, err := h.GetSize() + if err != nil { + return 0, err + } + r.File.Seek(int64(size), 1) + + // increment file counter + r.NumberOfFiles++ + } + + return r.NumberOfFiles, nil +} diff --git a/reference/Wpress-Extractor-master/wpress-extractor.go b/reference/Wpress-Extractor-master/wpress-extractor.go new file mode 100644 index 0000000..9c406bb --- /dev/null +++ b/reference/Wpress-Extractor-master/wpress-extractor.go @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/yani-/wpress" + "os" +) + +func main() { + fmt.Printf("Wpress Extracter.\n") + + if ( len(os.Args) == 2 ){ + pathTofile := os.Args[1] + fmt.Println(pathTofile); + archiver, _ := wpress.NewReader(pathTofile) + _ , err := archiver.Extract(); + if (err!=nil){ + fmt.Println("Error = "); + fmt.Println(err); + }else{ + fmt.Println("All done!"); + } + + + // fmt.Println("total files = ", i, " files read = ", x); + }else{ + fmt.Println("Inorder to run the extractor please provide the path to the .wpress file as the first argument."); + } + + // wpress.Init(archiver); + + +} diff --git a/reference/ai1wm-master.zip b/reference/ai1wm-master.zip new file mode 100644 index 0000000..c566531 Binary files /dev/null and b/reference/ai1wm-master.zip differ diff --git a/reference/ai1wm-master/.gitignore b/reference/ai1wm-master/.gitignore new file mode 100644 index 0000000..c4229a0 --- /dev/null +++ b/reference/ai1wm-master/.gitignore @@ -0,0 +1,5 @@ +*.pyc +.idea +.DS_Store +dist/* +MANIFEST diff --git a/reference/ai1wm-master/LICENSE.txt b/reference/ai1wm-master/LICENSE.txt new file mode 100644 index 0000000..e208043 --- /dev/null +++ b/reference/ai1wm-master/LICENSE.txt @@ -0,0 +1,17 @@ +MIT License +Copyright (c) 2018 YOUR NAME +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/reference/ai1wm-master/README.md b/reference/ai1wm-master/README.md new file mode 100644 index 0000000..c135f04 --- /dev/null +++ b/reference/ai1wm-master/README.md @@ -0,0 +1,42 @@ +# Pack/Unpack All-in-One WP Migration Packages + +This library provides helper classes for packing/unpacking WordPress [All-in-One WP Migration]( +https://wordpress.org/plugins/all-in-one-wp-migration/) packages. + +# Installation + +```shell script +pip install ai1wm +``` + +# Usage +## Unpack a File + +```shell script +python -m ai1wm /path/to/the/source/wpress/file /path/to/the/destination/dir +``` + +## Pack a Directory + +```shell script +python -m ai1wm /path/to/the/source/dir /path/to/the/destination/wpress/file +``` + +# Coding Examples +## Unpack a File + +```python +from ai1wm import Ai1wmPackage + +package = Ai1wmPackage('/path/to/the/destination/dir') +package.unpack_from('/path/to/the/source/wpress/file') +``` + +## Pack a Directory + +```python +from ai1wm import Ai1wmPackage + +package = Ai1wmPackage('/path/to/the/source/dir') +package.pack_to('/path/to/the/destination/wpress/file') +``` diff --git a/reference/ai1wm-master/ai1wm/__init__.py b/reference/ai1wm-master/ai1wm/__init__.py new file mode 100644 index 0000000..edf478f --- /dev/null +++ b/reference/ai1wm-master/ai1wm/__init__.py @@ -0,0 +1,7 @@ +""" +Packs/Unpacks `All-in-One WP Migration` packages. For more information: +https://wordpress.org/plugins/all-in-one-wp-migration/ +""" + +from .exception import Ai1wmError +from .package import Ai1wmPackage diff --git a/reference/ai1wm-master/ai1wm/__main__.py b/reference/ai1wm-master/ai1wm/__main__.py new file mode 100644 index 0000000..d6ef9b9 --- /dev/null +++ b/reference/ai1wm-master/ai1wm/__main__.py @@ -0,0 +1,27 @@ +""" Entry of the ai1wm program. """ + +import argparse +import os +import sys +from .exception import Ai1wmError +from .package import Ai1wmPackage + + +if __name__ == '__main__': + """ Entry of the ai1wm program. """ + + parser = argparse.ArgumentParser(prog='ai1wm', description='Pack/Unpack All-in-One WP Migration Packages') + parser.add_argument('source', help='source path') + parser.add_argument('target', help='target path') + args = parser.parse_args() + + try: + if os.path.isfile(args.source): + Ai1wmPackage(args.target).unpack_from(args.source) + elif os.path.isdir(args.source): + Ai1wmPackage(args.source).pack_to(args.target) + except Ai1wmError as e: + print(e) + sys.exit(-1) + + sys.exit(0) diff --git a/reference/ai1wm-master/ai1wm/exception.py b/reference/ai1wm-master/ai1wm/exception.py new file mode 100644 index 0000000..0cc3cfe --- /dev/null +++ b/reference/ai1wm-master/ai1wm/exception.py @@ -0,0 +1,6 @@ +""" Package specific exceptions. """ + + +class Ai1wmError(Exception): + """ Exceptions raised from this package. """ + pass diff --git a/reference/ai1wm-master/ai1wm/header.py b/reference/ai1wm-master/ai1wm/header.py new file mode 100644 index 0000000..fb7ab0a --- /dev/null +++ b/reference/ai1wm-master/ai1wm/header.py @@ -0,0 +1,120 @@ +""" Parses ai1wm file header. """ + +import collections +import struct +from .exception import Ai1wmError +from .str_ import b__, s__ + + +class Ai1wmHeader(tuple): + """ Parses an `All-in-One WP Migration` header. """ + + SIZE = 4377 + EOF = b'\x00' * SIZE + + _Location = collections.namedtuple('_Location', ['offset', 'size']) + _LOC_NAME = _Location(0, 255) # File name + _LOC_SIZE = _Location(255, 14) # File size + _LOC_TIME = _Location(269, 12) # Last modified time + _LOC_PATH = _Location(281, 4096) # File path + + def __new__(cls, path=None, name=None, size=None, time=None): + """ Returns a new instance of the object. """ + + if path or name or size or time: + if not isinstance(path, str) or path == '': + raise ValueError(' must be a nonempty string') + if not isinstance(name, str) or name == '': + raise ValueError(' must be a nonempty string') + if not isinstance(size, int) or size < 0: + raise ValueError(' must be a non-negative integer') + if not isinstance(time, int) or time < 0: + raise ValueError('