[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ncustom: ['https://hcb.hackclub.com/donations/start/digitalplat']\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU Affero General Public License is a free, copyleft license for\nsoftware and other kinds of works, specifically designed to ensure\ncooperation with the community in the case of network server software.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nour General Public Licenses are intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  Developers that use our General Public Licenses protect your rights\nwith two steps: (1) assert copyright on the software, and (2) offer\nyou this License which gives you legal permission to copy, distribute\nand/or modify the software.\n\n  A secondary benefit of defending all users' freedom is that\nimprovements made in alternate versions of the program, if they\nreceive widespread use, become available for other developers to\nincorporate.  Many developers of free software are heartened and\nencouraged by the resulting cooperation.  However, in the case of\nsoftware used on network servers, this result may fail to come about.\nThe GNU General Public License permits making a modified version and\nletting the public access it on a server without ever releasing its\nsource code to the public.\n\n  The GNU Affero General Public License is designed specifically to\nensure that, in such cases, the modified source code becomes available\nto the community.  It requires the operator of a network server to\nprovide the source code of the modified version running there to the\nusers of that server.  Therefore, public use of a modified version, on\na publicly accessible server, gives the public access to the source\ncode of the modified version.\n\n  An older license, called the Affero General Public License and\npublished by Affero, was designed to accomplish similar goals.  This is\na different license, not a version of the Affero GPL, but Affero has\nreleased a new version of the Affero GPL which permits relicensing under\nthis license.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU Affero General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Remote Network Interaction; Use with the GNU General Public License.\n\n  Notwithstanding any other provision of this License, if you modify the\nProgram, your modified version must prominently offer all users\ninteracting with it remotely through a computer network (if your version\nsupports such interaction) an opportunity to receive the Corresponding\nSource of your version by providing access to the Corresponding Source\nfrom a network server at no charge, through some standard or customary\nmeans of facilitating copying of software.  This Corresponding Source\nshall include the Corresponding Source for any work covered by version 3\nof the GNU General Public License that is incorporated pursuant to the\nfollowing paragraph.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the work with which it is combined will remain governed by version\n3 of the GNU General Public License.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU Affero General Public License from time to time.  Such new versions\nwill be similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU Affero General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU Affero General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU Affero General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Affero General Public License as published\n    by the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Affero General Public License for more details.\n\n    You should have received a copy of the GNU Affero General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If your software can interact with users remotely through a computer\nnetwork, you should also make sure that it provides a way for users to\nget its source.  For example, if your program is a web application, its\ninterface could display a \"Source\" link that leads users to an archive\nof the code.  There are many ways you could offer source, and different\nsolutions will be better for different programs; see section 13 for the\nspecific requirements.\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU AGPL, see\n<https://www.gnu.org/licenses/>.\n"
  },
  {
    "path": "README.md",
    "content": "## 🌐 Welcome to DigitalPlat Domain\n\n<div align=\"center\">\n  <img src=\"opensource/static/img/logo.jpg\" alt=\"logo\" width=\"240\">\n</div>\n\nWelcome to **DigitalPlat FreeDomain**, where we believe everyone deserves a digital identity. Whether you're an individual, or an organization, we’re offering free domain names to bring your ideas to life – no strings attached!\n\nWith FreeDomain, you’re free to register a unique domain and host it with your favorite DNS provider, like Cloudflare, FreeDNS by Afraid.org, or Hostry. Get online with complete freedom, and keep your wallet happy.\n\n### ✔️ Why Free Domains?\n\nAt **DigitalPlat FreeDomain**, we’re on a mission to make the web more accessible. We believe that the cost of a domain shouldn’t hold anyone back from creating a website. Our goal is to make the internet an open space where everyone can have their own place online, regardless of budget.\n\n> DigitalPlat FreeDomain is independently designed and maintained by [**Edward Hsing**](https://github.com/EdwardLab), founder of the DigitalPlat Foundation.\n\n---\n\n### 🌍 Available Domain Extensions\n\n- **.DPDNS.ORG**\n- **.US.KG**\n- **.QZZ.IO**\n- **.XX.KG**\n\n_(More extensions coming soon!)_\n\n---\n\n### 🌍 Ready to Claim Your Free Domain?\n\nJump in and register your domain by visiting our site:\n\n➡️ [DigitalPlat FreeDomain Dashboard](https://dash.domain.digitalplat.org/)\n\n📝 [Read our tutorial](./documents/tutorial/index.md)\n\n---\n\n### 🌟 Trusted by Thousands\n\nWith over 400,000 domains already registered, DigitalPlat FreeDomain is a trusted choice for individuals and organizations alike. Join our growing community and claim your own free domain today!\n\n---\n\n### ❔ FAQ\n\nCheck [FAQ Page](./documents/domains/faq.md)\n\n---\n\n### 🤝 Join Our Community!\n\n🆕 Join the official [DigitalPlat FreeDomain Telegram group](https://t.me/digitalplatdomain), [Discord server](https://discord.gg/ma4RZzMmVW) today! Be the first to know about the latest updates and happenings! Got questions? Facing challenges? Or simply want to show off your awesome builds? Don’t wait—become part of our community now! 🚀\n\n---\n\n### ⏭️ What's next\nWe might introduce more domain options and free hosting in the future to help as many people as possible! \n\n**We can’t wait to see what you build!**\n\n---\n\n### 🚨 Abuse Reporting\nWe take domain name abuse seriously and are committed to maintaining a safer and more open internet. Every report is carefully reviewed, and response times may vary from a few hours to several days, depending on the complexity of the case.\n\nEmail: abusereport@digitalplat.org\n\n---\n\n## 🧠 Story\n\nThis started as a small DNS experiment when I was 15, letting a few friends use subdomains.\n\nOver time, it grew into something people actually rely on, and running it turned out to be much harder than building it.\n\nI wrote a bit about how it evolved here:  \nhttps://dev.to/edwardhsing/i-bought-a-domain-at-15-now-it-powers-400000-users-7ol\n"
  },
  {
    "path": "documents/domains/announcement.md",
    "content": "\n"
  },
  {
    "path": "documents/domains/faq.md",
    "content": "### ❔ FAQ\n\n#### How many free domain names can be registered? 🚀  \nCurrently, the limit is 3. Due to the high volume of domain abuse, we are no longer reviewing applications to expand the domain registration limit. However, we may reopen the option to request limit expansions in the future. In the meantime, you can set up subdomains via your DNS panel (e.g., example.foo.us.kg).\n\n#### Which DNS platforms can I use this domain with?  \nYou can use it with virtually any DNS management system! Just input the provided platform’s NS records or your own into the DigitalPlat FreeDomain panel (e.g., Try Cloudflare if you're not sure). Feeling adventurous? You can even set up your own DNS system—PowerDNS and BIND are excellent choices to get started!\n\n#### Do I need add star for this project?\nYou don't have to do this, but if you add a star, we would be deeply grateful! It helps more people discover the project. Since this is a non-profit initiative, let's work together to make the internet a more open and free place! Thank you!\n\n#### Cloudflare support?\nYes — we fully support Cloudflare!\nYou can seamlessly use our domain with all of Cloudflare’s features, including DNS management, CDN, DDoS protection, and SSL.\n\nWhether you're setting up for performance or security, integrating with Cloudflare is simple and fully compatible.\n"
  },
  {
    "path": "documents/tutorial/getting-started/1.1-register-account.md",
    "content": "# Creating Your DigitalPlat Domain Account\n\nThis is the first step. Once your account is ready, you’ll be able to claim and manage free domains from the dashboard.\n\n## Step 1: Open the Registration Page\n\nOpen the registration page in your browser:\n\n👉 https://dash.domain.digitalplat.org/auth/register\n\nNo login is required at this stage.\n\n## Step 2: Set Up Your Account\n\nFill in the registration form with the following information.\n\n**Username**\n Choose a unique username. This name will appear in your dashboard and in WHOIS records.\n Stick to letters and numbers to avoid issues later.\n\n**Password**\n Use a strong password.\n At least 12 characters is recommended, including uppercase, lowercase, numbers, and symbols.\n\n**Email Address**\n Use a real, frequently checked email address.\n It’s required for password recovery, important notifications, and WHOIS contact.\n\nMake sure you keep access to this email. Changing it later requires verification.\n\n## Step 3: Provide WHOIS Information\n\nDomain registration requires basic WHOIS details. Please enter:\n\n- Full name or organization name\n- Address\n- Phone number\n\nBy default, this information is publicly visible in WHOIS lookups.\n\nYou can enable WHOIS Privacy Protection in the dashboard after registration to hide these details.\n\n## Step 4: Read and Accept the Policies\n\nBefore submitting, make sure you’ve read and agreed to the following documents:\n\n- Terms of Service\n- Privacy Policy\n- Acceptable Use Policy\n\nOnly click **Register** if you understand and agree to all of them.\n\n## Done 🎉\n\nAfter registration, you’ll be redirected to the dashboard.\n\nYour account is now ready, and you can start claiming and managing your free domains.\n"
  },
  {
    "path": "documents/tutorial/getting-started/1.2-dns-hosting.md",
    "content": "# DNS Hosting\n\nAfter registering your DigitalPlat account, the next step is choosing a DNS hosting provider.\n\nDigitalPlat works with **any standard DNS provider**, but for beginners, we strongly recommend **Cloudflare**. It’s free, reliable, fast, and easy to use.\n\nThis guide walks you through setting up DNS hosting with Cloudflare.\n\n## Why Cloudflare?\n\nCloudflare is a popular DNS and security platform trusted by millions of websites worldwide.\n\nIt’s a good choice because:\n\n- Free plan is enough for most users\n- Clean and beginner-friendly interface\n- Fast global DNS network\n- No hidden limits for basic DNS usage\n\nYou can always switch to another provider later.\n\n## Step 1: Create a Cloudflare Account\n\nGo to Cloudflare and create an account:\n\n👉 https://dash.cloudflare.com/sign-up\n\n![cloudflare-account-register](imgs/cloudflare-account-register.png)\n\nUse a real email address. You’ll need it to manage your DNS later.\n\n## Step 2: Add Your Domain to Cloudflare\n\nAfter logging in, click **Add a site** and enter your domain name.\n\nExample:\n\n```\nexample.dpdns.org\n```\n\n![cloudflare-add-domain](imgs/cloudflare-add-domain.png)\n\nSelect the **Free** plan when asked.\n\n![cloudflare-choose-plan](imgs/cloudflare-choose-plan.png)\n\nCloudflare will automatically scan existing DNS records.\n If your domain is new, this list may be empty. That’s fine.\n\nContinue to the next step.\n\n## Step 3: Update Nameservers\n\nCloudflare will assign two nameservers to your domain, for example:\n\n```\nalice.ns.cloudflare.com\nbob.ns.cloudflare.com\n```\n\nGo back to the **DigitalPlat dashboard**, open your domain settings, and replace the current nameservers with the Cloudflare ones.\n\n![cloudflare-setns](imgs/cloudflare-setns.png)\n\n![digitalplat-register-setns](imgs/digitalplat-register-setns.png)\n\nSave the changes.\n\nDNS propagation usually takes a few minutes, but in some cases it may take up to 24 hours.\n\n## Step 4: Verify DNS Is Active\n\nOnce the nameservers are updated, Cloudflare will automatically detect the change.\n\nYou’ll see your domain status become **Active** in the Cloudflare dashboard.\n\nAt this point, Cloudflare is successfully hosting your DNS.\n\n## Step 5: Manage DNS Records\n\nIn Cloudflare, open your domain and go to **DNS → Records**.\n\n![cloudflare-add-record](imgs/cloudflare-add-record.png)\n\nHere you can add records such as:\n\n- **A / AAAA** for pointing to an IP address\n- **CNAME** for linking to another domain\n- **TXT** for verification or services\n\nChanges usually take effect within seconds.\n\n## Alternative DNS Providers\n\nCloudflare is recommended, but not required.\n\nIf you already use another DNS provider, DigitalPlat also works with:\n\n- FreeDNS\n- Hostry\n- Any provider that supports custom nameservers\n\nAdvanced users can even run their own DNS servers.\n\n## Next Step\n\nNow that DNS hosting is set up, you’re ready to connect your domain and start using it with services.\n\nContinue to the next guide to configure domain records and activation."
  },
  {
    "path": "documents/tutorial/getting-started/index.md",
    "content": "# Getting Started\n\nThis section helps you set up your first DigitalPlat domain from scratch.\n\nIf this is your first time using DigitalPlat, follow the guides below in order.  \nEach step builds on the previous one.\n\n## What You’ll Set Up\n\nBy the end of this section, you will have:\n\n- A DigitalPlat account  \n- DNS hosting configured for your domain  \n- Everything ready for domain activation and use  \n\nNo prior domain or DNS experience is required.\n\n## Guides\n\n### 1. Register a DigitalPlat Domain Account  \nCreate your account and provide the required WHOIS information.\n\n→ [1.1-register-account.md](./1.1-register-account.md)\n\n### 2. Set Up DNS Hosting  \nChoose a DNS provider and configure nameservers.  \nThis guide recommends Cloudflare for beginners.\n\n→ [1.2-dns-hosting.md](./1.2-dns-hosting.md)\n\n## Before You Start\n\nMake sure you have:\n\n- A valid email address  \n- Access to a DNS provider (Cloudflare is recommended)  \n- Basic understanding of what a domain is  \n\n## What’s Next\n\nAfter completing these guides, you’ll be ready to:\n\n- Activate your domain  \n- Add DNS records  \n- Use your domain with websites, servers, or services  \n\nAdditional guides will be added as DigitalPlat evolves."
  },
  {
    "path": "documents/tutorial/index.md",
    "content": "# Tutorials\n\nWelcome to the DigitalPlat documentation tutorials.\n\nThese guides walk you through using DigitalPlat step by step, from first registration to advanced usage.\n\nIf you’re new to DigitalPlat, start with **Getting Started**.\n\n## Getting Started\n\nThis section is for first-time users.\n\nYou’ll learn how to:\n\n- Create a DigitalPlat account  \n- Set up DNS hosting for your domain  \n- Prepare your domain for activation and use  \n\n→ Go to: [Getting Started](./getting-started/index.md)\n\n(Other sections are working in progress.)\n\n## Who These Tutorials Are For\n\nThese tutorials are designed for:\n\n- First-time domain users  \n- Developers hosting personal or project domains  \n- Open-source projects and nonprofits  \n\nNo prior DNS or domain experience is required.\n\n## Notes for Advanced Users\n\nIf you already manage your own DNS or infrastructure, you can skip beginner sections and configure DigitalPlat directly.\n\nDigitalPlat works with any standard DNS provider and does not lock you into a specific platform."
  },
  {
    "path": "opensource/email_template/email_template.html",
    "content": "\n<!doctype html>\n<html>\n<head>\n    <meta charset=\"utf-8\" name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <style>\n        body {\n            background-color: #f9f9f9;\n            font-family: Arial, sans-serif;\n            margin: 0;\n            padding: 0;\n        }\n        .container {\n            max-width: 600px;\n            margin: 20px auto;\n            padding: 20px;\n            background-color: #fff;\n            border-radius: 10px;\n            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n        }\n        h1 {\n            color: #333;\n            font-size: 24px;\n            margin-bottom: 10px;\n        }\n        p {\n            color: #666;\n            font-size: 16px;\n            margin-bottom: 20px;\n        }\n        footer {\n            margin-top: 20px;\n        }\n        .alert {\n            background-color: #f5f5f5;\n            border: 1px solid #ddd;\n            padding: 15px;\n            border-radius: 5px;\n            color: #666;\n            font-size: 14px;\n        }\n        a {\n            color: #007bff;\n            text-decoration: none;\n        }\n        a:hover {\n            text-decoration: underline;\n        }\n    </style>\n</head>\n<body>\n  <div class=\"container\">\n    <header>\n      <h1>US.KG NIC</h1>\n      <p>Registry Website: <a href=\"https://register.us.kg\" target=\"_blank\">register.us.kg</a></p>\n    </header>\n    <div>\n      <h3>{{message}}</h3>\n    </div>\n    <footer>\n      <div class=\"alert\" role=\"alert\">\n        <br>\n        This email is system-generated. Please do not reply. Have questions? Contact us at <a href=\"mailto:contact@nic.us.kg\">contact@nic.us.kg</a>.\n        <br>\n        US.KG NIC\n        <br>\n        If you did not request this email, please disregard it.\n      </div>\n    </footer>\n  </div>\n</body>\n</html>"
  },
  {
    "path": "opensource/frontend/domain_view.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n\n<head>\n    <meta charset=\"utf-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <title>Manage Your Domain: {{domain_name}}</title>\n    {% include \"ga.html\" %}\n\n    <!-- Tailwind CSS -->\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n    <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\" rel=\"stylesheet\">\n\n    <style>\n        body {\n            font-family: 'Inter', sans-serif;\n        }\n        .tab-btn {\n            background-color: #f1f5f9;\n            color: #475569;\n            padding: 0.55rem 1rem;\n            border-radius: 9999px;\n            font-size: 0.875rem;\n            font-weight: 600;\n            transition: all 0.2s ease;\n            display: inline-flex;\n            align-items: center;\n            gap: 0.35rem;\n        }\n        .tab-btn:hover {\n            background-color: #e2e8f0;\n            color: #0f172a;\n        }\n        .active-tab {\n            background-color: #0f172a;\n            color: #ffffff;\n        }\n        .card {\n            background: #ffffff;\n            border-radius: 24px;\n            border: 1px solid #e2e8f0;\n            box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);\n        }\n        .input-field {\n            width: 100%;\n            border-radius: 12px;\n            border: 1px solid #e2e8f0;\n            padding: 0.6rem 0.9rem;\n            font-size: 0.95rem;\n            color: #0f172a;\n            background-color: #ffffff;\n        }\n        .input-field:focus {\n            outline: none;\n            border-color: #94a3b8;\n            box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);\n        }\n        .btn-primary {\n            background-color: #0f172a;\n            color: #ffffff;\n            border-radius: 12px;\n            padding: 0.6rem 1.25rem;\n            font-weight: 600;\n            transition: transform 0.2s ease, box-shadow 0.2s ease;\n            box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);\n        }\n        .btn-primary:hover {\n            transform: translateY(-1px);\n            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.24);\n        }\n        .btn-outline {\n            border: 1px solid #cbd5e1;\n            color: #1e293b;\n            background: #ffffff;\n            border-radius: 12px;\n            padding: 0.55rem 1.25rem;\n            font-weight: 600;\n            transition: all 0.2s ease;\n        }\n        .btn-outline:hover {\n            border-color: #94a3b8;\n            background: #f8fafc;\n        }\n        .badge {\n            display: inline-flex;\n            align-items: center;\n            padding: 0.2rem 0.6rem;\n            border-radius: 9999px;\n            font-size: 0.75rem;\n            font-weight: 600;\n        }\n    </style>\n</head>\n\n<body class=\"bg-slate-50 min-h-screen text-slate-900\">\n    <div class=\"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8\">\n        <div class=\"flex flex-col gap-6\">\n            <header class=\"card px-6 py-6 md:px-10 md:py-8\">\n                <div class=\"flex flex-col gap-4 md:flex-row md:items-center md:justify-between\">\n                    <div>\n                        <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">Domain Management</p>\n                        <h1 class=\"text-2xl md:text-3xl font-semibold text-slate-900\">Manage {{domain_name}}</h1>\n                        <p class=\"text-sm text-slate-500 mt-2\">Update nameservers, renew your domain, and control WHOIS privacy.</p>\n                    </div>\n                    <div class=\"flex flex-wrap items-center gap-3\">\n                        <span class=\"badge bg-slate-100 text-slate-600\">Owner: {{fullname}}</span>\n                        <span class=\"badge bg-emerald-100 text-emerald-700\">WHOIS Privacy Status: {{whois_protection_status}}</span>\n                    </div>\n                </div>\n            </header>\n\n            <section class=\"grid gap-6 lg:grid-cols-[1.05fr_2fr]\">\n                <div class=\"card p-6\">\n                    <h2 class=\"text-lg font-semibold text-slate-900\">Domain overview</h2>\n                    <p class=\"text-sm text-slate-500 mt-1\">Quick access to registration details and timelines.</p>\n                    <dl class=\"mt-6 space-y-4 text-sm\">\n                        <div>\n                            <dt class=\"text-slate-400\">Domain</dt>\n                            <dd class=\"text-base font-semibold text-slate-900\">{{domain_name}}</dd>\n                        </div>\n                        <div>\n                            <dt class=\"text-slate-400\">Administrator</dt>\n                            <dd class=\"text-slate-700\">{{fullname}} ({{username}})</dd>\n                        </div>\n                        <div>\n                            <dt class=\"text-slate-400\">Registration date</dt>\n                            <dd class=\"text-slate-700\">{{regdate_show}}</dd>\n                        </div>\n                        <div>\n                            <dt class=\"text-slate-400\">Expiration date</dt>\n                            <dd class=\"text-slate-700\">{{expdate_show}}</dd>\n                        </div>\n                        <div class=\"rounded-xl border border-slate-100 bg-slate-50 px-4 py-3 text-slate-600\">\n                            Free renewals are available within 180 days of expiry. Use a key to extend early by 2 years.\n                        </div>\n                    </dl>\n                </div>\n\n                <div class=\"card p-6 md:p-8\">\n                    <div class=\"flex flex-wrap gap-3 mb-6\">\n                        <button class=\"tab-btn active-tab\" data-target=\"#ns-records\">Nameservers</button>\n                        <button class=\"tab-btn\" data-target=\"#renew\">Renew</button>\n                        <button class=\"tab-btn\" data-target=\"#whois-privacy\">WHOIS Privacy</button>\n                    </div>\n\n                    <div id=\"ns-records\" class=\"tab-content-box block\">\n                        <p class=\"text-sm text-slate-500 mb-6\">Changes may take a few minutes to propagate.</p>\n                        <form action=\"/panel/nameserver/update\" method=\"GET\" class=\"grid gap-4 md:grid-cols-2\">\n                            <div>\n                                <label for=\"ns1\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">* Name Server 1</label>\n                                <input type=\"text\" name=\"ns1\" id=\"ns1\" value=\"{{ns1}}\" required placeholder=\"NS1\" class=\"input-field\">\n                            </div>\n                            <div>\n                                <label for=\"ns2\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">* Name Server 2</label>\n                                <input type=\"text\" name=\"ns2\" id=\"ns2\" value=\"{{ns2}}\" required placeholder=\"NS2\" class=\"input-field\">\n                            </div>\n                            <div>\n                                <label for=\"ns3\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Name Server 3</label>\n                                <input type=\"text\" name=\"ns3\" id=\"ns3\" value=\"{{ns3}}\" placeholder=\"NS3\" class=\"input-field\">\n                            </div>\n                            <div>\n                                <label for=\"ns4\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Name Server 4</label>\n                                <input type=\"text\" name=\"ns4\" id=\"ns4\" value=\"{{ns4}}\" placeholder=\"NS4\" class=\"input-field\">\n                            </div>\n                            <div>\n                                <label for=\"ns5\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Name Server 5</label>\n                                <input type=\"text\" name=\"ns5\" id=\"ns5\" value=\"{{ns5}}\" placeholder=\"NS5\" class=\"input-field\">\n                            </div>\n                            <div>\n                                <label for=\"ns6\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Name Server 6</label>\n                                <input type=\"text\" name=\"ns6\" id=\"ns6\" value=\"{{ns6}}\" placeholder=\"NS6\" class=\"input-field\">\n                            </div>\n                            <div>\n                                <label for=\"ns7\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Name Server 7</label>\n                                <input type=\"text\" name=\"ns7\" id=\"ns7\" value=\"{{ns7}}\" placeholder=\"NS7\" class=\"input-field\">\n                            </div>\n                            <div>\n                                <label for=\"ns8\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Name Server 8</label>\n                                <input type=\"text\" name=\"ns8\" id=\"ns8\" value=\"{{ns8}}\" placeholder=\"NS8\" class=\"input-field\">\n                            </div>\n                            <input type=\"hidden\" name=\"name\" value=\"{{domain_name}}\">\n                            <div class=\"md:col-span-2 flex flex-wrap justify-between items-center gap-3 pt-2\">\n                                <p class=\"text-xs text-slate-500\">Use valid nameserver hostnames (e.g., ns1.provider.com).</p>\n                                <button type=\"submit\" class=\"btn-primary\">Update nameservers</button>\n                            </div>\n                        </form>\n                    </div>\n\n                    <div id=\"renew\" class=\"tab-content-box hidden\">\n                        <div class=\"space-y-6\">\n                            <div class=\"rounded-2xl border border-slate-200 bg-slate-50 p-4\">\n                                <h3 class=\"text-sm font-semibold text-slate-800\">Free renewal window</h3>\n                                <p class=\"text-sm text-slate-500 mt-1\">Available when less than 180 days remain.</p>\n                                <form action=\"/panel/renew/update\" method=\"GET\" target=\"_blank\" class=\"mt-4\">\n                                    <input type=\"hidden\" name=\"name\" value=\"{{domain_name}}\">\n                                    <button type=\"submit\" class=\"btn-primary\">Request free renewal</button>\n                                </form>\n                            </div>\n\n                            <div class=\"rounded-2xl border border-slate-200 bg-white p-4\">\n                                <h3 class=\"text-sm font-semibold text-slate-800\">Renew early with a KYC key</h3>\n                                <p class=\"text-sm text-slate-500 mt-1\">Each key adds 2 years of validity.</p>\n                                <form action=\"/panel/manual_renew\" method=\"POST\" class=\"mt-4 space-y-3\">\n                                    <input type=\"hidden\" name=\"domain\" value=\"{{domain_name}}\">\n                                    <label for=\"renewkey\" class=\"block text-xs uppercase tracking-wide text-slate-400\">KYC key</label>\n                                    <input type=\"text\" id=\"renewkey\" name=\"renewkey\" class=\"input-field\" placeholder=\"Enter your key\" required>\n                                    <button type=\"submit\" class=\"btn-outline\">Manual renewal (+2 years)</button>\n                                </form>\n                                <p class=\"text-xs text-slate-500 mt-3\">\n                                    Purchase keys at <a href=\"https://key.register.us.kg/\" class=\"text-slate-900 underline\">https://key.register.us.kg/</a>.\n                                </p>\n                            </div>\n                        </div>\n                    </div>\n\n                    <div id=\"whois-privacy\" class=\"tab-content-box hidden\">\n                        <div class=\"rounded-2xl border border-slate-200 bg-slate-50 p-4\">\n                            <p class=\"text-sm text-slate-600\">WHOIS Privacy hides your personal info in public WHOIS queries.</p>\n                            <div class=\"mt-4 flex flex-wrap items-center gap-3\">\n                                <span class=\"text-sm font-semibold text-slate-700\">Current status:</span>\n                                <span class=\"badge bg-emerald-100 text-emerald-700\">{{whois_protection_status}}</span>\n                            </div>\n                        </div>\n\n                        <div class=\"mt-6 flex flex-wrap gap-3\">\n                            <form action=\"/panel/manager/enable_whois_protection\" method=\"GET\" target=\"_blank\">\n                                <input type=\"hidden\" name=\"domain\" value=\"{{domain_name}}\">\n                                <button type=\"submit\" class=\"btn-primary\">Enable privacy</button>\n                            </form>\n\n                            <form action=\"/panel/manager/disable_whois_protection\" method=\"GET\" target=\"_blank\">\n                                <input type=\"hidden\" name=\"domain\" value=\"{{domain_name}}\">\n                                <button type=\"submit\" class=\"btn-outline\">Disable privacy</button>\n                            </form>\n                        </div>\n                    </div>\n                </div>\n            </section>\n        </div>\n    </div>\n\n    <script>\n        const tabButtons = document.querySelectorAll('.tab-btn');\n        const tabContents = document.querySelectorAll('.tab-content-box');\n\n        tabButtons.forEach(button => {\n            button.addEventListener('click', () => {\n                tabButtons.forEach(btn => btn.classList.remove('active-tab'));\n                tabContents.forEach(content => content.classList.add('hidden'));\n\n                button.classList.add('active-tab');\n                const target = document.querySelector(button.dataset.target);\n                target.classList.remove('hidden');\n                target.classList.add('block');\n            });\n        });\n    </script>\n</body>\n\n</html>"
  },
  {
    "path": "opensource/frontend/domainmgr.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n  <title>Domain Dashboard</title>\n  {% include \"ga.html\" %}\n\n  <!-- Tailwind CSS -->\n  <script src=\"https://cdn.tailwindcss.com\"></script>\n  <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap\" rel=\"stylesheet\" />\n\n  <style>\n    body {\n      font-family: 'Inter', sans-serif;\n    }\n    .card {\n      background: #ffffff;\n      border-radius: 24px;\n      border: 1px solid #e2e8f0;\n      box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);\n    }\n  </style>\n</head>\n<body class=\"bg-slate-50 min-h-screen flex flex-col text-slate-900\">\n  <header class=\"bg-white text-slate-900 py-6 text-center border-b border-slate-200\">\n    <h1 class=\"text-2xl font-semibold\">Your domains</h1>\n    <p class=\"text-sm text-slate-500 mt-1\">Manage and search through your registered domains.</p>\n  </header>\n\n  <main class=\"flex-grow p-6\">\n    <div class=\"max-w-5xl mx-auto card p-6 md:p-8\">\n      <div class=\"flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-6\">\n        <input\n          type=\"text\"\n          id=\"searchInput\"\n          class=\"w-full md:w-1/2 border border-slate-200 rounded-xl px-4 py-2 focus:outline-none focus:ring-2 focus:ring-slate-200\"\n          placeholder=\"Search domains\"\n          oninput=\"filterDomains()\"\n        />\n        <div class=\"flex items-center gap-3\">\n          <label for=\"perPageSelect\" class=\"text-sm text-slate-500\">Per page:</label>\n          <select id=\"perPageSelect\" class=\"border border-slate-200 rounded-lg px-2 py-1 text-sm\" onchange=\"changeItemsPerPage()\">\n            <option value=\"5\">5</option>\n            <option value=\"10\" selected>10</option>\n            <option value=\"50\">50</option>\n            <option value=\"100\">100</option>\n            <option value=\"500\">500</option>\n          </select>\n          <div class=\"text-sm text-slate-500\">\n            Showing <span id=\"domain-count\">0</span> domains\n          </div>\n        </div>\n      </div>\n\n      <ul id=\"domainList\" class=\"space-y-2\">\n        {% for domain in domain_list %}\n          <li class=\"domain-item\">\n            <a href=\"/panel/manager/{{domain}}\" class=\"block px-4 py-3 border border-slate-200 rounded-xl hover:bg-slate-50 font-medium text-slate-800 transition\">\n              {{domain}}\n            </a>\n          </li>\n        {% endfor %}\n      </ul>\n\n      <!-- Pagination -->\n      <div class=\"flex justify-center mt-6\" id=\"pagination\"></div>\n    </div>\n  </main>\n\n  <script>\n    let itemsPerPage = 10;\n    let currentPage = 1;\n    let allDomains = [];\n\n    function updateDomainCount() {\n      const visibleItems = document.querySelectorAll('.domain-item:not(.hidden)').length;\n      document.getElementById('domain-count').textContent = visibleItems;\n    }\n\n    function paginateDomains() {\n      const filtered = allDomains.filter(item => !item.classList.contains('hidden'));\n      const totalPages = Math.ceil(filtered.length / itemsPerPage);\n\n      filtered.forEach((item, index) => {\n        item.style.display = (index >= (currentPage - 1) * itemsPerPage && index < currentPage * itemsPerPage) ? '' : 'none';\n      });\n\n      const pagination = document.getElementById('pagination');\n      pagination.innerHTML = '';\n      for (let i = 1; i <= totalPages; i++) {\n        const btn = document.createElement('button');\n        btn.textContent = i;\n        btn.className = `mx-1 px-3 py-1 rounded-lg text-sm font-medium ${i === currentPage ? 'bg-slate-900 text-white' : 'bg-slate-100 text-slate-600'} hover:bg-slate-200`;\n        btn.onclick = () => {\n          currentPage = i;\n          paginateDomains();\n        };\n        pagination.appendChild(btn);\n      }\n    }\n\n    function filterDomains() {\n      const search = document.getElementById('searchInput').value.toLowerCase();\n      allDomains.forEach(item => {\n        const text = item.textContent.toLowerCase();\n        item.classList.toggle('hidden', !text.includes(search));\n      });\n      currentPage = 1;\n      updateDomainCount();\n      paginateDomains();\n    }\n\n    function changeItemsPerPage() {\n      itemsPerPage = parseInt(document.getElementById('perPageSelect').value);\n      currentPage = 1;\n      paginateDomains();\n    }\n\n    document.addEventListener('DOMContentLoaded', () => {\n      allDomains = Array.from(document.querySelectorAll('.domain-item'));\n      updateDomainCount();\n      paginateDomains();\n    });\n  </script>\n</body>\n</html>"
  },
  {
    "path": "opensource/frontend/domainreg.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n  <title>DigitalPlat FreeDomain Dashboard</title>\n  {% include \"ga.html\" %}\n  <script src=\"https://cdn.tailwindcss.com\"></script>\n  {% include \"partials/modern_styles.html\" %}\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n  <div class=\"page-shell\">\n    <header class=\"page-header\">\n      <div class=\"max-w-4xl mx-auto px-6 py-6\">\n        <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">Domain registration</p>\n        <h1 class=\"text-2xl font-semibold\">Get a new domain</h1>\n        <p class=\"text-sm text-slate-500 mt-2\">Review the policies below and submit your desired domain name.</p>\n      </div>\n    </header>\n\n    <main class=\"flex-1\">\n      <div class=\"max-w-3xl mx-auto px-6 py-10\">\n        <div class=\"card p-6 md:p-8 space-y-6\">\n          <div>\n            <h2 class=\"text-lg font-semibold text-slate-900\">Required policy acknowledgements</h2>\n            <p class=\"text-sm text-slate-500 mt-1\">You must read and agree to the following terms to proceed.</p>\n          </div>\n\n          <div class=\"grid gap-2 text-sm text-slate-600\">\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://domain.digitalplat.org/terms-of-service/\" target=\"_blank\">Terms of Service (TOS)</a>\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://domain.digitalplat.org/privacy-policy/\" target=\"_blank\">Privacy Policy</a>\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://digitalplat.org/privacy-policy/\" target=\"_blank\">DigitalPlat Privacy Policy</a>\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://domain.digitalplat.org/acceptable-use-policy/\" target=\"_blank\">Acceptable Use Policy (AUP)</a>\n            <p class=\"text-sm font-medium text-slate-500 mt-4\">Additional policies for US.KG and XX.KG:</p>\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://www.cctld.kg/en/service-regulations\" target=\"_blank\">CCLTD.KG Zone Regulations</a>\n            <p class=\"text-sm font-medium text-slate-500 mt-4\">Additional policies for DPDNS.ORG:</p>\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://pir.org/our-impact/ngo-ong-policy/\" target=\"_blank\">PIR NGO.ONG Policy</a>\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://pir.org/anti-abuse-policy/\" target=\"_blank\">PIR Anti-Abuse Policy</a>\n            <p class=\"text-sm font-medium text-slate-500 mt-4\">Additional policies for QZZ.IO:</p>\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://nic.io/rules.htm\" target=\"_blank\">NIC.IO Rules</a>\n            <a class=\"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 font-medium text-slate-700 hover:bg-slate-200 transition\" href=\"https://nic.io/terms.htm\" target=\"_blank\">NIC.IO Terms and Conditions</a>\n            <p class=\"text-sm font-semibold text-slate-600 mt-4\">Only US.KG and XX.KG require a key.</p>\n          </div>\n\n          <form id=\"domainForm\" action=\"/panel/register/check\" method=\"GET\" class=\"space-y-5\">\n            <div class=\"grid gap-4\">\n              <input type=\"text\" name=\"name\" placeholder=\"Domain name\" required class=\"input-field\" />\n\n              <select name=\"domain\" id=\"domainSelect\" class=\"input-field\">\n                <option value=\".dpdns.org\">.dpdns.org</option>\n                <option value=\".us.kg\">.us.kg</option>\n                <option value=\".qzz.io\">.qzz.io</option>\n                <option value=\".xx.kg\">.xx.kg</option>\n              </select>\n\n              <label class=\"inline-flex items-start gap-3 text-sm text-slate-600\">\n                <input type=\"checkbox\" id=\"termsCheckbox\" class=\"mt-1 rounded border-slate-300 text-slate-900\">\n                <span>\n                  I have carefully read and agree to all applicable policies and service terms listed above. I understand and acknowledge that violation of these terms may result in immediate suspension or deletion of my domain(s) and account, with or without prior notice or explanation, at the sole discretion of the service provider.\n                </span>\n              </label>\n            </div>\n\n            <div class=\"flex justify-center\">\n              <button type=\"submit\" id=\"submitBtn\" class=\"btn-primary\">Check Availability</button>\n            </div>\n          </form>\n\n          <p id=\"errorMsg\" class=\"text-red-500 text-sm hidden text-center\">\n            Please agree to the terms before continuing.\n          </p>\n        </div>\n      </div>\n    </main>\n  </div>\n\n  <script>\n    document.getElementById('domainForm').addEventListener('submit', function (e) {\n      const agreed = document.getElementById('termsCheckbox').checked;\n      if (!agreed) {\n        e.preventDefault();\n        document.getElementById('errorMsg').classList.remove('hidden');\n      }\n    });\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/domainreg_check.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>US.KG Domain Registration</title>\n\n    <!-- Tailwind CSS -->\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n\n    <!-- Google Fonts -->\n    <link href=\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\" rel=\"stylesheet\">\n\n    <style>\n        body {\n            font-family: 'Poppins', sans-serif;\n            background-color: #edf2f7;\n            padding: 0;\n            margin: 0;\n            min-height: 100vh;\n            display: flex;\n            flex-direction: column;\n        }\n        .container {\n            width: 100%;\n            max-width: 1000px;\n            margin: auto;\n            padding: 20px;\n            background-color: #ffffff;\n            border-radius: 12px;\n            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.05);\n            transition: all 0.5s ease;\n        }\n        .header {\n            display: flex;\n            align-items: center;\n            padding: 10px 20px;\n            background-color: #ffffff;\n            border-radius: 12px 12px 0 0;\n            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);\n            margin-bottom: 20px;\n        }\n        .title {\n            font-size: 1.2rem;\n            font-weight: 600;\n            margin-left: 20px;\n            color: #1a202c;\n        }\n        .alert {\n            padding: 15px;\n            border-radius: 5px;\n            margin-bottom: 20px;\n        }\n        .alert-success {\n            background-color: #d4edda;\n            color: #155724;\n        }\n        .alert-light {\n            background-color: #f8f9fa;\n            color: #818182;\n        }\n        .domain-info-heading {\n            font-size: 1.5rem;\n            margin-bottom: 10px;\n        }\n        .domain-info-list {\n            list-style-type: none;\n            padding-left: 0;\n        }\n        .domain-info-list li {\n            margin-bottom: 5px;\n        }\n        .domain-info-list li strong {\n            width: 150px;\n            display: inline-block;\n        }\n        .domain-name,\n        .username {\n            font-weight: bold;\n        }\n    </style>\n</head>\n<body>\n    <div class=\"header\">\n        <div class=\"title\">US.KG Domain Registration - Checkout</div>\n    </div>\n    <div class=\"container mx-auto px-4\">\n        <h2 class=\"text-xl font-bold mb-4\">Domain Checkout</h2>\n        <div class=\"alert alert-success\" role=\"alert\">\n            {{regtips}}\n        </div>\n        <div class=\"alert alert-light\" role=\"alert\">\n            <h3 class=\"domain-info-heading\">Your domain information:</h3>\n            <ul class=\"domain-info-list\">\n                <li><strong>Name:</strong> <span class=\"domain-name\">{{domain_name}}.us.kg</span></li>\n                <li><strong>Administrator:</strong> <span class=\"username\">{{username}}</span></li>\n                <li><strong>Price:</strong> Always free, with a default registration period of one year (365 days). Renewal is available for the next year when there are fewer than 180 days remaining until expiry. </li>\n            </ul>\n        </div>\n        \n        <form id=\"registrationForm\" action=\"/panel/register/buy\" method=\"POST\" class=\"space-y-4\">\n            <div>\n                <label for=\"ns1\" class=\"block text-gray-700 font-bold mb-2\"><span class=\"text-red-500\">*</span> Name Server 1</label>\n                <input type=\"text\" name=\"ns1\" id=\"ns1\" class=\"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline\" placeholder=\"NS1\" required>\n            </div>\n            <div>\n                <label for=\"ns2\" class=\"block text-gray-700 font-bold mb-2\"><span class=\"text-red-500\">*</span> Name Server 2</label>\n                <input type=\"text\" name=\"ns2\" id=\"ns2\" class=\"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline\" placeholder=\"NS2\" required>\n            </div>\n            <div>\n                <label for=\"ns3\" class=\"block text-gray-700 font-bold mb-2\">Name Server 3</label>\n                <input type=\"text\" name=\"ns3\" id=\"ns3\" class=\"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline\" placeholder=\"NS3\">\n            </div>\n            <div>\n                <label for=\"ns4\" class=\"block text-gray-700 font-bold mb-2\">Name Server 4</label>\n                <input type=\"text\" name=\"ns4\" id=\"ns4\" class=\"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline\" placeholder=\"NS4\">\n            </div>\n            <input type=\"hidden\" name=\"name\" id=\"name\" value=\"{{domain_name}}\" required>\n            <button id=\"registerButton\" type=\"submit\" class=\"w-full bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline\">Register!</button>\n        </form>\n    </div>\n\n    <script>\n        document.getElementById(\"registrationForm\").addEventListener(\"submit\", function(event) {\n            var registerButton = document.getElementById(\"registerButton\");\n            registerButton.disabled = true;\n            registerButton.textContent = \"Submitting...\";\n        });\n    </script>\n            <script>\n                window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };\n            </script>\n            <script defer src=\"/_vercel/insights/script.js\"></script>\n            <script>\n                window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };\n            </script>\n            <script defer src=\"/_vercel/speed-insights/script.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/domainreg_check_public.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>US.KG Domain Registration</title>\n\n    <!-- Tailwind CSS -->\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n\n    <!-- Google Fonts -->\n    <link href=\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\" rel=\"stylesheet\">\n\n    <style>\n        body {\n            font-family: 'Poppins', sans-serif;\n            background-color: #edf2f7;\n            padding: 0;\n            margin: 0;\n            min-height: 100vh;\n            display: flex;\n            flex-direction: column;\n        }\n        .container {\n            width: 100%;\n            max-width: 1000px;\n            margin: auto;\n            padding: 20px;\n            background-color: #ffffff;\n            border-radius: 12px;\n            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.05);\n            transition: all 0.5s ease;\n        }\n        .header {\n            display: flex;\n            align-items: center;\n            padding: 10px 20px;\n            background-color: #ffffff;\n            border-radius: 12px 12px 0 0;\n            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);\n            margin-bottom: 20px;\n        }\n        .title {\n            font-size: 1.2rem;\n            font-weight: 600;\n            margin-left: 20px;\n            color: #1a202c;\n        }\n        .alert {\n            padding: 15px;\n            border-radius: 5px;\n            margin-bottom: 20px;\n        }\n        .alert-success {\n            background-color: #d4edda;\n            color: #155724;\n        }\n        .alert-light {\n            background-color: #f8f9fa;\n            color: #818182;\n        }\n        .domain-info-heading {\n            font-size: 1.5rem;\n            margin-bottom: 10px;\n        }\n        .domain-info-list {\n            list-style-type: none;\n            padding-left: 0;\n        }\n        .domain-info-list li {\n            margin-bottom: 5px;\n        }\n        .domain-info-list li strong {\n            width: 150px;\n            display: inline-block;\n        }\n        .domain-name {\n            font-weight: bold;\n        }\n    </style>\n</head>\n<body>\n    <div class=\"header\">\n        <div class=\"title\">US.KG Domain Registration - Check Domain Availability</div>\n    </div>\n    <div class=\"container mx-auto px-4\">\n        <h2 class=\"text-xl font-bold mb-4\">Check Domain Availability</h2>\n        <div class=\"alert alert-success\" role=\"alert\">\n            {{regtips}}\n        </div>\n        <div class=\"alert alert-light\" role=\"alert\">\n            <h3 class=\"domain-info-heading\">Your domain information:</h3>\n            <ul class=\"domain-info-list\">\n                <li><strong>Name:</strong> <span class=\"domain-name\">{{domain_name}}.us.kg</span></li>\n                <li><strong>Price:</strong> Always Free, Renewal for the Next Year if under 180 Days until Expiry</li>\n            </ul>\n        </div>\n        <h4 class=\"domain-info-heading text-center mt-4\">Sign up for a new account now! It only takes five minutes! And it's always free!</h4>\n    </div>\n    <script>\n        window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };\n    </script>\n    <script defer src=\"/_vercel/insights/script.js\"></script>\n    <script>\n        window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };\n    </script>\n    <script defer src=\"/_vercel/speed-insights/script.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/error.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Error - DigitalPlat</title>\n  {% include \"ga.html\" %}\n  <script src=\"https://cdn.tailwindcss.com\"></script>\n  {% include \"partials/modern_styles.html\" %}\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n  <div class=\"page-shell\">\n    <main class=\"flex-1 flex items-center justify-center px-6 py-12\">\n      <div class=\"card max-w-2xl w-full p-8 text-center space-y-4\">\n        <div class=\"mx-auto text-rose-500\">\n          <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-16 w-16 mx-auto\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n            <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 8v4m0 4h.01M21 12c0 4.97-4.03 9-9 9s-9-4.03-9-9 4.03-9 9-9 9 4.03 9 9z\" />\n          </svg>\n        </div>\n        <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">Error</p>\n        <h1 class=\"text-2xl font-semibold text-rose-600\">Error!</h1>\n        <p class=\"text-slate-600\">{{info}}</p>\n        <div>\n          <a class=\"btn-primary inline-flex\" href=\"javascript:history.back()\">Go Back</a>\n        </div>\n      </div>\n    </main>\n  </div>\n\n  <script src=\"https://cdn.jsdelivr.net/npm/tsparticles-preset-fountain@2/tsparticles.preset.fountain.bundle.min.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/info.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Notice - DigitalPlat FreeDomain</title>\n  {% include \"ga.html\" %}\n  <script src=\"https://cdn.tailwindcss.com\"></script>\n  {% include \"partials/modern_styles.html\" %}\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n  <div class=\"page-shell\">\n    <main class=\"flex-1 flex items-center justify-center px-6 py-12\">\n      <div class=\"card max-w-2xl w-full p-8 text-center space-y-4\">\n        <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">System notice</p>\n        <h1 class=\"text-2xl font-semibold\">Notice</h1>\n        <p class=\"text-slate-600\">{{info | safe}}</p>\n        <div>\n          <a class=\"btn-primary inline-flex\" href=\"#\" onclick=\"history.back(); return false;\">Go Back</a>\n        </div>\n      </div>\n    </main>\n  </div>\n\n  <script src=\"https://cdn.jsdelivr.net/npm/tsparticles-preset-fountain@2/tsparticles.preset.fountain.bundle.min.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/login.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>DigitalPlat Domain Dashboard Login</title>\n    {% include \"ga.html\" %}\n    <link rel=\"icon\" type=\"image/jpeg\" href=\"/static/img/logo.jpg\">\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n    {% include \"partials/modern_styles.html\" %}\n    <link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined\" />\n    <script src=\"https://challenges.cloudflare.com/turnstile/v0/api.js?compat=recaptcha\" async defer></script>\n\n    <style>\n        .fade-in {\n            animation: fadeIn 0.5s ease-in-out;\n        }\n        @keyframes fadeIn {\n            from { opacity: 0; }\n            to { opacity: 1; }\n        }\n    </style>\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n<div class=\"page-shell\">\n    <main class=\"flex-1 flex items-center justify-center px-6 py-10\">\n        <div class=\"w-full max-w-md card p-8 space-y-6\">\n            <div class=\"flex items-center space-x-4\">\n                <img src=\"/static/img/logo.jpg\" alt=\"Logo\" class=\"brand-mark\">\n                <div>\n                    <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">Welcome back</p>\n                    <h1 class=\"text-xl font-semibold text-slate-900\">DigitalPlat Domain Dashboard</h1>\n                    <p class=\"text-sm text-slate-500\">Sign in to manage your domains.</p>\n                </div>\n            </div>\n\n            <form id=\"loginForm\" action=\"/auth/login\" method=\"POST\" class=\"space-y-6\">\n                <div id=\"step1\" class=\"grid gap-y-4 fade-in\">\n                    <div class=\"rounded-xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-600\">\n                        {{notice | safe}}\n                    </div>\n                    <div>\n                        <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">E-Mail</label>\n                        <input type=\"email\" name=\"email\" id=\"email\" required class=\"input-field\" placeholder=\"you@example.com\">\n                    </div>\n                    <button type=\"button\" onclick=\"nextStep()\" class=\"btn-primary w-full\">Next</button>\n                </div>\n\n                <div id=\"step2\" class=\"hidden opacity-0 grid gap-y-4 fade-in\">\n                    <div class=\"flex items-center space-x-3 rounded-xl border border-slate-200 bg-white px-4 py-3\">\n                        <span class=\"material-symbols-outlined text-slate-400 text-4xl\">account_circle</span>\n                        <p id=\"displayEmail\" class=\"flex-grow text-slate-700\"></p>\n                        <button type=\"button\" onclick=\"editEmail()\" class=\"text-sm font-medium text-slate-600 hover:text-slate-900\">Edit</button>\n                    </div>\n                    <div>\n                        <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Password</label>\n                        <input type=\"password\" name=\"password\" id=\"password\" required class=\"input-field\" placeholder=\"Your password\">\n                    </div>\n                    <div class=\"g-recaptcha mb-2\" data-sitekey=\"0x4AAAAAAAxuMrGCYFcOwd1N\"></div>\n                    <button type=\"submit\" class=\"btn-primary w-full\">Login</button>\n                </div>\n\n                <div class=\"text-center text-sm text-slate-500 space-y-1\">\n                    <p>Don't have an account? <a href=\"/auth/register\" class=\"font-medium text-slate-900 hover:underline\">Sign up</a></p>\n                    <p>Forgot password? <a href=\"/auth/reset-password\" class=\"font-medium text-slate-900 hover:underline\">Reset Password</a></p>\n                </div>\n            </form>\n\n            <div class=\"text-center\">\n                <a class=\"mt-4 inline-flex items-center justify-center w-full border border-slate-200 bg-white text-slate-700 py-3 rounded-xl hover:bg-slate-50 transition\" href=\"/auth/login/google\">\n                    <img src=\"/static/img/login/glogo.webp\" class=\"w-5 h-5 mr-3\" alt=\"Google\"> Sign in with Google\n                </a>\n            </div>\n\n            <footer class=\"text-center text-xs text-slate-400 space-y-2\">\n                <p>\n                    By continuing you agree to our\n                    <a href=\"https://nic.us.kg/terms-of-service/\" class=\"text-slate-600 hover:text-slate-900\">Terms</a>,\n                    <a href=\"https://nic.us.kg/privacy-policy/\" class=\"text-slate-600 hover:text-slate-900\">Privacy</a>, and\n                    <a href=\"https://nic.us.kg/acceptable-use-policy/\" class=\"text-slate-600 hover:text-slate-900\">AUP</a>.\n                </p>\n                <p>Issues? <a href=\"https://github.com/DigitalPlatDev/US.KG-Issues/issues/new/choose\" class=\"text-slate-600 hover:text-slate-900\">Report here</a></p>\n                <button type=\"button\" class=\"inline-flex items-center space-x-2 text-slate-500 hover:text-slate-900\" data-cc=\"show-preferencesModal\">\n                    <img src=\"/static/img/privacyoptions.svg\" alt=\"Privacy Icon\" class=\"w-6 h-6\">\n                    <span>Do Not Share My Personal Information</span>\n                </button>\n            </footer>\n        </div>\n    </main>\n</div>\n\n<script>\nfunction nextStep() {\n    const email = document.getElementById('email').value;\n    if (email) {\n        document.getElementById('step1').classList.add('hidden');\n        const step2 = document.getElementById('step2');\n        document.getElementById('displayEmail').innerText = email;\n        step2.classList.remove('hidden');\n        setTimeout(() => step2.classList.add('opacity-100'), 100);\n    }\n}\n\nfunction editEmail() {\n    document.getElementById('step2').classList.add('hidden');\n    document.getElementById('step1').classList.remove('hidden');\n}\n\ndocument.getElementById('email').addEventListener('keypress', function(event) {\n    if (event.key === 'Enter') {\n        event.preventDefault();\n        nextStep();\n    }\n});\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/overview.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <title>DigitalPlat Domain Dashboard</title>\n  \n  <!-- Tailwind CSS -->\n  <script src=\"https://cdn.tailwindcss.com\"></script>\n  \n  <!-- Font Awesome -->\n  <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">\n  \n  <!-- Google Fonts -->\n  <link href=\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap\" rel=\"stylesheet\">\n  \n  <style>\n    body {\n      font-family: 'Poppins', sans-serif;\n      background-color: #f3f4f6;\n      padding: 20px;\n    }\n    .btn {\n      background-color: #1f2937;\n      color: #ffffff;\n      padding: 10px 20px;\n      border-radius: 0.5rem;\n      transition: background-color 0.3s;\n    }\n    .btn:hover {\n      background-color: #374151;\n    }\n  </style>\n</head>\n<body class=\"bg-gray-100 text-gray-900\">\n\n  <header class=\"text-center py-10\">\n    <h1 class=\"text-4xl font-semibold\">Welcome to DigitalPlat Domain Dashboard!</h1>\n  </header>\n  \n  <main class=\"container mx-auto px-4\">\n    \n    <section class=\"mb-8\">\n      <h2 class=\"text-2xl font-semibold mb-4\">Overview</h2>\n      <div class=\"alert alert-primary bg-blue-100 text-blue-800 p-4 rounded-md shadow-md mb-6\">\n        {{notice}}\n      </div>\n      <div class=\"alert alert-primary bg-blue-100 text-blue-800 p-4 rounded-md shadow-md mb-6\">\n        🆕 Join the official <a href=\"https://t.me/digitalplatdomain\" target=\"_blank\" class=\"text-blue-600 hover:underline\">DigitalPlat FreeDomain Telegram group</a> or <a href=\"https://discord.gg/7mrqAAqcSa\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Discord server</a> today! Be the first to know about the latest updates and happenings! Got questions? Facing challenges? Or simply want to show off your awesome builds? Don’t wait—become part of our community now! 🚀\n      </div>      \n      <div class=\"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6\">\n        <div class=\"small-box bg-blue-600 text-white p-6 rounded-md shadow-md flex items-center justify-between\">\n          <div>\n            <h3 class=\"text-3xl font-semibold\">{{domains}}</h3>\n            <p class=\"mt-2\">My domains</p>\n          </div>\n          <div class=\"icon text-5xl opacity-75\">\n            <i class=\"fas fa-cloud\"></i>\n          </div>\n        </div>\n        \n        <div class=\"small-box bg-green-600 text-white p-6 rounded-md shadow-md flex items-center justify-between\">\n          <div>\n            <h3 class=\"text-3xl font-semibold\">{{max_reg}}</h3>\n            <p class=\"mt-2\">Domain name maximum registration limit</p>\n            <p class=\"mt-1 text-sm\">Need more? No worries! Click the \"Need more domains?\" button on the left side of the panel. (Cause we are non-profit!)</p>\n          </div>\n          <div class=\"icon text-5xl opacity-75\">\n            <i class=\"fas fa-info\"></i>\n          </div>\n        </div>\n      </div>\n    </section>\n    \n    <section class=\"mb-8\">\n      <div class=\"card bg-white shadow-md rounded-md overflow-hidden mb-6\">\n        <div class=\"card-header bg-gray-800 text-white p-4\">\n          <h3 class=\"text-xl\">My Domains:</h3>\n        </div>\n        <div class=\"card-body p-4\">\n          <table class=\"min-w-full bg-white\">\n            <thead>\n              <tr>\n                <th class=\"py-2 px-4 bg-gray-100 text-left\">#</th>\n                <th class=\"py-2 px-4 bg-gray-100 text-left\">Domain</th>\n              </tr>\n            </thead>\n            <tbody>\n              {% for domain in domains_list %}\n              <tr>\n                <td class=\"border-t py-2 px-4\">{{ loop.index }}</td>\n                <td class=\"border-t py-2 px-4\">{{ domain }}</td>\n              </tr>\n              {% endfor %}\n            </tbody>\n          </table>\n        </div>\n      </div>\n      \n      <div class=\"card bg-white shadow-md rounded-md overflow-hidden mb-6\">\n        <div class=\"card-header bg-gray-800 text-white p-4\">\n          <h3 class=\"text-xl\">Expire soon:</h3>\n        </div>\n        <div class=\"card-body p-4\">\n          <table class=\"min-w-full bg-white\">\n            <thead>\n              <tr>\n                <th class=\"py-2 px-4 bg-gray-100 text-left\">#</th>\n                <th class=\"py-2 px-4 bg-gray-100 text-left\">Domain</th>\n                <th class=\"py-2 px-4 bg-gray-100 text-left\">Expire Date</th>\n              </tr>\n            </thead>\n            <tbody>\n              {% for key, value in expire_soon.items() %}\n              <tr>\n                <td class=\"border-t py-2 px-4\">{{ loop.index }}</td>\n                <td class=\"border-t py-2 px-4\">{{ key }}</td>\n                <td class=\"border-t py-2 px-4\">{{ value }}</td>\n              </tr>\n              {% endfor %}\n            </tbody>\n          </table>\n        </div>\n      </div>\n    </section>\n    \n    <section class=\"mb-8\">\n      <h2 class=\"text-2xl font-semibold mb-4\">What are you looking for?</h2>\n      <div class=\"flex flex-wrap gap-4 mb-6\">\n        <button class=\"btn\" onclick=\"window.location.href = '/panel/register';\">Domain name registration</button>\n        <button class=\"btn\" onclick=\"window.location.href = '/panel/domains';\">Manage my domains</button>\n      </div>\n      \n      <h2 class=\"text-2xl font-semibold mb-4\">My Account / WHOIS Information</h2>\n      <div class=\"card bg-white shadow-md rounded-md overflow-hidden mb-6\">\n        <div class=\"card-body p-4\">\n          <table class=\"min-w-full bg-white\">\n            <tbody>\n              <tr>\n                <td class=\"py-2 px-4 bg-gray-100 text-left font-semibold\">Username:</td>\n                <td class=\"py-2 px-4 bg-white\">{{username}}</td>\n              </tr>\n              <tr>\n                <td class=\"py-2 px-4 bg-gray-100 text-left font-semibold\">Fullname:</td>\n                <td class=\"py-2 px-4 bg-white\">{{fullname}}</td>\n              </tr>\n              <tr>\n                <td class=\"py-2 px-4 bg-gray-100 text-left font-semibold\">Email:</td>\n                <td class=\"py-2 px-4 bg-white\">{{email}}</td>\n              </tr>\n              <tr>\n                <td class=\"py-2 px-4 bg-gray-100 text-left font-semibold\">Phone:</td>\n                <td class=\"py-2 px-4 bg-white\">{{phone}}</td>\n              </tr>\n              <tr>\n                <td class=\"py-2 px-4 bg-gray-100 text-left font-semibold\">Address:</td>\n                <td class=\"py-2 px-4 bg-white\">{{address}}</td>\n              </tr>\n              <tr>\n                <td class=\"py-2 px-4 bg-gray-100 text-left font-semibold\">Account ID:</td>\n                <td class=\"py-2 px-4 bg-white\"><b>{{userid}}</b></td>\n              </tr>\n            </tbody>\n          </table>\n        </div>\n      </div>\n      <div class=\"flex flex-wrap gap-4\">\n        <button class=\"btn\" onclick=\"window.location.href = '/auth/user/edit';\">Account Information / Edit WHOIS</button>\n        <button class=\"btn\" onclick=\"window.location.href = '/logout';\">Logout</button>\n      </div>\n    </section>\n    \n  </main>\n\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/panel.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <link rel=\"icon\" type=\"image/jpeg\" href=\"/static/img/logo.jpg\">\n    <title>DigitalPlat Domain Dashboard</title>\n    {% include \"ga.html\" %}\n    <!-- Tailwind CSS -->\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n\n    <!-- Font Awesome -->\n    <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">\n\n    <!-- Google Fonts -->\n    <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\" rel=\"stylesheet\">\n    \n    <style>\n        :root {\n            color-scheme: light;\n        }\n\n        html, body {\n            font-family: 'Inter', sans-serif;\n            background-color: #f8fafc;\n            display: flex;\n            flex-direction: column;\n            min-height: 100vh;\n            overflow: auto;\n            scrollbar-width: none;\n            color: #0f172a;\n        }\n\n        html::-webkit-scrollbar,\n        body::-webkit-scrollbar {\n            display: none;\n        }\n        .sidebar {\n            width: 260px;\n            background-color: #ffffff;\n            color: #0f172a;\n            padding: 24px 16px;\n            position: fixed;\n            height: 100vh;\n            transition: width 0.3s, transform 0.3s;\n            overflow: hidden;\n            border-right: 1px solid #e2e8f0;\n            box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);\n        }\n        .sidebar.collapsed {\n            width: 70px;\n        }\n        .sidebar a {\n            color: #475569;\n            text-decoration: none;\n            padding: 10px 12px;\n            display: flex;\n            align-items: center;\n            gap: 12px;\n            border-radius: 0.75rem;\n            transition: background-color 0.3s, color 0.3s;\n            font-weight: 500;\n        }\n        .sidebar a i {\n            width: 30px;\n            text-align: center;\n        }\n        .sidebar.collapsed a {\n            justify-content: center;\n        }\n        .sidebar a.active {\n            background-color: #f1f5f9;\n            color: #0f172a;\n        }\n        .sidebar a:hover {\n            background-color: #f1f5f9;\n            color: #0f172a;\n        }\n        .sidebar .brand-logo {\n            display: flex;\n            align-items: center;\n            margin-bottom: 20px;\n            gap: 12px;\n        }\n        .sidebar .brand-logo img {\n            border-radius: 16px;\n            width: 44px;\n            height: 44px;\n            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);\n        }\n        .sidebar.collapsed .brand-logo {\n            justify-content: center;\n        }\n        .sidebar.collapsed .brand-logo span,\n        .sidebar.collapsed .nav-text {\n            display: none;\n        }\n        .collapse-btn {\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            width: 100%;\n            padding: 10px 0;\n            border: none;\n            background: none;\n            color: #64748b;\n            cursor: pointer;\n            transition: color 0.3s;\n            margin-bottom: 20px;\n        }\n        .collapse-btn:hover {\n            color: #0f172a;\n        }\n        .main-content {\n            margin-left: 260px;\n            padding: 24px;\n            flex-grow: 1;\n            transition: margin-left 0.3s;\n            background-color: #f8fafc;\n        }\n        .main-content.expanded {\n            margin-left: 70px;\n        }\n        .navbar {\n            background-color: #ffffff;\n            border: 1px solid #e2e8f0;\n            padding: 12px 20px;\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n            border-radius: 16px;\n            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);\n            margin-bottom: 20px;\n        }\n        .navbar a {\n            color: #334155;\n            text-decoration: none;\n            margin-right: 18px;\n            font-weight: 500;\n        }\n        .navbar a:hover {\n            color: #0f172a;\n        }\n        .navbar .dropdown-menu {\n            background-color: #ffffff;\n            border: 1px solid #e5e7eb;\n            border-radius: 0.375rem;\n            padding: 10px;\n        }\n        .content-wrapper {\n            background: #ffffff;\n            border-radius: 20px;\n            border: 1px solid #e2e8f0;\n            box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);\n            overflow: hidden;\n        }\n        .content-wrapper iframe {\n            display: block;\n            width: 100%;\n            border: none;\n        }\n\n\n        @media (max-width: 768px) {\n            .sidebar {\n                width: 100%;\n                height: auto;\n                position: fixed;\n                transform: translateY(-100%);\n                top: 0;\n                left: 0;\n                z-index: 10;\n                transition: transform 0.3s;\n            }\n            .sidebar.visible {\n                transform: translateY(0);\n            }\n            .main-content {\n                margin-left: 0;\n            }\n            .overlay {\n                display: none;\n                position: fixed;\n                top: 0;\n                left: 0;\n                width: 100%;\n                height: 100%;\n                background: rgba(0, 0, 0, 0.5);\n                z-index: 9;\n            }\n            .overlay.visible {\n                display: block;\n            }\n        }\n        .loading-spinner {\n            position: fixed;\n            top: 50%;\n            left: 50%;\n            transform: translate(-50%, -50%);\n            border: 4px solid rgba(0, 0, 0, 0.1);\n            border-radius: 50%;\n            border-top: 4px solid #2563eb;\n            width: 40px;\n            height: 40px;\n            -webkit-animation: spin 1s linear infinite;\n            animation: spin 1s linear infinite;\n            z-index: 9999;\n        }\n\n        .loading-bar {\n        position: fixed;\n        top: 0;\n        left: 0;\n        height: 3px;\n        width: 0%;\n        background-color: #2563eb;\n        z-index: 10000;\n        transition: width 0.3s ease;\n        }\n\n\n        @-webkit-keyframes spin {\n            0% { -webkit-transform: rotate(0deg); }\n            100% { -webkit-transform: rotate(360deg); }\n        }\n\n        @keyframes spin {\n            0% { transform: rotate(0deg); }\n            100% { transform: rotate(360deg); }\n        }\n    </style>\n</head>\n<body>\n    <div id=\"loading-bar\" class=\"loading-bar\"></div>\n    <div class=\"overlay\" onclick=\"toggleSidebar()\"></div>\n    <div id=\"loading-spinner\" class=\"loading-spinner\"></div>\n    <aside class=\"sidebar\" style=\"overflow-y: auto;\">\n        <div class=\"user-section\">\n            <div class=\"brand-logo\">\n              <img src=\"/static/img/logo.jpg\" alt=\"USKG LOGO\">\n              <div>\n                <span class=\"text-lg font-semibold block text-slate-900\">DigitalPlat</span>\n                <span class=\"text-xs uppercase tracking-[0.2em] text-slate-500\">Domain Dashboard</span>\n              </div>\n            </div>\n          </div>\n        <button class=\"collapse-btn\" onclick=\"toggleSidebar()\">\n            <i class=\"fas fa-bars\"></i>\n        </button>\n        <nav>\n            <a href=\"#\" onclick=\"loadPage(this, '/panel/overview'); return false;\" class=\"active\">\n                <i class=\"fas fa-tachometer-alt\"></i> <span class=\"nav-text\">Overview</span>\n            </a>\n            <a href=\"#\" onclick=\"loadPage(this, '/panel/domains'); return false;\">\n                <i class=\"fas fa-globe\"></i> <span class=\"nav-text\">My Domains</span>\n            </a>\n            <a href=\"#\" onclick=\"loadPage(this, '/panel/register'); return false;\">\n                <i class=\"fas fa-edit\"></i> <span class=\"nav-text\">Domain Registration</span>\n            </a>\n            <a href=\"#\" onclick=\"loadPage(this, '/panel/redeem_slot'); return false;\">\n                <i class=\"fas fa-key\"></i> <span class=\"nav-text\">More slots - Redeem Key</span>\n            </a>\n            <a href=\"#\" onclick=\"loadPage(this, '/auth/user/edit'); return false;\">\n                <i class=\"fas fa-user\"></i> <span class=\"nav-text\">My Account</span>\n            </a>\n            <a href=\"#\" onclick=\"loadPage(this, '/whois/ui'); return false;\">\n                <i class=\"fas fa-search\"></i> <span class=\"nav-text\">Whois</span>\n            </a>\n            <a href=\"https://hcb.hackclub.com/donations/start/digitalplat\">\n                <i class=\"fas fa-donate\"></i> <span class=\"nav-text\">Donate</span>\n            </a>\n            <a href=\"https://forms.gle/sUmyMh154Q3G1PU56\">\n                <i class=\"fas fa-exclamation\"></i> <span class=\"nav-text\">Report Abuse</span>\n            </a>\n            <a href=\"https://forms.gle/ASrRCviu16wSc7bc6\">\n                <i class=\"fas fa-arrows-alt\"></i> <span class=\"nav-text\">Need more domains?</span>\n            </a>\n            <a href=\"https://domain.digitalplat.org\">\n                <i class=\"fas fa-globe\"></i> <span class=\"nav-text\">DigitalPlat Domain</span>\n            </a>\n            <a href=\"/logout\">\n                <i class=\"fas fa-sign-out-alt\"></i> <span class=\"nav-text\">Logout</span>\n            </a>\n        </nav>\n    </aside>\n    <div class=\"main-content\">\n        <nav class=\"navbar\">\n            <div class=\"hidden md:flex items-center\">\n                <a href=\"/panel/domains\">Domain List</a>\n                <a href=\"/panel/register\">Register</a>\n                <a href=\"/panel/redeem_slot\">Redeem Key</a>\n                <a href=\"/auth/user/edit\">My Account</a>\n                <a href=\"#\" onclick=\"event.preventDefault(); openPageInNewTab();\">Open in New Tab</a>\n                <button type=\"button\" class=\"inline-flex items-center space-x-2 text-slate-600 hover:text-slate-900\" data-cc=\"show-preferencesModal\">\n                    <img src=\"/static/img/privacyoptions.svg\" alt=\"Privacy Icon\" class=\"w-5 h-5\">\n                    <span class=\"text-sm font-medium\">Do Not Share My Personal Information</span>\n                </button>\n            </div>\n            <button class=\"collapse-btn navbar-toggle-btn md:hidden\" onclick=\"toggleSidebar()\">\n                <i class=\"fas fa-bars\"></i>\n            </button>\n        </nav>\n        <div class=\"content-wrapper\">\n            <iframe src=\"/panel/overview\" id=\"content-frame\" frameborder=\"0\" scrolling=\"auto\" style=\"width: 100%; height: calc(100vh - 60px);\" allowfullscreen onload=\"hideLoadingSpinner()\"></iframe>\n        </div>\n    </div>\n\n    <script>\n        function toggleSidebar() {\n            const sidebar = document.querySelector('.sidebar');\n            const overlay = document.querySelector('.overlay');\n            const isMobile = window.innerWidth <= 768;\n\n            if (isMobile) {\n                sidebar.classList.toggle('visible');\n                overlay.classList.toggle('visible');\n            } else {\n                sidebar.classList.toggle('collapsed');\n                const mainContent = document.querySelector('.main-content');\n                mainContent.classList.toggle('expanded');\n            }\n        }\n\n        function loadPage(link, url) {\n\n            const navLinks = document.querySelectorAll('.sidebar a');\n            navLinks.forEach(navLink => navLink.classList.remove('active'));\n            link.classList.add('active');\n\n\n            const contentFrame = document.getElementById('content-frame');\n            showLoadingSpinner();\n            contentFrame.src = url;\n\n\n            history.pushState({ url: url }, '', '?page=' + encodeURIComponent(url));\n\n\n            if (window.innerWidth <= 768) {\n                const sidebar = document.querySelector('.sidebar');\n                const overlay = document.querySelector('.overlay');\n                sidebar.classList.remove('visible');\n                overlay.classList.remove('visible');\n            }\n        }\n\n\n        function showLoadingSpinner() {\n            document.getElementById('loading-spinner').style.display = 'block';\n            const bar = document.getElementById('loading-bar');\n            bar.style.width = '0%';\n            setTimeout(() => {\n                bar.style.width = '80%';\n            }, 50);\n        }\n\n        function hideLoadingSpinner() {\n            document.getElementById('loading-spinner').style.display = 'none';\n            const bar = document.getElementById('loading-bar');\n            bar.style.width = '100%';\n            setTimeout(() => {\n                bar.style.width = '0%';\n            }, 500);\n        }\n\n        function openPageInNewTab() {\n            const iframeUrl = document.getElementById('content-frame').src;\n            window.open(iframeUrl);\n        }\n\n        function toggleFullscreen() {\n            const iframe = document.getElementById('content-frame');\n            if (iframe.requestFullscreen) {\n                if (document.fullscreenElement) {\n                    document.exitFullscreen();\n                } else {\n                    iframe.requestFullscreen();\n                }\n            } else if (iframe.mozRequestFullScreen) {\n                if (document.mozFullScreenElement) {\n                    document.mozCancelFullScreen();\n                } else {\n                    iframe.mozRequestFullScreen();\n                }\n            } else if (iframe.webkitRequestFullscreen) {\n                if (document.webkitFullscreenElement) {\n                    document.webkitExitFullscreen();\n                } else {\n                    iframe.webkitRequestFullscreen();\n                }\n            } else if (iframe.msRequestFullscreen) {\n                if (document.msFullscreenElement) {\n                    document.msExitFullscreen();\n                } else {\n                    iframe.msRequestFullscreen();\n                }\n            }\n        }\n\n        document.addEventListener('DOMContentLoaded', function () {\n            const contentFrame = document.getElementById('content-frame');\n            const params = new URLSearchParams(window.location.search);\n            const initialPage = params.get('page') || '/panel/overview';\n\n            showLoadingSpinner();\n            contentFrame.src = initialPage;\n\n            contentFrame.addEventListener('load', function () {\n                hideLoadingSpinner();\n            });\n        });\n\n        window.addEventListener('popstate', function (event) {\n            const url = (event.state && event.state.url) || new URLSearchParams(window.location.search).get('page');\n            if (url) {\n                const contentFrame = document.getElementById('content-frame');\n                showLoadingSpinner();\n                contentFrame.src = url;\n            }\n        });\n\n\n    let lastIframePath = null;\n\n    function pollIframeURL() {\n        const iframe = document.getElementById('content-frame');\n\n        try {\n            const currentPath = iframe.contentWindow.location.pathname;\n\n            if (currentPath !== lastIframePath) {\n                lastIframePath = currentPath;\n\n                history.pushState({ url: currentPath }, '', '?page=' + encodeURIComponent(currentPath));\n            }\n        } catch (err) {\n            console.warn('Cannot access iframe URL due to cross-origin:', err);\n        }\n    }\n\n    setInterval(pollIframeURL, 5000);\n\n    </script>\n<!--Start of Tawk.to Script-->\n<script type=\"text/javascript\">\n    var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();\n    (function(){\n    var s1=document.createElement(\"script\"),s0=document.getElementsByTagName(\"script\")[0];\n    s1.async=true;\n    s1.src='https://embed.tawk.to/685fdc4c056789190faddab3/1iur792r9';\n    s1.charset='UTF-8';\n    s1.setAttribute('crossorigin','*');\n    s0.parentNode.insertBefore(s1,s0);\n    })();\n    </script>\n<!--End of Tawk.to Script-->\n</body>"
  },
  {
    "path": "opensource/frontend/partials/modern_styles.html",
    "content": "<link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\" rel=\"stylesheet\">\n<style>\n  :root {\n    color-scheme: light;\n  }\n  body {\n    font-family: 'Inter', sans-serif;\n    background-color: #f8fafc;\n    color: #0f172a;\n  }\n  .page-shell {\n    min-height: 100vh;\n    display: flex;\n    flex-direction: column;\n  }\n  .page-header {\n    background: #ffffff;\n    border-bottom: 1px solid #e2e8f0;\n    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);\n  }\n  .brand-mark {\n    width: 48px;\n    height: 48px;\n    border-radius: 16px;\n    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);\n    object-fit: cover;\n  }\n  .card {\n    background: #ffffff;\n    border-radius: 24px;\n    border: 1px solid #e2e8f0;\n    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);\n  }\n  .card-muted {\n    background: #f8fafc;\n    border-radius: 20px;\n    border: 1px solid #e2e8f0;\n  }\n  .input-field {\n    width: 100%;\n    border-radius: 12px;\n    border: 1px solid #e2e8f0;\n    padding: 0.65rem 0.9rem;\n    font-size: 0.95rem;\n    color: #0f172a;\n    background-color: #ffffff;\n  }\n  .input-field:focus {\n    outline: none;\n    border-color: #94a3b8;\n    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);\n  }\n  .btn-primary {\n    background-color: #0f172a;\n    color: #ffffff;\n    border-radius: 12px;\n    padding: 0.65rem 1.4rem;\n    font-weight: 600;\n    transition: transform 0.2s ease, box-shadow 0.2s ease;\n    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);\n  }\n  .btn-primary:hover {\n    transform: translateY(-1px);\n    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.24);\n  }\n  .btn-outline {\n    border: 1px solid #cbd5e1;\n    color: #1e293b;\n    background: #ffffff;\n    border-radius: 12px;\n    padding: 0.6rem 1.3rem;\n    font-weight: 600;\n    transition: all 0.2s ease;\n  }\n  .btn-outline:hover {\n    border-color: #94a3b8;\n    background: #f8fafc;\n  }\n  .btn-soft {\n    background: #e2e8f0;\n    color: #0f172a;\n    border-radius: 12px;\n    padding: 0.6rem 1.3rem;\n    font-weight: 600;\n    transition: all 0.2s ease;\n  }\n  .btn-soft:hover {\n    background: #cbd5f5;\n  }\n  .badge {\n    display: inline-flex;\n    align-items: center;\n    padding: 0.2rem 0.65rem;\n    border-radius: 9999px;\n    font-size: 0.75rem;\n    font-weight: 600;\n  }\n</style>\n"
  },
  {
    "path": "opensource/frontend/pay_success.html",
    "content": "<!doctype html>\n<html>\n<head>\n    <!-- Fonts -->\n    <link rel=\"stylesheet\" href=\"/static/css/font.css\">\n    <meta charset=\"utf-8\" name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <link href=\"/static/css/bootstrap.min.css\" rel=\"stylesheet\">\n    <style>\n      .checkout-container {\n        max-width: 1000px;\n        margin: 10% auto;\n        padding: 30px;\n        background-color: #ffffff;\n        border-radius: 5px;\n        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n      }\n      .container {\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        height: 300px;\n      }\n      .container img {\n        opacity: 0;\n        transition: opacity 0.5s;\n      }\n      .container img.show {\n        opacity: 1;\n      }\n      @keyframes fadeIn {\n        from {\n          opacity: 0;\n        }\n        to {\n          opacity: 1;\n        }\n      }\n      .image-animation {\n        animation: fadeIn 1s ease-in-out;\n      }\n    </style>\n    <meta charset=\"utf-8\">\n    <title>Successful purchase!</title>\n</head>\n<body>\n  <div class=\"checkout-container\">\n    <nav class=\"navbar navbar-light bg-light\">\n      <div class=\"container-fluid\">\n        <span class=\"navbar-brand mb-0 h1\">Successful purchase!</span>\n      </div>\n    </nav>\n    <div class=\"p-5 mb-4 bg-light rounded-3\">\n      <div class=\"container-fluid py-5\">\n        <h1 class=\"display-5 fw-bold\"><font style=\"vertical-align: inherit;\"><font style=\"vertical-align: inherit;\">Thanks!</font></font></h1>\n        <p class=\"col-md-8 fs-4\"><font style=\"vertical-align: inherit;\"><font style=\"vertical-align: inherit;\"></font><font style=\"vertical-align: inherit;\">Your domain name has been successfully created and submitted to the root DNS. Kindly allow up to 20 minutes or longer for the domain name resolution record and registration to take effect.</font></font></p>\n      </div>\n    </div>\n    <div class=\"alert alert-light\" role=\"alert\">\n      <div class=\"container\">\n        <img id=\"image\" src=\"/static/img/completed.png\" alt=\"completed\" width=\"200\" height=\"200\" class=\"image-animation\">\n      </div>\n      <h3>The domain name will be added to your list, and you'll have full control to manage and operate it.</h3>\n    </div>\n    <button class=\"btn btn-primary\" onclick=\"window.location.href='/panel/overview'\">Back to panel</button>\n    <footer>\n      <div class=\"alert alert-light\" role=\"alert\">\n        <br>\n        If you encounter any problems, please create a new issue: <a href=\"https://github.com/DigitalPlatDev/US.KG-Issues/issues/new/choose\">Issue Report</a><br>\n        <br>\n        DigitalPlat Foundation\n      </div>\n    </footer>\n  </div>\n  <script src=\"/static/js/bootstrap.bundle.js\"></script>\n  <script>\n    window.addEventListener('DOMContentLoaded', function() {\n      var image = document.getElementById('image');\n      image.classList.add('show');\n    });\n  </script>\n        <script>\n          window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };\n      </script>\n      <script defer src=\"/_vercel/insights/script.js\"></script>\n      <script>\n          window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };\n      </script>\n      <script defer src=\"/_vercel/speed-insights/script.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/register.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>DigitalPlat FreeDomain - Register</title>\n<link rel=\"icon\" type=\"image/jpeg\" href=\"/static/img/logo.jpg\">\n{% include \"ga.html\" %}\n<script src=\"https://cdn.tailwindcss.com\"></script>\n{% include \"partials/modern_styles.html\" %}\n<script src=\"https://challenges.cloudflare.com/turnstile/v0/api.js?compat=recaptcha\" async defer></script>\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n<div class=\"page-shell\">\n    <header class=\"page-header\">\n        <div class=\"max-w-4xl mx-auto px-6 py-6 flex items-center gap-4\">\n            <img src=\"/static/img/logo.jpg\" alt=\"DigitalPlat Logo\" class=\"brand-mark\">\n            <div>\n                <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">Create an account</p>\n                <h1 class=\"text-2xl font-semibold\">DigitalPlat Domain Registry</h1>\n                <p class=\"text-sm text-slate-500\">Register once and manage all your free domains.</p>\n            </div>\n        </div>\n    </header>\n\n    <main class=\"flex-1\">\n        <div class=\"max-w-2xl mx-auto px-6 py-10\">\n            <div class=\"card p-8 space-y-8\">\n                <div>\n                    <h2 class=\"text-xl font-semibold text-slate-900\">Create your free domain account</h2>\n                    <p class=\"text-sm text-slate-500 mt-2\">Please ensure all information is genuine. Only one account per person or organization.</p>\n                </div>\n\n                <form id=\"registerForm\" action=\"/auth/register\" method=\"POST\" class=\"space-y-6\">\n                    <div class=\"grid gap-5\">\n                        <div>\n                            <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Username</label>\n                            <input type=\"text\" name=\"username\" id=\"username\" placeholder=\"Username\" required class=\"input-field\">\n                            <small id=\"usernameError\" class=\"text-red-500\"></small>\n                        </div>\n\n                        <div>\n                            <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Full Name</label>\n                            <p class=\"text-xs text-slate-500 mb-2\">Your full legal name, you can't edit after registration.</p>\n                            <input type=\"text\" name=\"fullname\" id=\"fullname\" placeholder=\"Your Name\" required class=\"input-field\">\n                            <small id=\"fullnameError\" class=\"text-red-500\"></small>\n                        </div>\n\n                        <div>\n                            <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Email</label>\n                            <input type=\"email\" name=\"email\" id=\"email\" placeholder=\"example@nic.us.kg\" required class=\"input-field\">\n                            <small id=\"emailError\" class=\"text-red-500\"></small>\n                        </div>\n\n                        <div>\n                            <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Phone</label>\n                            <p class=\"text-xs text-slate-500 mb-2\">Format: +1-3100000000</p>\n                            <input type=\"text\" name=\"phone\" id=\"phone\" placeholder=\"+X-XXXXXXXXXX\" required class=\"input-field\">\n                            <small id=\"phoneError\" class=\"text-red-500\"></small>\n                        </div>\n\n                        <div>\n                            <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Full Address</label>\n                            <textarea name=\"address\" id=\"address\" placeholder=\"1000 Santa Monica Blvd, Santa Monica, CA 90401\" required class=\"input-field\"></textarea>\n                            <small id=\"addressError\" class=\"text-red-500\"></small>\n                        </div>\n\n                        <div>\n                            <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Password</label>\n                            <input type=\"password\" name=\"password\" id=\"password\" placeholder=\"Password\" required class=\"input-field\">\n                            <small id=\"passwordHelp\" class=\"text-slate-500 block mt-2\"></small>\n                        </div>\n\n                        <div>\n                            <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Confirm Password</label>\n                            <input type=\"password\" name=\"confirmPassword\" id=\"confirmPassword\" placeholder=\"Confirm Password\" required class=\"input-field\">\n                            <small id=\"confirmPasswordError\" class=\"text-red-500\"></small>\n                        </div>\n                    </div>\n\n                    <div class=\"g-recaptcha mb-2\" data-sitekey=\"{{ sitekey }}\"></div>\n\n                    <button type=\"submit\" id=\"registerButton\" class=\"btn-primary w-full disabled:opacity-50 disabled:cursor-not-allowed\" disabled>Register</button>\n                </form>\n            </div>\n        </div>\n    </main>\n\n    <footer class=\"text-center text-sm text-slate-400 py-8\">\n        By continuing you agree to our\n        <a href=\"https://domain.digitalplat.org/terms-of-service/\" class=\"text-slate-600 hover:text-slate-900\">Terms of Service</a>,\n        <a href=\"https://domain.digitalplat.org/privacy-policy/\" class=\"text-slate-600 hover:text-slate-900\">Privacy Policy</a>, and\n        <a href=\"https://domain.digitalplat.org/acceptable-use-policy/\" class=\"text-slate-600 hover:text-slate-900\">Acceptable Use Policy</a>.\n        <br>\n        Problems? <a href=\"https://github.com/DigitalPlatDev/US.KG-Issues/issues/new/choose\" class=\"text-slate-600 hover:text-slate-900\">Submit an issue</a>.\n    </footer>\n</div>\n    <script>\n        document.addEventListener('DOMContentLoaded', function () {\n            const usernameInput = document.getElementById('username');\n            const fullnameInput = document.getElementById('fullname');\n            const emailInput = document.getElementById('email');\n            const phoneInput = document.getElementById('phone');\n            const addressInput = document.getElementById('address');\n            const passwordInput = document.getElementById('password');\n            const confirmPasswordInput = document.getElementById('confirmPassword');\n            const registerButton = document.getElementById('registerButton');\n\n            usernameInput.addEventListener('input', validateForm);\n            fullnameInput.addEventListener('input', validateForm);\n            emailInput.addEventListener('input', validateForm);\n            phoneInput.addEventListener('input', validateForm);\n            addressInput.addEventListener('input', validateForm);\n            passwordInput.addEventListener('input', validateForm);\n            confirmPasswordInput.addEventListener('input', validateForm);\n\n            function validateForm() {\n                let isValid = true;\n\n                // Validate Username\n                if (usernameInput.value.length < 5) {\n                    document.getElementById('usernameError').innerText = 'Username must be at least 5 characters long.';\n                    isValid = false;\n                } else if (usernameInput.value.length > 50) {\n                    document.getElementById('usernameError').innerText = 'Username is too long.';\n                    isValid = false;\n                } else if (/\\s/.test(usernameInput.value)) {\n                    document.getElementById('usernameError').innerText = 'Username must not contain spaces.';\n                    isValid = false;\n                } else {\n                    document.getElementById('usernameError').innerText = '';\n                }\n\n                // Validate Legal Full Name\n                if (!fullnameInput.value.includes(' ')) {\n                    document.getElementById('fullnameError').innerText = 'Legal full name must contain at least one space.';\n                    isValid = false;\n                } else if (fullnameInput.value.length > 50) {\n                    document.getElementById('fullnameError').innerText = 'Full name is too long.';\n                    isValid = false;\n                } else {\n                    document.getElementById('fullnameError').innerText = '';\n                }\n\n                // Validate Email\n                if (emailInput.value.length > 50) {\n                    document.getElementById('emailError').innerText = 'Email is too long.';\n                    isValid = false;\n                } else {\n                    document.getElementById('emailError').innerText = '';\n                }\n\n\n                // Validate Phone Number\n                const phoneRegex = /^\\+\\d{1,3}-\\d{4,}$/;\n                if (!phoneRegex.test(phoneInput.value)) {\n                    document.getElementById('phoneError').innerText = 'Phone number must be in the format +1-8559805959 and contain at least 4 digits.';\n                    isValid = false;\n                } else if (phoneInput.value.length > 50) {\n                    document.getElementById('phoneError').innerText = 'Phone number is too long.';\n                    isValid = false;\n                } else {\n                    document.getElementById('phoneError').innerText = '';\n                }\n\n                // Validate Address\n                const addressRegex = /^[A-Za-z0-9\\s,]*$/;\n                if (addressInput.value.length < 20 || (addressInput.value.match(/,/g) || []).length < 2 || !addressRegex.test(addressInput.value)) {\n                    document.getElementById('addressError').innerText = 'Address must be at least 20 characters long, contain at least 2 commas, and only contain English characters.';\n                    isValid = false;\n                } else if (addressInput.value.length > 200) {\n                    document.getElementById('addressError').innerText = 'Address is too long.';\n                    isValid = false;\n                } else {\n                    document.getElementById('addressError').innerText = '';\n                }\n\n                // Validate Password\n                const passwordRequirements = [\n                    { regex: /.{8,}/, message: 'at least 8 characters long' },\n                    { regex: /[A-Z]/, message: 'an uppercase letter' },\n                    { regex: /[a-z]/, message: 'a lowercase letter' },\n                    { regex: /\\d/, message: 'a number' },\n                    { regex: /^[^\\&\\*''\\\"<>\\\\/\\s]*$/, message: 'must not include &, *, \\' , \", <, >, \\\\, /, or spaces' }\n                ];\n                const unmetRequirements = passwordRequirements.filter(req => !req.regex.test(passwordInput.value));\n                if (unmetRequirements.length === 0) {\n                    document.getElementById('passwordHelp').innerHTML = '<span class=\"text-emerald-500\">Password meets all requirements</span>';\n                } else {\n                    const messages = unmetRequirements.map(req => req.message).join(', ');\n                    document.getElementById('passwordHelp').innerHTML = `<span class=\"text-red-500\">Password ${messages}</span>`;\n                    isValid = false;\n                }\n\n                if (passwordInput.value.length > 128) {\n                    document.getElementById('passwordHelp').innerHTML = '<span class=\"text-red-500\">Password is too long.</span>';\n                    isValid = false;\n                }\n\n                // Validate Confirm Password\n                if (confirmPasswordInput.value !== passwordInput.value) {\n                    document.getElementById('confirmPasswordError').innerText = 'Passwords do not match.';\n                    isValid = false;\n                } else {\n                    document.getElementById('confirmPasswordError').innerText = '';\n                }\n\n                registerButton.disabled = !isValid;\n            }\n        });\n    </script>\n    <script async src=\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8599203929590914\" crossorigin=\"anonymous\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/reset_password.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>DigitalPlat Domain Password Reset</title>\n    {% include \"ga.html\" %}\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n    {% include \"partials/modern_styles.html\" %}\n    <script src=\"https://challenges.cloudflare.com/turnstile/v0/api.js?compat=recaptcha\" async defer></script>\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n<div class=\"page-shell\">\n    <main class=\"flex-1 flex items-center justify-center px-6 py-10\">\n        <div class=\"w-full max-w-md card p-8 space-y-6\">\n            <div class=\"flex items-center space-x-4\">\n                <img src=\"/static/img/logo.jpg\" alt=\"Logo\" class=\"brand-mark\">\n                <div>\n                    <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">Account recovery</p>\n                    <h1 class=\"text-xl font-semibold text-slate-900\">Reset password</h1>\n                </div>\n            </div>\n\n            <form action=\"/auth/reset-password\" method=\"POST\" class=\"space-y-6\">\n                <div>\n                    <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">E-Mail</label>\n                    <input type=\"email\" name=\"email\" required class=\"input-field\" placeholder=\"Enter your email\">\n                </div>\n\n                <div>\n                    <label class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">New Password</label>\n                    <input type=\"password\" name=\"new_password\" id=\"new_password\" required autocomplete=\"off\" class=\"input-field\" placeholder=\"Enter your new password\">\n                    <p id=\"passwordHelp\" class=\"text-xs text-slate-500 mt-2\">Password must be at least 8 characters and contain uppercase, lowercase and a number.</p>\n                </div>\n\n                <div class=\"g-recaptcha mb-4\" data-sitekey=\"{{ sitekey }}\"></div>\n\n                <button type=\"submit\" id=\"resetButton\" disabled class=\"btn-primary w-full disabled:opacity-50\">Reset Password</button>\n\n                <div class=\"text-center text-sm text-slate-500\">\n                    <p>Don't have an account? <a href=\"/auth/register\" class=\"text-slate-900 font-medium hover:underline\">Sign up</a></p>\n                </div>\n            </form>\n\n            <footer class=\"text-center text-xs text-slate-400 pt-4 border-t border-slate-200\">\n                <p>By continuing you agree to our\n                <a href=\"https://nic.us.kg/terms-of-service/\" class=\"text-slate-600 hover:text-slate-900\">Terms</a>,\n                <a href=\"https://nic.us.kg/privacy-policy/\" class=\"text-slate-600 hover:text-slate-900\">Privacy</a>, and\n                <a href=\"https://nic.us.kg/acceptable-use-policy/\" class=\"text-slate-600 hover:text-slate-900\">AUP</a>.</p>\n                <p>Problems? <a href=\"https://github.com/DigitalPlatDev/US.KG-Issues/issues/new/choose\" class=\"text-slate-600 hover:text-slate-900\">Report here</a></p>\n            </footer>\n        </div>\n    </main>\n</div>\n\n<script>\ndocument.addEventListener('DOMContentLoaded', function () {\n    const passwordInput = document.getElementById('new_password');\n    const resetButton = document.getElementById('resetButton');\n    const passwordHelp = document.getElementById('passwordHelp');\n\n    passwordInput.addEventListener('input', validatePassword);\n\n    function validatePassword() {\n        let isValid = true;\n        const password = passwordInput.value;\n        const requirements = [\n            { regex: /.{8,}/, message: 'at least 8 characters' },\n            { regex: /[A-Z]/, message: 'an uppercase letter' },\n            { regex: /[a-z]/, message: 'a lowercase letter' },\n            { regex: /\\d/, message: 'a number' }\n        ];\n\n        const failed = requirements.filter(r => !r.regex.test(password));\n        if (password.length > 128) {\n            passwordHelp.innerHTML = '<span class=\"text-red-500\">Password is too long.</span>';\n            isValid = false;\n        } else if (failed.length === 0) {\n            passwordHelp.innerHTML = '<span class=\"text-emerald-500\">Password meets all requirements.</span>';\n        } else {\n            passwordHelp.innerHTML = '<span class=\"text-red-500\">Must include: ' + failed.map(r => r.message).join(', ') + '.</span>';\n            isValid = false;\n        }\n\n        resetButton.disabled = !isValid;\n    }\n});\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/success.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Success - DigitalPlat</title>\n  {% include \"ga.html\" %}\n  <script src=\"https://cdn.tailwindcss.com\"></script>\n  {% include \"partials/modern_styles.html\" %}\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n  <div class=\"page-shell\">\n    <main class=\"flex-1 flex items-center justify-center px-6 py-12\">\n      <div class=\"card max-w-2xl w-full p-8 text-center space-y-4\">\n        <div class=\"mx-auto text-emerald-500\">\n          <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"h-16 w-16 mx-auto\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n            <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 13l4 4L19 7\" />\n          </svg>\n        </div>\n        <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">Success</p>\n        <h1 class=\"text-2xl font-semibold text-emerald-600\">Success!</h1>\n        <p class=\"text-slate-600\">{{info}}</p>\n        <div>\n          <a class=\"btn-primary inline-flex\" href=\"javascript:history.back()\">Go Back</a>\n        </div>\n      </div>\n    </main>\n  </div>\n\n  <script src=\"https://cdn.jsdelivr.net/npm/tsparticles-preset-fountain@2/tsparticles.preset.fountain.bundle.min.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/usermgr.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>US.KG Account Management System</title>\n    {% include \"ga.html\" %}\n    <script src=\"https://cdn.tailwindcss.com\"></script>\n    {% include \"partials/modern_styles.html\" %}\n    <script src=\"https://www.recaptcha.net/recaptcha/api.js\" async defer></script>\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n    <div class=\"page-shell\">\n        <header class=\"page-header\">\n            <div class=\"max-w-4xl mx-auto px-6 py-6\">\n                <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">Account settings</p>\n                <h1 class=\"text-2xl font-semibold\">Manage your profile</h1>\n                <p class=\"text-sm text-slate-500 mt-2\">Review and update your account details.</p>\n            </div>\n        </header>\n\n        <main class=\"flex-1\">\n            <div class=\"max-w-3xl mx-auto px-6 py-10 space-y-6\">\n                <div class=\"card p-6\">\n                    <h2 class=\"text-lg font-semibold\">Current account details</h2>\n                    <dl class=\"mt-4 space-y-3 text-sm text-slate-600\">\n                        <div>\n                            <dt class=\"text-slate-400 uppercase tracking-wide text-xs\">Full name</dt>\n                            <dd class=\"text-slate-700\">{{fullname}}</dd>\n                        </div>\n                        <div>\n                            <dt class=\"text-slate-400 uppercase tracking-wide text-xs\">Username</dt>\n                            <dd class=\"text-slate-700\">{{username}}</dd>\n                        </div>\n                        <div>\n                            <dt class=\"text-slate-400 uppercase tracking-wide text-xs\">E-mail</dt>\n                            <dd class=\"text-slate-700\">{{email}}</dd>\n                        </div>\n                        <div>\n                            <dt class=\"text-slate-400 uppercase tracking-wide text-xs\">Phone</dt>\n                            <dd class=\"text-slate-700\">{{phone}}</dd>\n                        </div>\n                        <div>\n                            <dt class=\"text-slate-400 uppercase tracking-wide text-xs\">Address</dt>\n                            <dd class=\"text-slate-700\">{{address}}</dd>\n                        </div>\n                    </dl>\n                </div>\n\n                <div class=\"card p-6\">\n                    <h2 class=\"text-lg font-semibold\">Update account</h2>\n                    <p class=\"text-sm text-slate-500 mt-1\">Some fields are locked for security reasons.</p>\n\n                    <form id=\"userEditForm\" action=\"/auth/user/edit\" method=\"POST\" class=\"mt-6 space-y-5\">\n                        <div>\n                            <label for=\"username\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Username</label>\n                            <input type=\"text\" name=\"username\" class=\"input-field\" id=\"username\" placeholder=\"Username\" value=\"{{username}}\" required disabled>\n                            <small id=\"usernameError\" class=\"text-red-500\"></small>\n                        </div>\n                        <div>\n                            <label for=\"fullname\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Legal full name</label>\n                            <input type=\"text\" name=\"fullname\" class=\"input-field\" id=\"fullname\" placeholder=\"Michael Johnson\" value=\"{{fullname}}\" required disabled>\n                            <small id=\"fullnameError\" class=\"text-red-500\"></small>\n                        </div>\n                        <div>\n                            <label for=\"email\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">E-Mail</label>\n                            <p class=\"text-xs text-slate-500 mb-2\">Using a temporary email may result in the suspension of your account.</p>\n                            <input type=\"email\" name=\"email\" class=\"input-field\" id=\"email\" placeholder=\"example@nic.us.kg\" value=\"{{email}}\" required>\n                        </div>\n                        <div>\n                            <label for=\"phone\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Phone (format: +1-8559805959)</label>\n                            <input type=\"text\" name=\"phone\" class=\"input-field\" id=\"phone\" placeholder=\"+1-8559805959\" value=\"{{phone}}\" required>\n                            <small id=\"phoneError\" class=\"text-red-500\"></small>\n                        </div>\n                        <div>\n                            <label for=\"address\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Full Address</label>\n                            <textarea id=\"address\" name=\"address\" class=\"input-field\" placeholder=\"1000 Santa Monica Blvd, Santa Monica, CA 90401, United States\" required>{{address}}</textarea>\n                            <small id=\"addressError\" class=\"text-red-500\"></small>\n                        </div>\n                        <div>\n                            <label for=\"password\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Password</label>\n                            <input type=\"password\" name=\"password\" class=\"input-field\" id=\"password\" placeholder=\"Password\" autocomplete=\"off\" required>\n                            <small id=\"passwordHelp\" class=\"text-xs text-slate-500\">The password must be more than 8 characters long and include uppercase and lowercase letters as well as numbers.</small>\n                        </div>\n                        <div class=\"flex justify-end\">\n                            <button type=\"submit\" class=\"btn-primary\" id=\"updateButton\" disabled>Update</button>\n                        </div>\n                    </form>\n                </div>\n            </div>\n        </main>\n    </div>\n    <script>\n        document.addEventListener('DOMContentLoaded', function () {\n            const usernameInput = document.getElementById('username');\n            const fullnameInput = document.getElementById('fullname');\n            const phoneInput = document.getElementById('phone');\n            const addressInput = document.getElementById('address');\n            const passwordInput = document.getElementById('password');\n            const updateButton = document.getElementById('updateButton');\n\n            usernameInput.addEventListener('input', validateForm);\n            fullnameInput.addEventListener('input', validateForm);\n            phoneInput.addEventListener('input', validateForm);\n            addressInput.addEventListener('input', validateForm);\n            passwordInput.addEventListener('input', validateForm);\n\n            function validateForm() {\n                let isValid = true;\n\n                // Validate Username\n                if (usernameInput.value.length < 5) {\n                    document.getElementById('usernameError').innerText = 'Username must be at least 5 characters long.';\n                    isValid = false;\n                } else {\n                    document.getElementById('usernameError').innerText = '';\n                }\n\n                // Validate Legal Full Name\n                if (!fullnameInput.value.includes(' ')) {\n                    document.getElementById('fullnameError').innerText = 'Legal full name must contain at least one space.';\n                    isValid = false;\n                } else {\n                    document.getElementById('fullnameError').innerText = '';\n                }\n\n                // Validate Phone Number\n                const phoneRegex = /^\\+\\d{1,3}-\\d{4,}$/;\n                if (!phoneRegex.test(phoneInput.value)) {\n                    document.getElementById('phoneError').innerText = 'Phone number must be in the format +1-8559805959 and contain at least 4 digits.';\n                    isValid = false;\n                } else {\n                    document.getElementById('phoneError').innerText = '';\n                }\n\n                // Validate Address\n                const addressRegex = /^[A-Za-z0-9\\s,]*$/;\n                if (addressInput.value.length < 20 || (addressInput.value.match(/,/g) || []).length < 2 || !addressRegex.test(addressInput.value)) {\n                    document.getElementById('addressError').innerText = 'Address must be at least 20 characters long, contain at least 2 commas, and only contain English characters.';\n                    isValid = false;\n                } else {\n                    document.getElementById('addressError').innerText = '';\n                }\n\n                // Validate Password\n                const passwordRequirements = [\n                    { regex: /.{8,}/, message: 'at least 8 characters long' },\n                    { regex: /[A-Z]/, message: 'an uppercase letter' },\n                    { regex: /[a-z]/, message: 'a lowercase letter' },\n                    { regex: /\\d/, message: 'a number' }\n                ];\n                const unmetRequirements = passwordRequirements.filter(req => !req.regex.test(passwordInput.value));\n                if (unmetRequirements.length === 0) {\n                    document.getElementById('passwordHelp').innerHTML = '<span class=\"text-emerald-500\">Password meets all requirements</span>';\n                } else {\n                    const messages = unmetRequirements.map(req => req.message).join(', ');\n                    document.getElementById('passwordHelp').innerHTML = `<span class=\"text-red-500\">Password must include: ${messages}</span>`;\n                    isValid = false;\n                }\n\n                updateButton.disabled = !isValid;\n            }\n        });\n    </script>\n    <script>\n        window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };\n    </script>\n    <script defer src=\"/_vercel/insights/script.js\"></script>\n    <script>\n        window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };\n    </script>\n    <script defer src=\"/_vercel/speed-insights/script.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/frontend/whois.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>DigitalPlat FreeDomain WHOIS Lookup</title>\n{% include \"ga.html\" %}\n<script src=\"https://cdn.tailwindcss.com\"></script>\n{% include \"partials/modern_styles.html\" %}\n</head>\n<body class=\"bg-slate-50 text-slate-900\">\n<div class=\"page-shell\">\n    <header class=\"page-header\">\n        <div class=\"max-w-4xl mx-auto px-6 py-6\">\n            <p class=\"text-xs uppercase tracking-[0.3em] text-slate-400\">WHOIS tools</p>\n            <h1 class=\"text-2xl font-semibold\">WHOIS Lookup</h1>\n            <p class=\"text-sm text-slate-500 mt-2\">Search for domain ownership and registration details.</p>\n        </div>\n    </header>\n\n    <main class=\"flex-1\">\n        <div class=\"max-w-3xl mx-auto px-6 py-10 space-y-6\">\n            <div class=\"card p-6\">\n                <form action=\"/whois\" method=\"GET\" class=\"space-y-5\">\n                    <div>\n                        <label for=\"name\" class=\"block text-xs uppercase tracking-wide text-slate-400 mb-2\">Domain Name</label>\n                        <input type=\"text\" id=\"name\" name=\"name\" placeholder=\"example.us.kg, foo.dpdns.org...\" class=\"input-field\" required>\n                    </div>\n\n                    <div class=\"flex justify-end\">\n                        <button type=\"submit\" class=\"btn-primary\">Lookup</button>\n                    </div>\n                </form>\n            </div>\n\n            <div class=\"card p-6\">\n                <h2 class=\"text-lg font-semibold mb-3\">Query WHOIS via Command Line (CLI)</h2>\n                <p class=\"text-slate-600\">\n                    Although US.KG follows the RFC 2782 WHOIS server lookup standard, many clients may not yet support it.\n                    Queries like <code class=\"rounded bg-slate-100 px-2 py-1 text-sm\">whois example.us.kg</code> may not work directly.\n                </p>\n                <p class=\"text-slate-600 mt-3\">\n                    Until mainstream WHOIS clients support this, please manually specify the WHOIS server. For RFC 1036 clients, use the <code class=\"rounded bg-slate-100 px-2 py-1 text-sm\">-h</code> flag like this:\n                </p>\n                <p class=\"bg-slate-100 text-slate-800 px-3 py-2 rounded-xl mt-3 font-mono text-sm\">\n                    whois -h whois.digitalplat.org \"domainname\"\n                </p>\n            </div>\n        </div>\n    </main>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "opensource/readme.md",
    "content": "# DigitalPlat FreeDomain Open Source\nThis folder contains selected parts of our front-end and back-end code that are currently open-sourced.\n\nDigitalPlat is a nonprofit organization dedicated to supporting open-source and free software. We strongly believe in transparency and community collaboration. However, due to limited engineering resources and the lack of comprehensive security audits, our back-end codebase has not yet been fully open-sourced.\n\nAt the current stage, fully opening the back-end without sufficient review and maintenance capacity could introduce avoidable security risks. For this reason, we are taking a cautious, phased approach to open-sourcing, prioritizing safety and long-term sustainability.\n\nWe plan to gradually open-source more components as audits are completed and additional engineering capacity becomes available. The files in this folder represent the portions of the project that are safe and ready for public release at this time.\n\nDigitalPlat Domain Home Website front-end open-source code is available at:\n https://github.com/DigitalPlatDev/digitalplat-domain-website\n\n"
  },
  {
    "path": "opensource/static/config/cookieconsent-config.js",
    "content": "import 'https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@3.1.0/dist/cookieconsent.umd.js';\n\nCookieConsent.run({\n    guiOptions: {\n        consentModal: {\n            layout: \"bar inline\",\n            position: \"bottom\",\n            equalWeightButtons: true,\n            flipButtons: false\n        },\n        preferencesModal: {\n            layout: \"bar\",\n            position: \"left\",\n            equalWeightButtons: true,\n            flipButtons: false\n        }\n    },\n    categories: {\n        necessary: {\n            readOnly: true\n        },\n        functionality: {},\n        analytics: {}\n    },\n    language: {\n        default: \"en\",\n        translations: {\n            en: {\n                consentModal: {\n                    title: \"We value your privacy\",\n                    description: \"We use cookies to provide essential website functions, enhance your browsing experience, improve our website and analyze our traffic. By clicking Accept All, you consent to our use of cookies.\",\n                    acceptAllBtn: \"Accept all\",\n                    acceptNecessaryBtn: \"Only allow necessary\",\n                    showPreferencesBtn: \"Manage preferences\",\n                    footer: \"<a href=\\\"https://digitalplat.org/privacy-policy/\\\">Privacy Policy</a> <a href=\\\"https://digitalplat.org/cookie-policy/\\\">Cookie Policy</a>\"\n                },\n                preferencesModal: {\n                    title: \"Manage Cookie Preferences\",\n                    acceptAllBtn: \"Accept all\",\n                    acceptNecessaryBtn: \"Reject all\",\n                    savePreferencesBtn: \"Save preferences\",\n                    closeIconLabel: \"Close modal\",\n                    serviceCounterLabel: \"Service|Services\",\n                    sections: [\n                        {\n                            title: \"About Cookies\",\n                            description: \"We use cookies to make our site work properly, provide essential features, personalize your experience, and gather anonymous statistics about website usage.\"\n                        },\n                        {\n                            title: \"Strictly Necessary Cookies <span class=\\\"pm__badge\\\">Always Enabled</span>\",\n                            description: \"These cookies are necessary for core functionalities such as domain registration, account login, and security. You cannot disable them.\",\n                            linkedCategory: \"necessary\"\n                        },\n                        {\n                            title: \"Functionality Cookies\",\n                            description: \"These cookies allow us to remember your preferences and enhance website functionality. Disabling them may impact your experience.\",\n                            linkedCategory: \"functionality\"\n                        },\n                        {\n                            title: \"Analytics Cookies\",\n                            description: \"Analytics cookies help us understand how visitors interact with our site, so we can improve and offer a better service. Data collected is anonymized and never shared with third parties for advertising.\",\n                            linkedCategory: \"analytics\"\n                        },\n                        {\n                            title: \"More Information\",\n                            description: \"For any inquiries about our privacy and cookie practices, please refer to our <a href=\\\"https://digitalplat.org/privacy-policy/\\\">Privacy Policy</a> or <a href=\\\"https://digitalplat.org/cookie-policy/\\\">Cookie Policy</a>.\"\n                        }\n                    ]\n                }\n            }\n        }            \n    }\n});"
  },
  {
    "path": "opensource/whois_server/readme.md",
    "content": "# WHOIS Server\nA simple and lightweight WHOIS server\n\nFor example, in an RFC 1036 client, you can query a domain name using the command `whois -h whois.us.kg \"domainname\"`, provided that `whois.us.kg` points to a WHOIS server and port 43 is open. This is just a basic code (we use this)—you’ll need to implement your own database and related functionality.\n\nIn the provided code, the `get_whois` function is used to retrieve WHOIS data as plain text from the server. You’ll need to implement this function yourself."
  },
  {
    "path": "opensource/whois_server/whois.py",
    "content": "import socket\nimport logging\n\n\nlogging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s')\n\ndef whois(query):\n    try:\n        response = get_whois(query).format(query)\n        return response\n    except Exception as e:\n        logging.error(f\"Error processing WHOIS query: {e}\")\n        return \"Internal server error\"\n\ndef main():\n    host = '0.0.0.0'\n    port = 43\n\n    server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    server_socket.bind((host, port))\n    server_socket.listen(5)\n\n    logging.info(f\"WHOIS Server Started, port: {port}\")\n\n    while True:\n        try:\n            client_socket, addr = server_socket.accept()\n            logging.info(f\"Received connection from {addr}\")\n\n            try:\n                with client_socket:\n                    client_socket.settimeout(10.0)\n                    \n                    try:\n                        data = client_socket.recv(1024).strip()\n                        try:\n                            decoded_data = data.decode('utf-8')\n                        except UnicodeDecodeError:\n                            logging.warning(f\"Received invalid UTF-8 data from {addr}: {data}\")\n                            client_socket.sendall(\"Invalid request encoding\".encode('utf-8'))\n                            continue\n\n                        logging.info(f\"Request inquiry: {decoded_data}\")\n                        \n                        if not decoded_data:\n                            logging.warning(\"Empty request received\")\n                            continue\n\n                        response = whois(decoded_data)\n                        client_socket.sendall(response.encode('utf-8'))\n\n                    except socket.timeout:\n                        logging.warning(\"Connection timed out\")\n                    except Exception as e:\n                        logging.error(f\"Unexpected error: {e}\")\n                        client_socket.sendall(\"Internal server error\".encode('utf-8'))\n\n            except Exception as e:\n                logging.error(f\"Error handling client socket: {e}\")\n\n        except Exception as e:\n            logging.error(f\"Error accepting connection: {e}\")\n\nif __name__ == \"__main__\":\n    while True:\n        try:\n            main()\n        except Exception as e:\n            logging.critical(f\"Critical error in main loop: {e}\")\n            import time\n            time.sleep(1)\n"
  }
]