Full Code of stevenjoezhang/live2d-widget for AI

master fa963c631377 cached
82 files
598.7 KB
177.1k tokens
1844 symbols
1 requests
Download .txt
Showing preview only (626K chars total). Download the full file or copy to clipboard to get everything.
Repository: stevenjoezhang/live2d-widget
Branch: master
Commit: fa963c631377
Files: 82
Total size: 598.7 KB

Directory structure:
gitextract_2gq63twy/

├── .github/
│   └── workflows/
│       ├── linter.yml
│       └── tester.yml
├── .gitignore
├── .prettierignore
├── .prettierrc.yaml
├── LICENSE
├── README.en.md
├── README.md
├── build/
│   ├── cubism2/
│   │   ├── LAppDefine.d.ts
│   │   ├── LAppDefine.js
│   │   ├── LAppLive2DManager.d.ts
│   │   ├── LAppLive2DManager.js
│   │   ├── LAppModel.d.ts
│   │   ├── LAppModel.js
│   │   ├── Live2DFramework.d.ts
│   │   ├── Live2DFramework.js
│   │   ├── PlatformManager.d.ts
│   │   ├── PlatformManager.js
│   │   ├── index.d.ts
│   │   ├── index.js
│   │   └── utils/
│   │       ├── MatrixStack.d.ts
│   │       ├── MatrixStack.js
│   │       ├── ModelSettingJson.d.ts
│   │       └── ModelSettingJson.js
│   ├── cubism5/
│   │   ├── index.d.ts
│   │   └── index.js
│   ├── drag.d.ts
│   ├── drag.js
│   ├── icons.d.ts
│   ├── icons.js
│   ├── index.d.ts
│   ├── index.js
│   ├── logger.d.ts
│   ├── logger.js
│   ├── message.d.ts
│   ├── message.js
│   ├── model.d.ts
│   ├── model.js
│   ├── tools.d.ts
│   ├── tools.js
│   ├── utils.d.ts
│   ├── utils.js
│   ├── waifu-tips.d.ts
│   ├── waifu-tips.js
│   ├── widget.d.ts
│   └── widget.js
├── demo/
│   ├── chat.html
│   ├── demo.html
│   └── login.html
├── dist/
│   ├── autoload.js
│   ├── chunk/
│   │   ├── index.js
│   │   └── index2.js
│   ├── waifu-tips.js
│   ├── waifu-tips.json
│   └── waifu.css
├── eslint.config.js
├── package.json
├── renovate.json
├── rollup.config.js
├── src/
│   ├── cubism2/
│   │   ├── LAppDefine.js
│   │   ├── LAppLive2DManager.js
│   │   ├── LAppModel.js
│   │   ├── Live2DFramework.js
│   │   ├── PlatformManager.js
│   │   ├── index.js
│   │   └── utils/
│   │       ├── MatrixStack.js
│   │       └── ModelSettingJson.js
│   ├── cubism5/
│   │   └── index.js
│   ├── drag.ts
│   ├── icons.ts
│   ├── index.ts
│   ├── logger.ts
│   ├── message.ts
│   ├── model.ts
│   ├── tools.ts
│   ├── types/
│   │   ├── index.d.ts
│   │   ├── live2dApi.d.ts
│   │   └── window.d.ts
│   ├── utils.ts
│   ├── waifu-tips.ts
│   └── widget.ts
└── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/linter.yml
================================================
name: Linter

on: [push, pull_request]

jobs:
  linter:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - name: Use Node.js
      uses: actions/setup-node@v6
    - name: Install Dependencies
      run: npm install
    - run: npm run eslint


================================================
FILE: .github/workflows/tester.yml
================================================
name: Tester

on: [push, pull_request]

jobs:
  tester:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
      fail-fast: false
    steps:
      - uses: actions/checkout@v5
        with:
          repository: hexojs/hexo-starter
      - name: Use Node.js
        uses: actions/setup-node@v6
      - name: Install Dependencies
        run: npm install
      - name: Test
        run: npm run build


================================================
FILE: .gitignore
================================================
package-lock.json
node_modules/
.DS_Store
.idea/
.vscode/
backup/
src/CubismSdkForWeb-*/
build/CubismSdkForWeb-*/


================================================
FILE: .prettierignore
================================================
node_modules
dist


================================================
FILE: .prettierrc.yaml
================================================
tabWidth: 2
semi: true
singleQuote: true
jsxSingleQuote: true
trailingComma: all
endOfLine: crlf


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: README.en.md
================================================
# Live2D Widget

![](https://forthebadge.com/images/badges/built-with-love.svg)
![](https://forthebadge.com/images/badges/made-with-typescript.svg)
![](https://forthebadge.com/images/badges/uses-css.svg)
![](https://forthebadge.com/images/badges/contains-cat-gifs.svg)
![](https://forthebadge.com/images/badges/powered-by-electricity.svg)
![](https://forthebadge.com/images/badges/makes-people-smile.svg)

[中文](README.md)

## Features

- Add Live2D widget to web page
- Lightweight, with no runtime dependencies other than Live2D Cubism Core
- Core code is written in TypeScript, making it easy to integrate

<img src="demo/screenshots/screenshot-2.png" width="280"><img src="demo/screenshots/screenshot-3.png" width="280"><img src="demo/screenshots/screenshot-1.png" width="270">

*Note: The character models above are for demonstration purposes only and are not included in this repository.*

You can also check out example web pages:

- Check the effect in the lower left corner of [Mimi's Blog](https://zhangshuqiao.org)
- [demo/demo.html](https://live2d-widget.pages.dev/demo/demo) to demonstrate basic functionality
- [demo/login.html](https://live2d-widget.pages.dev/demo/login) to imitate the login interface of NPM

## Usage

If you are a beginner or only need the basic functionality, you can simply add the following line of code to the `head` or `body` of your HTML page to load the widget:

```html
<script src="https://fastly.jsdelivr.net/npm/live2d-widgets@1.0.0/dist/autoload.js"></script>
```

The placement of the code depends on how your website is built. For example, if you are using [Hexo](https://hexo.io), you need to add the above code to the template file of your theme. The modification process is similar for pages generated using various template engines.  
If your website uses PJAX, since the widget does not need to be refreshed on every page, make sure to place the script outside the PJAX refresh area.

**However, we strongly recommend configuring the widget yourself to make it more suitable for your website!**  
If you are interested in customizing the widget, please refer to the detailed instructions below.

## Configuration

You can refer to the source code of `dist/autoload.js` to see the available configuration options. `autoload.js` will automatically load two files: `waifu.css` and `waifu-tips.js`. `waifu-tips.js` creates the `initWidget` function, which is the main function for loading the widget. The `initWidget` function accepts an object-type parameter as the configuration for the widget. The following are the available options:

| Option | Type | Default Value | Description |
| ------ | ---- | ------------- | ----------- |
| `waifuPath` | `string` | `https://fastly.jsdelivr.net/npm/live2d-widgets@1/dist/waifu-tips.json` | Path to the widget resources, can be modified |
| `cdnPath` | `string` | `https://fastly.jsdelivr.net/gh/fghrsh/live2d_api/` | CDN path |
| `cubism2Path` | `string` | `https://fastly.jsdelivr.net/npm/live2d-widgets@1/dist/live2d.min.js` | Path to Cubism 2 Core |
| `cubism5Path` | `string` | `https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js` | Path to Cubism 5 Core |
| `modelId` | `number` | `0` | Default model id |
| `tools` | `string[]` | see `autoload.js` | Buttons of the loaded tools |
| `drag` | `boolean` | `false` | Make the widget draggable |
| `logLevel` | `string` | `error` | Log level: `error`, `warn`, `info`, `trace` |

## Model Repository

This repository does not include any models. You need to configure a separate model repository and set it via the `cdnPath` option.  
Older versions of the `initWidget` function supported the `apiPath` parameter, which required users to set up their own backend. You can refer to [live2d_api](https://github.com/fghrsh/live2d_api) for details. The backend interface would integrate model resources and dynamically generate JSON description files. Since version 1.0, these features have been implemented on the frontend, so a dedicated `apiPath` is no longer required. All model resources can be provided statically. As long as `model_list.json` and the corresponding `textures.cache` for each model exist, features such as outfit changing are supported.

## Development

If the options provided in the "Configuration" section above are not enough to meet your needs, you can make modifications yourself. The directory structure of this repository is as follows:

- `src` directory contains the TypeScript code for each component, e.g. the button and dialog box.
- `build` directory contains files generated from the source code in `src` (please do not modify them directly!)
- `dist` directory contains the files that can be directly used on web pages after packaging, including:
  - `autoload.js` is used to automatically load other resources such as style sheets.
  - `waifu-tips.js` is automatically generated by `build/waifu-tips.js` and it is not recommended to modify it directly.
  - `waifu.css` is the style sheet for the widget.
  - `waifu-tips.json` defines the triggering conditions (`selector`, CSS selector) and the displayed text when triggered (`text`).  
    By default, the CSS selector rules in `waifu-tips.json` are effective for the Hexo [NexT theme](https://github.com/next-theme/hexo-theme-next), but you may need to modify or add new content to make it suitable for your own website.  
    **Warning: The content in `waifu-tips.json` may not be suitable for all age groups or appropriate to access during work. Please ensure their suitability when using them.**

To deploy the development testing environment of this project locally, you need to install Node.js and npm, then execute the following commands:

```bash
git clone https://github.com/stevenjoezhang/live2d-widget.git
npm install
```

If you need to use Cubism 3 or newer models, please download and extract the Cubism SDK for Web separately into the `src` directory, for example, `src/CubismSdkForWeb-5-r.4`. Due to Live2D license agreements (including the Live2D Proprietary Software License Agreement and Live2D Open Software License Agreement), this project cannot include the source code of Cubism SDK for Web.  
If you only need to use Cubism 2 models, you can skip this step. The code in this repository complies with the Redistributable Code terms of the Live2D license agreements.  
Once completed, use the following command to compile and bundle the project.


```bash
npm run build
```

The TypeScript code in the `src` directory is compiled into the `build` directory, and the code in the `build` directory is further bundled into the `dist` directory.  
To support both Cubism 2 and Cubism 3 (and newer) models while minimizing code size, Cubism Core and related code are loaded dynamically based on the detected model version.

## Deploy

After making modifications locally, you can deploy the modified project on a server or load it via a CDN. To make it easier to customize, you can fork this repository and push your modified content to your own repository using `git push`.

### Using jsDelivr CDN

To load forked repository via jsDelivr, the usage method becomes:

```html
<script src="https://fastly.jsdelivr.net/gh/username/live2d-widget@latest/autoload.js"></script>
```

Replace `username` with your GitHub username. To ensure the content of the CDN is refreshed correctly, you need to create a new git tag and push it to the GitHub repository. Otherwise, `@latest` in the URL will still point to the previous version. Additionally, CDN itself has caching, so the changes may take some time to take effect.

### Using Cloudflare Pages

You can also deploy using Cloudflare Pages. Create a new project in Cloudflare Pages and select your forked repository. Then, set the build command to `npm run build`. Once configured, Cloudflare Pages will automatically build and deploy your project.

### Self-host

Alternatively, you can directly host these files on your server instead of loading them via CDN.

- Clone the forked repository onto your server, or upload the local files to the website directory on the server using `ftp` or similar methods.
- If you are deploying a static blog using Hexo or similar tools, place the code of this project in the blog's source file directory (e.g., the `source` directory). When redeploying the blog, the relevant files will be automatically uploaded to the corresponding paths. To prevent these files from being incorrectly modified by Hexo plugins, you may need to set `skip_render`.

Afterwards, the entire project can be accessed through your domain name. You can try opening the `autoload.js` and `live2d.min.js` files in your browser and confirm that their content is complete and correct.
If everything is normal, you can proceed to modify the constant `live2d_path` in `autoload.js` to the URL of the `dist` directory. For example, if you can access `live2d.min.js` through the following URL:

```
https://example.com/path/to/live2d-widget/dist/live2d.min.js
```

then modify the value of `live2d_path` to:

```
https://example.com/path/to/live2d-widget/dist/
```

Make sure to include the trailing `/` in the path.
Once done, add the following code to the interface where you want to add the live2d-widget:

```html
<script src="https://example.com/path/to/live2d-widget/dist/autoload.js"></script>
```

This will load the widget.

## Thanks

<a href="https://www.browserstack.com/">
  <picture>
    <source media="(prefers-color-scheme: dark)" height="80" srcset="https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780">
    <source media="(prefers-color-scheme: light)" height="80" srcset="https://live.browserstack.com/images/opensource/browserstack-logo.svg">
    <img alt="BrowserStack Logo" height="80" src="https://live.browserstack.com/images/opensource/browserstack-logo.svg">
  </picture>
</a>

> Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!

<a href="https://www.jsdelivr.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" height="80" srcset="https://raw.githubusercontent.com/jsdelivr/jsdelivr-media/master/white/svg/jsdelivr-logo-horizontal.svg">
    <source media="(prefers-color-scheme: light)" height="80" srcset="https://raw.githubusercontent.com/jsdelivr/jsdelivr-media/master/default/svg/jsdelivr-logo-horizontal.svg">
    <img alt="jsDelivr Logo" height="80" src="https://raw.githubusercontent.com/jsdelivr/jsdelivr-media/master/default/svg/jsdelivr-logo-horizontal.svg">
  </picture>
</a>

> Thanks to jsDelivr for providing public CDN service.

Thanks fghrsh for providing API service.

Thanks to [Hitokoto](https://hitokoto.cn) for providing the sentence API.

When you click on the paper airplane button of the virtual assistant, a hidden surprise will appear. This feature is from [WebsiteAsteroids](http://www.websiteasteroids.com).

## More

The code is modified based on this blog post:  
https://www.fghrsh.net/post/123.html

For more information, you can refer to the following links:  
https://nocilol.me/archives/lab/add-dynamic-poster-girl-with-live2d-to-your-blog-02  
https://github.com/guansss/pixi-live2d-display

For more models:  
https://github.com/zenghongtu/live2d-model-assets

In addition to that, there are desktop versions available:  
https://github.com/TSKI433/hime-display  
https://github.com/amorist/platelet  
https://github.com/akiroz/Live2D-Widget  
https://github.com/zenghongtu/PPet  
https://github.com/LikeNeko/L2dPetForMac

And also Wallpaper Engine:  
https://github.com/guansss/nep-live2d

Official Live2D websites:  
https://www.live2d.com/en/

## License

This repository does not contain any models. The copyrights of all Live2D models, images, and motion data used for demonstration purposes belong to their respective original authors. They are provided for research and learning purposes only and should not be used for commercial purposes.

The code in this repository (excluding parts covered by the Live2D Proprietary Software License and the Live2D Open Software License) is released under the GNU General Public License v3  
http://www.gnu.org/licenses/gpl-3.0.html

Please comply with the relevant licenses when using any Live2D-related code:

License for Live2D Cubism SDK 2.1:  
[Live2D SDK License Agreement (Public)](https://docs.google.com/document/d/10tz1WrycskzGGBOhrAfGiTSsgmyFy8D9yHx9r_PsN8I/)

License for Live2D Cubism SDK 5:  
Live2D Cubism Core is provided under the Live2D Proprietary Software License.  
https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html  
Live2D Cubism Components are provided under the Live2D Open Software License.  
https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html

## Update Log

Starting from January 1, 2020, this project no longer depends on jQuery.

Starting from November 1, 2022, this project no longer requires users to separately load Font Awesome.


================================================
FILE: README.md
================================================
# Live2D Widget

![](https://forthebadge.com/images/badges/built-with-love.svg)
![](https://forthebadge.com/images/badges/made-with-typescript.svg)
![](https://forthebadge.com/images/badges/uses-css.svg)
![](https://forthebadge.com/images/badges/contains-cat-gifs.svg)
![](https://forthebadge.com/images/badges/powered-by-electricity.svg)
![](https://forthebadge.com/images/badges/makes-people-smile.svg)

[English](README.en.md)

## 特性

- 在网页中添加 Live2D 看板娘
- 轻量级,除 Live2D Cubism Core 外无其他运行时依赖
- 核心代码由 TypeScript 编写,易于集成

<img src="demo/screenshots/screenshot-2.png" width="280"><img src="demo/screenshots/screenshot-3.png" width="280"><img src="demo/screenshots/screenshot-1.png" width="270">

*注:以上人物模型仅供展示之用,本仓库并不包含任何模型。*

你也可以查看示例网页:

- 在 [米米的博客](https://zhangshuqiao.org) 的左下角可查看效果
- [demo/demo.html](https://live2d-widget.pages.dev/demo/demo),展现基础功能
- [demo/login.html](https://live2d-widget.pages.dev/demo/login),仿 NPM 的登陆界面

## 使用

如果你是小白,或者只需要最基础的功能,那么只用将这一行代码加入 html 页面的 `head` 或 `body` 中,即可加载看板娘:

```html
<script src="https://fastly.jsdelivr.net/npm/live2d-widgets@1.0.0/dist/autoload.js"></script>
```

添加代码的位置取决于你的网站的构建方式。例如,如果你使用的是 [Hexo](https://hexo.io),那么需要在主题的模版文件中添加以上代码。对于用各种模版引擎生成的页面,修改方法类似。  
如果网站启用了 PJAX,由于看板娘不必每页刷新,需要注意将该脚本放到 PJAX 刷新区域之外。

**但是!我们强烈推荐自己进行配置,让看板娘更加适合你的网站!**  
如果你有兴趣自己折腾的话,请看下面的详细说明。

## 配置

你可以对照 `dist/autoload.js` 的源码查看可选的配置项目。`autoload.js` 会自动加载两个文件:`waifu.css` 和 `waifu-tips.js`。`waifu-tips.js` 会创建 `initWidget` 函数,这就是加载看板娘的主函数。`initWidget` 函数接收一个 Object 类型的参数,作为看板娘的配置。以下是配置选项:

| 选项 | 类型 | 默认值 | 说明 |
| - | - | - | - |
| `waifuPath` | `string` | `https://fastly.jsdelivr.net/npm/live2d-widgets@1/dist/waifu-tips.json` | 看板娘资源路径,可自行修改 |
| `cdnPath` | `string` | `https://fastly.jsdelivr.net/gh/fghrsh/live2d_api/` | CDN 路径 |
| `cubism2Path` | `string` | `https://fastly.jsdelivr.net/npm/live2d-widgets@1/dist/live2d.min.js` | Cubism 2 Core 路径 |
| `cubism5Path` | `string` | `https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js` | Cubism 5 Core 路径 |
| `modelId` | `number` | `0` | 默认模型 id |
| `tools` | `string[]` | 见 `autoload.js` | 加载的小工具按钮 |
| `drag` | `boolean` | `false` | 支持拖动看板娘 |
| `logLevel` | `string` | `error` | 日志等级,支持 `error`,`warn`,`info`,`trace` |

## 模型仓库

本仓库中并不包含任何模型,需要单独配置模型仓库,并通过 `cdnPath` 选项进行设置。  
旧版本的 `initWidget` 函数支持 `apiPath` 参数,这要求用户自行搭建后端,可以参考 [live2d_api](https://github.com/fghrsh/live2d_api)。后端接口会对模型资源进行整合并动态生成 JSON 描述文件。自 1.0 版本起,相关功能已通过前端实现,因此不再需要专门的 `apiPath`,所有模型资源都可通过静态方式提供。只要存在 `model_list.json` 和模型对应的 `textures.cache`,即可支持换装等功能。

## 开发

如果以上「配置」部分提供的选项还不足以满足你的需求,那么你可以自己进行修改。本仓库的目录结构如下:

- `src` 目录下包含了各个组件的 TypeScript 源代码,例如按钮和对话框等;
- `build` 目录下包含了基于 `src` 中源代码构建后的文件(请不要直接修改!);
- `dist` 目录下包含了进一步打包后网页直接可用的文件,其中:
  - `autoload.js` 用于自动加载其它资源,例如样式表等;
  - `waifu-tips.js` 是由 `build/waifu-tips.js` 自动打包生成的,不建议直接修改;
  - `waifu.css` 是看板娘的样式表;
  - `waifu-tips.json` 中定义了触发条件(`selector`,CSS 选择器)和触发时显示的文字(`text`)。  
    `waifu-tips.json` 中默认的 CSS 选择器规则是对 Hexo 的 [NexT 主题](https://github.com/next-theme/hexo-theme-next) 有效的,为了适用于你自己的网页,可能需要自行修改,或增加新内容。  
    **警告:`waifu-tips.json` 中的内容可能不适合所有年龄段,或不宜在工作期间访问。在使用时,请自行确保它们是合适的。**

要在本地部署本项目的开发测试环境,你需要安装 Node.js 和 npm,然后执行以下命令:

```bash
git clone https://github.com/stevenjoezhang/live2d-widget.git
npm install
```

如果需要使用 Cubism 3 及更新的模型,请单独下载并解压 Cubism SDK for Web 到 `src` 目录下,例如 `src/CubismSdkForWeb-5-r.4`。受 Live2D 许可协议(包括 Live2D Proprietary Software License Agreement 和 Live2D Open Software License Agreement)限制,本项目无法包含 Cubism SDK for Web 的源码。  
如果只需要使用 Cubism 2 版本的模型,可以跳过此步骤。本仓库使用的代码满足 Live2D 许可协议中 Redistributable Code 相关条款。  
完成后,使用以下命令进行编译和打包。

```bash
npm run build
```

`src` 目录中的 TypeScript 代码会被编译到 `build` 目录中,`build` 目录中的代码会被进一步打包到 `dist` 目录中。  
为了能够兼容 Cubism 2 和 Cubism 3 及更新的模型,并减小代码体积,Cubism Core 及相关的代码会根据检测到的模型版本动态加载。

## 部署

在本地完成了修改后,你可以将修改后的项目部署在自己的服务器上,或者通过 CDN 加载。为了方便自定义有关内容,可以把这个仓库 Fork 一份,然后把修改后的内容通过 git push 到你的仓库中。

### 使用 jsDelivr CDN

如果要通过 jsDelivr 加载 Fork 后的仓库,使用方法对应地变为

```html
<script src="https://fastly.jsdelivr.net/gh/username/live2d-widget@latest/autoload.js"></script>
```

将此处的 `username` 替换为你的 GitHub 用户名。为了使 CDN 的内容正常刷新,需要创建新的 git tag 并推送至 GitHub 仓库中,否则此处的 `@latest` 仍然指向更新前的文件。此外 CDN 本身存在缓存,因此改动可能需要一定的时间生效。

### 使用 Cloudflare Pages

也可以使用 Cloudflare Pages 来部署。在 Cloudflare Pages 中创建一个新的项目,选择你 Fork 的仓库。接下来,设置构建命令为 `npm run build`。完成后,Cloudflare Pages 会自动构建并部署你的项目。

### Self-host

你也可以直接把这些文件放到服务器上,而不是通过 CDN 加载。

- 可以把修改后的代码仓库克隆到服务器上,或者通过 `ftp` 等方式将本地文件上传到服务器的网站的目录下;
- 如果你是通过 Hexo 等工具部署的静态博客,请把本项目的代码放在博客源文件目录下(例如 `source` 目录)。重新部署博客时,相关文件就会自动上传到对应的路径下。为了避免这些文件被 Hexo 插件错误地修改,可能需要设置 `skip_render`。

这样,整个项目就可以通过你的域名访问了。不妨试试能否正常地通过浏览器打开 `autoload.js` 和 `live2d.min.js` 等文件,并确认这些文件的内容是完整和正确的。  
一切正常的话,接下来修改 `autoload.js` 中的常量 `live2d_path` 为 `dist` 目录的 URL 即可。比如说,如果你能够通过

```
https://example.com/path/to/live2d-widget/dist/live2d.min.js
```

访问到 `live2d.min.js`,那么就把 `live2d_path` 的值修改为

```
https://example.com/path/to/live2d-widget/dist/
```

路径末尾的 `/` 一定要加上。  
完成后,在你要添加看板娘的界面加入

```html
<script src="https://example.com/path/to/live2d-widget/dist/autoload.js"></script>
```

就可以加载了。

## 鸣谢

<a href="https://www.browserstack.com/">
  <picture>
    <source media="(prefers-color-scheme: dark)" height="80" srcset="https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780">
    <source media="(prefers-color-scheme: light)" height="80" srcset="https://live.browserstack.com/images/opensource/browserstack-logo.svg">
    <img alt="BrowserStack Logo" height="80" src="https://live.browserstack.com/images/opensource/browserstack-logo.svg">
  </picture>
</a>

> 感谢 BrowserStack 容许我们在真实的浏览器中测试此项目。  
> Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!

<a href="https://www.jsdelivr.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" height="80" srcset="https://raw.githubusercontent.com/jsdelivr/jsdelivr-media/master/white/svg/jsdelivr-logo-horizontal.svg">
    <source media="(prefers-color-scheme: light)" height="80" srcset="https://raw.githubusercontent.com/jsdelivr/jsdelivr-media/master/default/svg/jsdelivr-logo-horizontal.svg">
    <img alt="jsDelivr Logo" height="80" src="https://raw.githubusercontent.com/jsdelivr/jsdelivr-media/master/default/svg/jsdelivr-logo-horizontal.svg">
  </picture>
</a>

> 感谢 jsDelivr 提供的 CDN 服务。  
> Thanks jsDelivr for providing public CDN service.

感谢 fghrsh 提供的 API 服务。

感谢 [一言](https://hitokoto.cn) 提供的语句接口。

点击看板娘的纸飞机按钮时,会出现一个彩蛋,这来自于 [WebsiteAsteroids](http://www.websiteasteroids.com)。

## 更多

代码自这篇博文魔改而来:  
https://www.fghrsh.net/post/123.html

更多内容可以参考:  
https://nocilol.me/archives/lab/add-dynamic-poster-girl-with-live2d-to-your-blog-02  
https://github.com/guansss/pixi-live2d-display

更多模型仓库:  
https://github.com/zenghongtu/live2d-model-assets

除此之外,还有桌面版本:  
https://github.com/TSKI433/hime-display  
https://github.com/amorist/platelet  
https://github.com/akiroz/Live2D-Widget  
https://github.com/zenghongtu/PPet  
https://github.com/LikeNeko/L2dPetForMac

以及 Wallpaper Engine:  
https://github.com/guansss/nep-live2d

Live2D 官方网站:  
https://www.live2d.com/en/

## 许可证

本仓库并不包含任何模型,用作展示的所有 Live2D 模型、图片、动作数据等版权均属于其原作者,仅供研究学习,不得用于商业用途。

本仓库的代码(不包括受 Live2D Proprietary Software License 和 Live2D Open Software License 约束的部分)基于 GNU General Public License v3 协议开源  
http://www.gnu.org/licenses/gpl-3.0.html

Live2D 相关代码的使用请遵守对应的许可:

Live2D Cubism SDK 2.1 的许可证:  
[Live2D SDK License Agreement (Public)](https://docs.google.com/document/d/10tz1WrycskzGGBOhrAfGiTSsgmyFy8D9yHx9r_PsN8I/)

Live2D Cubism SDK 5 的许可证:  
Live2D Cubism Core は Live2D Proprietary Software License で提供しています。  
https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_cn.html  
Live2D Cubism Components は Live2D Open Software License で提供しています。  
https://www.live2d.com/eula/live2d-open-software-license-agreement_cn.html

## 更新日志

2020年1月1日起,本项目不再依赖于 jQuery。

2022年11月1日起,本项目不再需要用户单独加载 Font Awesome。


================================================
FILE: build/cubism2/LAppDefine.d.ts
================================================
export default LAppDefine;
declare namespace LAppDefine {
    let VIEW_MAX_SCALE: number;
    let VIEW_MIN_SCALE: number;
    let VIEW_LOGICAL_LEFT: number;
    let VIEW_LOGICAL_RIGHT: number;
    let VIEW_LOGICAL_MAX_LEFT: number;
    let VIEW_LOGICAL_MAX_RIGHT: number;
    let VIEW_LOGICAL_MAX_BOTTOM: number;
    let VIEW_LOGICAL_MAX_TOP: number;
    let PRIORITY_NONE: number;
    let PRIORITY_IDLE: number;
    let PRIORITY_NORMAL: number;
    let PRIORITY_FORCE: number;
    let MOTION_GROUP_IDLE: string;
    let MOTION_GROUP_TAP_BODY: string;
    let MOTION_GROUP_FLICK_HEAD: string;
    let MOTION_GROUP_PINCH_IN: string;
    let MOTION_GROUP_PINCH_OUT: string;
    let MOTION_GROUP_SHAKE: string;
    let HIT_AREA_HEAD: string;
    let HIT_AREA_BODY: string;
}


================================================
FILE: build/cubism2/LAppDefine.js
================================================
const LAppDefine = {
    VIEW_MAX_SCALE: 1.5,
    VIEW_MIN_SCALE: 1,
    VIEW_LOGICAL_LEFT: -1,
    VIEW_LOGICAL_RIGHT: 1,
    VIEW_LOGICAL_MAX_LEFT: -2,
    VIEW_LOGICAL_MAX_RIGHT: 2,
    VIEW_LOGICAL_MAX_BOTTOM: -2,
    VIEW_LOGICAL_MAX_TOP: 2,
    PRIORITY_NONE: 0,
    PRIORITY_IDLE: 1,
    PRIORITY_NORMAL: 2,
    PRIORITY_FORCE: 3,
    MOTION_GROUP_IDLE: 'idle',
    MOTION_GROUP_TAP_BODY: 'tap_body',
    MOTION_GROUP_FLICK_HEAD: 'flick_head',
    MOTION_GROUP_PINCH_IN: 'pinch_in',
    MOTION_GROUP_PINCH_OUT: 'pinch_out',
    MOTION_GROUP_SHAKE: 'shake',
    HIT_AREA_HEAD: 'head',
    HIT_AREA_BODY: 'body',
};
export default LAppDefine;


================================================
FILE: build/cubism2/LAppLive2DManager.d.ts
================================================
export default LAppLive2DManager;
declare class LAppLive2DManager {
    model: LAppModel;
    reloading: boolean;
    getModel(): LAppModel;
    releaseModel(gl: any): void;
    changeModel(gl: any, modelSettingPath: any): Promise<any>;
    changeModelWithJSON(gl: any, modelSettingPath: any, modelSetting: any): Promise<void>;
    setDrag(x: any, y: any): void;
    maxScaleEvent(): void;
    minScaleEvent(): void;
    tapEvent(x: any, y: any): boolean;
}
import LAppModel from './LAppModel.js';


================================================
FILE: build/cubism2/LAppLive2DManager.js
================================================
import { Live2DFramework } from './Live2DFramework.js';
import LAppModel from './LAppModel.js';
import PlatformManager from './PlatformManager.js';
import LAppDefine from './LAppDefine.js';
import logger from '../logger.js';
class LAppLive2DManager {
    constructor() {
        this.model = null;
        this.reloading = false;
        Live2D.init();
        Live2DFramework.setPlatformManager(new PlatformManager());
    }
    getModel() {
        return this.model;
    }
    releaseModel(gl) {
        if (this.model) {
            this.model.release(gl);
            this.model = null;
        }
    }
    async changeModel(gl, modelSettingPath) {
        return new Promise((resolve, reject) => {
            if (this.reloading)
                return;
            this.reloading = true;
            const oldModel = this.model;
            const newModel = new LAppModel();
            newModel.load(gl, modelSettingPath, () => {
                if (oldModel) {
                    oldModel.release(gl);
                }
                this.model = newModel;
                this.reloading = false;
                resolve();
            });
        });
    }
    async changeModelWithJSON(gl, modelSettingPath, modelSetting) {
        if (this.reloading)
            return;
        this.reloading = true;
        const oldModel = this.model;
        const newModel = new LAppModel();
        await newModel.loadModelSetting(modelSettingPath, modelSetting);
        if (oldModel) {
            oldModel.release(gl);
        }
        this.model = newModel;
        this.reloading = false;
    }
    setDrag(x, y) {
        if (this.model) {
            this.model.setDrag(x, y);
        }
    }
    maxScaleEvent() {
        logger.trace('Max scale event.');
        if (this.model) {
            this.model.startRandomMotion(LAppDefine.MOTION_GROUP_PINCH_IN, LAppDefine.PRIORITY_NORMAL);
        }
    }
    minScaleEvent() {
        logger.trace('Min scale event.');
        if (this.model) {
            this.model.startRandomMotion(LAppDefine.MOTION_GROUP_PINCH_OUT, LAppDefine.PRIORITY_NORMAL);
        }
    }
    tapEvent(x, y) {
        logger.trace('tapEvent view x:' + x + ' y:' + y);
        if (!this.model)
            return false;
        if (this.model.hitTest(LAppDefine.HIT_AREA_HEAD, x, y)) {
            logger.trace('Tap face.');
            this.model.setRandomExpression();
        }
        else if (this.model.hitTest(LAppDefine.HIT_AREA_BODY, x, y)) {
            logger.trace('Tap body.');
            this.model.startRandomMotion(LAppDefine.MOTION_GROUP_TAP_BODY, LAppDefine.PRIORITY_NORMAL);
        }
        return true;
    }
}
export default LAppLive2DManager;


================================================
FILE: build/cubism2/LAppModel.d.ts
================================================
export default LAppModel;
declare class LAppModel extends L2DBaseModel {
    modelHomeDir: string;
    modelSetting: ModelSettingJson;
    tmpMatrix: any[];
    loadJSON(callback: any): void;
    loadModelSetting(modelSettingPath: any, modelSetting: any): Promise<void>;
    load(gl: any, modelSettingPath: any, callback: any): void;
    release(gl: any): void;
    preloadMotionGroup(name: any): void;
    update(): void;
    setRandomExpression(): void;
    startRandomMotion(name: any, priority: any): void;
    startMotion(name: any, no: any, priority: any): void;
    setFadeInFadeOut(name: any, no: any, priority: any, motion: any): void;
    setExpression(name: any): void;
    draw(gl: any): void;
    hitTest(id: any, testX: any, testY: any): boolean;
}
import { L2DBaseModel } from './Live2DFramework.js';
import ModelSettingJson from './utils/ModelSettingJson.js';


================================================
FILE: build/cubism2/LAppModel.js
================================================
import { L2DBaseModel, Live2DFramework, L2DEyeBlink } from './Live2DFramework.js';
import ModelSettingJson from './utils/ModelSettingJson.js';
import LAppDefine from './LAppDefine.js';
import MatrixStack from './utils/MatrixStack.js';
import logger from '../logger.js';
class LAppModel extends L2DBaseModel {
    constructor() {
        super();
        this.modelHomeDir = '';
        this.modelSetting = null;
        this.tmpMatrix = [];
    }
    loadJSON(callback) {
        const path = this.modelHomeDir + this.modelSetting.getModelFile();
        this.loadModelData(path, model => {
            for (let i = 0; i < this.modelSetting.getTextureNum(); i++) {
                const texPaths = this.modelHomeDir + this.modelSetting.getTextureFile(i);
                this.loadTexture(i, texPaths, () => {
                    if (this.isTexLoaded) {
                        if (this.modelSetting.getExpressionNum() > 0) {
                            this.expressions = {};
                            for (let j = 0; j < this.modelSetting.getExpressionNum(); j++) {
                                const expName = this.modelSetting.getExpressionName(j);
                                const expFilePath = this.modelHomeDir +
                                    this.modelSetting.getExpressionFile(j);
                                this.loadExpression(expName, expFilePath);
                            }
                        }
                        else {
                            this.expressionManager = null;
                            this.expressions = {};
                        }
                        if (this.eyeBlink == null) {
                            this.eyeBlink = new L2DEyeBlink();
                        }
                        if (this.modelSetting.getPhysicsFile() != null) {
                            this.loadPhysics(this.modelHomeDir + this.modelSetting.getPhysicsFile());
                        }
                        else {
                            this.physics = null;
                        }
                        if (this.modelSetting.getPoseFile() != null) {
                            this.loadPose(this.modelHomeDir + this.modelSetting.getPoseFile(), () => {
                                this.pose.updateParam(this.live2DModel);
                            });
                        }
                        else {
                            this.pose = null;
                        }
                        if (this.modelSetting.getLayout() != null) {
                            const layout = this.modelSetting.getLayout();
                            if (layout['width'] != null)
                                this.modelMatrix.setWidth(layout['width']);
                            if (layout['height'] != null)
                                this.modelMatrix.setHeight(layout['height']);
                            if (layout['x'] != null)
                                this.modelMatrix.setX(layout['x']);
                            if (layout['y'] != null)
                                this.modelMatrix.setY(layout['y']);
                            if (layout['center_x'] != null)
                                this.modelMatrix.centerX(layout['center_x']);
                            if (layout['center_y'] != null)
                                this.modelMatrix.centerY(layout['center_y']);
                            if (layout['top'] != null)
                                this.modelMatrix.top(layout['top']);
                            if (layout['bottom'] != null)
                                this.modelMatrix.bottom(layout['bottom']);
                            if (layout['left'] != null)
                                this.modelMatrix.left(layout['left']);
                            if (layout['right'] != null)
                                this.modelMatrix.right(layout['right']);
                        }
                        for (let j = 0; j < this.modelSetting.getInitParamNum(); j++) {
                            this.live2DModel.setParamFloat(this.modelSetting.getInitParamID(j), this.modelSetting.getInitParamValue(j));
                        }
                        for (let j = 0; j < this.modelSetting.getInitPartsVisibleNum(); j++) {
                            this.live2DModel.setPartsOpacity(this.modelSetting.getInitPartsVisibleID(j), this.modelSetting.getInitPartsVisibleValue(j));
                        }
                        this.live2DModel.saveParam();
                        this.preloadMotionGroup(LAppDefine.MOTION_GROUP_IDLE);
                        this.mainMotionManager.stopAllMotions();
                        this.setUpdating(false);
                        this.setInitialized(true);
                        if (typeof callback == 'function')
                            callback();
                    }
                });
            }
        });
    }
    async loadModelSetting(modelSettingPath, modelSetting) {
        this.setUpdating(true);
        this.setInitialized(false);
        this.modelHomeDir = modelSettingPath.substring(0, modelSettingPath.lastIndexOf('/') + 1);
        this.modelSetting = new ModelSettingJson();
        this.modelSetting.json = modelSetting;
        await new Promise(resolve => this.loadJSON(resolve));
    }
    load(gl, modelSettingPath, callback) {
        this.setUpdating(true);
        this.setInitialized(false);
        this.modelHomeDir = modelSettingPath.substring(0, modelSettingPath.lastIndexOf('/') + 1);
        this.modelSetting = new ModelSettingJson();
        this.modelSetting.loadModelSetting(modelSettingPath, () => {
            this.loadJSON(callback);
        });
    }
    release(gl) {
        const pm = Live2DFramework.getPlatformManager();
        gl.deleteTexture(pm.texture);
    }
    preloadMotionGroup(name) {
        for (let i = 0; i < this.modelSetting.getMotionNum(name); i++) {
            const file = this.modelSetting.getMotionFile(name, i);
            this.loadMotion(file, this.modelHomeDir + file, motion => {
                motion.setFadeIn(this.modelSetting.getMotionFadeIn(name, i));
                motion.setFadeOut(this.modelSetting.getMotionFadeOut(name, i));
            });
        }
    }
    update() {
        if (this.live2DModel == null) {
            logger.error('Failed to update.');
            return;
        }
        const timeMSec = UtSystem.getUserTimeMSec() - this.startTimeMSec;
        const timeSec = timeMSec / 1000.0;
        const t = timeSec * 2 * Math.PI;
        if (this.mainMotionManager.isFinished()) {
            this.startRandomMotion(LAppDefine.MOTION_GROUP_IDLE, LAppDefine.PRIORITY_IDLE);
        }
        this.live2DModel.loadParam();
        const update = this.mainMotionManager.updateParam(this.live2DModel);
        if (!update) {
            if (this.eyeBlink != null) {
                this.eyeBlink.updateParam(this.live2DModel);
            }
        }
        this.live2DModel.saveParam();
        if (this.expressionManager != null &&
            this.expressions != null &&
            !this.expressionManager.isFinished()) {
            this.expressionManager.updateParam(this.live2DModel);
        }
        this.live2DModel.addToParamFloat('PARAM_ANGLE_X', this.dragX * 30, 1);
        this.live2DModel.addToParamFloat('PARAM_ANGLE_Y', this.dragY * 30, 1);
        this.live2DModel.addToParamFloat('PARAM_ANGLE_Z', this.dragX * this.dragY * -30, 1);
        this.live2DModel.addToParamFloat('PARAM_BODY_ANGLE_X', this.dragX * 10, 1);
        this.live2DModel.addToParamFloat('PARAM_EYE_BALL_X', this.dragX, 1);
        this.live2DModel.addToParamFloat('PARAM_EYE_BALL_Y', this.dragY, 1);
        this.live2DModel.addToParamFloat('PARAM_ANGLE_X', Number(15 * Math.sin(t / 6.5345)), 0.5);
        this.live2DModel.addToParamFloat('PARAM_ANGLE_Y', Number(8 * Math.sin(t / 3.5345)), 0.5);
        this.live2DModel.addToParamFloat('PARAM_ANGLE_Z', Number(10 * Math.sin(t / 5.5345)), 0.5);
        this.live2DModel.addToParamFloat('PARAM_BODY_ANGLE_X', Number(4 * Math.sin(t / 15.5345)), 0.5);
        this.live2DModel.setParamFloat('PARAM_BREATH', Number(0.5 + 0.5 * Math.sin(t / 3.2345)), 1);
        if (this.physics != null) {
            this.physics.updateParam(this.live2DModel);
        }
        if (this.lipSync == null) {
            this.live2DModel.setParamFloat('PARAM_MOUTH_OPEN_Y', this.lipSyncValue);
        }
        if (this.pose != null) {
            this.pose.updateParam(this.live2DModel);
        }
        this.live2DModel.update();
    }
    setRandomExpression() {
        const tmp = [];
        for (const name in this.expressions) {
            tmp.push(name);
        }
        const no = parseInt(Math.random() * tmp.length);
        this.setExpression(tmp[no]);
    }
    startRandomMotion(name, priority) {
        const max = this.modelSetting.getMotionNum(name);
        const no = parseInt(Math.random() * max);
        this.startMotion(name, no, priority);
    }
    startMotion(name, no, priority) {
        const motionName = this.modelSetting.getMotionFile(name, no);
        if (motionName == null || motionName == '') {
            return;
        }
        if (priority == LAppDefine.PRIORITY_FORCE) {
            this.mainMotionManager.setReservePriority(priority);
        }
        else if (!this.mainMotionManager.reserveMotion(priority)) {
            logger.trace('Motion is running.');
            return;
        }
        let motion;
        if (this.motions[name] == null) {
            this.loadMotion(null, this.modelHomeDir + motionName, mtn => {
                motion = mtn;
                this.setFadeInFadeOut(name, no, priority, motion);
            });
        }
        else {
            motion = this.motions[name];
            this.setFadeInFadeOut(name, no, priority, motion);
        }
    }
    setFadeInFadeOut(name, no, priority, motion) {
        const motionName = this.modelSetting.getMotionFile(name, no);
        motion.setFadeIn(this.modelSetting.getMotionFadeIn(name, no));
        motion.setFadeOut(this.modelSetting.getMotionFadeOut(name, no));
        logger.trace('Start motion : ' + motionName);
        if (this.modelSetting.getMotionSound(name, no) == null) {
            this.mainMotionManager.startMotionPrio(motion, priority);
        }
        else {
            const soundName = this.modelSetting.getMotionSound(name, no);
            const snd = document.createElement('audio');
            snd.src = this.modelHomeDir + soundName;
            logger.trace('Start sound : ' + soundName);
            snd.play();
            this.mainMotionManager.startMotionPrio(motion, priority);
        }
    }
    setExpression(name) {
        var _b;
        const motion = this.expressions[name];
        logger.trace('Expression : ' + name);
        (_b = this.expressionManager) === null || _b === void 0 ? void 0 : _b.startMotion(motion, false);
    }
    draw(gl) {
        MatrixStack.push();
        MatrixStack.multMatrix(this.modelMatrix.getArray());
        this.tmpMatrix = MatrixStack.getMatrix();
        this.live2DModel.setMatrix(this.tmpMatrix);
        this.live2DModel.draw();
        MatrixStack.pop();
    }
    hitTest(id, testX, testY) {
        const len = this.modelSetting.getHitAreaNum();
        if (len == 0) {
            const hitAreasCustom = this.modelSetting.getHitAreaCustom();
            if (hitAreasCustom) {
                const x = hitAreasCustom[id + '_x'];
                const y = hitAreasCustom[id + '_y'];
                if (testX > Math.min(...x) && testX < Math.max(...x) &&
                    testY > Math.min(...y) && testY < Math.max(...y)) {
                    return true;
                }
            }
        }
        for (let i = 0; i < len; i++) {
            if (id == this.modelSetting.getHitAreaName(i)) {
                const drawID = this.modelSetting.getHitAreaID(i);
                return this.hitTestSimple(drawID, testX, testY);
            }
        }
        return false;
    }
}
export default LAppModel;


================================================
FILE: build/cubism2/Live2DFramework.d.ts
================================================
export class L2DBaseModel {
    live2DModel: any;
    modelMatrix: L2DModelMatrix;
    eyeBlink: any;
    physics: L2DPhysics;
    pose: L2DPose;
    initialized: boolean;
    updating: boolean;
    alpha: number;
    accAlpha: number;
    lipSync: boolean;
    lipSyncValue: number;
    accelX: number;
    accelY: number;
    accelZ: number;
    dragX: number;
    dragY: number;
    startTimeMSec: any;
    mainMotionManager: L2DMotionManager;
    expressionManager: L2DMotionManager;
    motions: {};
    expressions: {};
    isTexLoaded: boolean;
    getModelMatrix(): L2DModelMatrix;
    setAlpha(a: any): void;
    getAlpha(): number;
    isInitialized(): boolean;
    setInitialized(v: any): void;
    isUpdating(): boolean;
    setUpdating(v: any): void;
    getLive2DModel(): any;
    setLipSync(v: any): void;
    setLipSyncValue(v: any): void;
    setAccel(x: any, y: any, z: any): void;
    setDrag(x: any, y: any): void;
    getMainMotionManager(): L2DMotionManager;
    getExpressionManager(): L2DMotionManager;
    loadModelData(path: any, callback: any): void;
    loadTexture(no: any, path: any, callback: any): void;
    loadMotion(name: any, path: any, callback: any): void;
    loadExpression(name: any, path: any, callback: any): void;
    loadPose(path: any, callback: any): void;
    loadPhysics(path: any): void;
    hitTestSimple(drawID: any, testX: any, testY: any): boolean;
}
export class L2DViewMatrix extends L2DMatrix44 {
    screenLeft: any;
    screenRight: any;
    screenTop: any;
    screenBottom: any;
    maxLeft: any;
    maxRight: any;
    maxTop: any;
    maxBottom: any;
    max: number;
    min: number;
    getMaxScale(): number;
    getMinScale(): number;
    setMaxScale(v: any): void;
    setMinScale(v: any): void;
    isMaxScale(): boolean;
    isMinScale(): boolean;
    adjustTranslate(shiftX: any, shiftY: any): void;
    adjustScale(cx: any, cy: any, scale: any): void;
    setScreenRect(left: any, right: any, bottom: any, top: any): void;
    setMaxScreenRect(left: any, right: any, bottom: any, top: any): void;
    getScreenLeft(): any;
    getScreenRight(): any;
    getScreenBottom(): any;
    getScreenTop(): any;
    getMaxLeft(): any;
    getMaxRight(): any;
    getMaxBottom(): any;
    getMaxTop(): any;
}
export class L2DEyeBlink {
    nextBlinkTime: any;
    stateStartTime: any;
    blinkIntervalMsec: number;
    eyeState: string;
    closingMotionMsec: number;
    closedMotionMsec: number;
    openingMotionMsec: number;
    closeIfZero: boolean;
    eyeID_L: string;
    eyeID_R: string;
    calcNextBlink(): any;
    setInterval(blinkIntervalMsec: any): void;
    setEyeMotion(closingMotionMsec: any, closedMotionMsec: any, openingMotionMsec: any): void;
    updateParam(model: any): void;
}
export class Live2DFramework {
    static getPlatformManager(): any;
    static setPlatformManager(platformManager: any): void;
}
export namespace Live2DFramework {
    let platformManager: any;
}
export class L2DMatrix44 {
    static mul(a: any, b: any, dst: any): void;
    tr: Float32Array<ArrayBuffer>;
    identity(): void;
    getArray(): Float32Array<ArrayBuffer>;
    getCopyMatrix(): Float32Array<ArrayBuffer>;
    setMatrix(tr: any): void;
    getScaleX(): number;
    getScaleY(): number;
    transformX(src: any): number;
    transformY(src: any): number;
    invertTransformX(src: any): number;
    invertTransformY(src: any): number;
    multTranslate(shiftX: any, shiftY: any): void;
    translate(x: any, y: any): void;
    translateX(x: any): void;
    translateY(y: any): void;
    multScale(scaleX: any, scaleY: any): void;
    scale(scaleX: any, scaleY: any): void;
}
export class L2DTargetPoint {
    EPSILON: number;
    faceTargetX: number;
    faceTargetY: number;
    faceX: number;
    faceY: number;
    faceVX: number;
    faceVY: number;
    lastTimeSec: number;
    setPoint(x: any, y: any): void;
    getX(): number;
    getY(): number;
    update(): void;
}
export namespace L2DTargetPoint {
    let FRAME_RATE: number;
}
declare class L2DModelMatrix extends L2DMatrix44 {
    constructor(w: any, h: any);
    width: any;
    height: any;
    setPosition(x: any, y: any): void;
    setCenterPosition(x: any, y: any): void;
    top(y: any): void;
    bottom(y: any): void;
    left(x: any): void;
    right(x: any): void;
    centerX(x: any): void;
    centerY(y: any): void;
    setX(x: any): void;
    setY(y: any): void;
    setHeight(h: any): void;
    setWidth(w: any): void;
}
declare class L2DPhysics {
    static load(buf: any): L2DPhysics;
    physicsList: any[];
    startTimeMSec: any;
    updateParam(model: any): void;
}
declare class L2DPose {
    static load(buf: any): L2DPose;
    lastTime: number;
    lastModel: any;
    partsGroups: any[];
    updateParam(model: any): void;
    initParam(model: any): void;
    normalizePartsOpacityGroup(model: any, partsGroup: any, deltaTimeSec: any): void;
    copyOpacityOtherParts(model: any, partsGroup: any): void;
}
declare class L2DMotionManager {
    currentPriority: any;
    reservePriority: any;
    super: any;
    getCurrentPriority(): any;
    getReservePriority(): any;
    reserveMotion(priority: any): boolean;
    setReservePriority(val: any): void;
    updateParam(model: any): any;
    startMotionPrio(motion: any, priority: any): any;
}
export {};


================================================
FILE: build/cubism2/Live2DFramework.js
================================================
import logger from '../logger.js';
class L2DBaseModel {
    constructor() {
        this.live2DModel = null;
        this.modelMatrix = null;
        this.eyeBlink = null;
        this.physics = null;
        this.pose = null;
        this.initialized = false;
        this.updating = false;
        this.alpha = 1;
        this.accAlpha = 0;
        this.lipSync = false;
        this.lipSyncValue = 0;
        this.accelX = 0;
        this.accelY = 0;
        this.accelZ = 0;
        this.dragX = 0;
        this.dragY = 0;
        this.startTimeMSec = null;
        this.mainMotionManager = new L2DMotionManager();
        this.expressionManager = new L2DMotionManager();
        this.motions = {};
        this.expressions = {};
        this.isTexLoaded = false;
    }
    getModelMatrix() {
        return this.modelMatrix;
    }
    setAlpha(a) {
        if (a > 0.999)
            a = 1;
        if (a < 0.001)
            a = 0;
        this.alpha = a;
    }
    getAlpha() {
        return this.alpha;
    }
    isInitialized() {
        return this.initialized;
    }
    setInitialized(v) {
        this.initialized = v;
    }
    isUpdating() {
        return this.updating;
    }
    setUpdating(v) {
        this.updating = v;
    }
    getLive2DModel() {
        return this.live2DModel;
    }
    setLipSync(v) {
        this.lipSync = v;
    }
    setLipSyncValue(v) {
        this.lipSyncValue = v;
    }
    setAccel(x, y, z) {
        this.accelX = x;
        this.accelY = y;
        this.accelZ = z;
    }
    setDrag(x, y) {
        this.dragX = x;
        this.dragY = y;
    }
    getMainMotionManager() {
        return this.mainMotionManager;
    }
    getExpressionManager() {
        return this.expressionManager;
    }
    loadModelData(path, callback) {
        const pm = Live2DFramework.getPlatformManager();
        logger.info('Load model : ' + path);
        pm.loadLive2DModel(path, (l2dModel) => {
            this.live2DModel = l2dModel;
            this.live2DModel.saveParam();
            const _err = Live2D.getError();
            if (_err != 0) {
                logger.error('Error : Failed to loadModelData().');
                return;
            }
            this.modelMatrix = new L2DModelMatrix(this.live2DModel.getCanvasWidth(), this.live2DModel.getCanvasHeight());
            this.modelMatrix.setWidth(2);
            this.modelMatrix.setCenterPosition(0, 0);
            callback(this.live2DModel);
        });
    }
    loadTexture(no, path, callback) {
        texCounter++;
        const pm = Live2DFramework.getPlatformManager();
        logger.info('Load Texture : ' + path);
        pm.loadTexture(this.live2DModel, no, path, () => {
            texCounter--;
            if (texCounter == 0)
                this.isTexLoaded = true;
            if (typeof callback == 'function')
                callback();
        });
    }
    loadMotion(name, path, callback) {
        const pm = Live2DFramework.getPlatformManager();
        logger.trace('Load Motion : ' + path);
        let motion = null;
        pm.loadBytes(path, (buf) => {
            motion = Live2DMotion.loadMotion(buf);
            if (name != null) {
                this.motions[name] = motion;
            }
            callback(motion);
        });
    }
    loadExpression(name, path, callback) {
        const pm = Live2DFramework.getPlatformManager();
        logger.trace('Load Expression : ' + path);
        pm.loadBytes(path, (buf) => {
            if (name != null) {
                this.expressions[name] = L2DExpressionMotion.loadJson(buf);
            }
            if (typeof callback == 'function')
                callback();
        });
    }
    loadPose(path, callback) {
        const pm = Live2DFramework.getPlatformManager();
        logger.trace('Load Pose : ' + path);
        try {
            pm.loadBytes(path, (buf) => {
                this.pose = L2DPose.load(buf);
                if (typeof callback == 'function')
                    callback();
            });
        }
        catch (e) {
            logger.warn(e);
        }
    }
    loadPhysics(path) {
        const pm = Live2DFramework.getPlatformManager();
        logger.trace('Load Physics : ' + path);
        try {
            pm.loadBytes(path, (buf) => {
                this.physics = L2DPhysics.load(buf);
            });
        }
        catch (e) {
            logger.warn(e);
        }
    }
    hitTestSimple(drawID, testX, testY) {
        const drawIndex = this.live2DModel.getDrawDataIndex(drawID);
        if (drawIndex < 0)
            return false;
        const points = this.live2DModel.getTransformedPoints(drawIndex);
        let left = this.live2DModel.getCanvasWidth();
        let right = 0;
        let top = this.live2DModel.getCanvasHeight();
        let bottom = 0;
        for (let j = 0; j < points.length; j = j + 2) {
            const x = points[j];
            const y = points[j + 1];
            if (x < left)
                left = x;
            if (x > right)
                right = x;
            if (y < top)
                top = y;
            if (y > bottom)
                bottom = y;
        }
        const tx = this.modelMatrix.invertTransformX(testX);
        const ty = this.modelMatrix.invertTransformY(testY);
        return left <= tx && tx <= right && top <= ty && ty <= bottom;
    }
}
let texCounter = 0;
class L2DExpressionMotion extends AMotion {
    constructor() {
        super();
        this.paramList = [];
    }
    static loadJson(buf) {
        const ret = new L2DExpressionMotion();
        const pm = Live2DFramework.getPlatformManager();
        const json = pm.jsonParseFromBytes(buf);
        ret.setFadeIn(parseInt(json.fade_in) > 0 ? parseInt(json.fade_in) : 1000);
        ret.setFadeOut(parseInt(json.fade_out) > 0 ? parseInt(json.fade_out) : 1000);
        if (json.params == null) {
            return ret;
        }
        const params = json.params;
        const paramNum = params.length;
        ret.paramList = [];
        for (let i = 0; i < paramNum; i++) {
            const param = params[i];
            const paramID = param.id.toString();
            let value = parseFloat(param.val);
            let calcTypeInt = L2DExpressionMotion.TYPE_ADD;
            const calc = param.calc != null ? param.calc.toString() : 'add';
            if (calc === 'add') {
                calcTypeInt = L2DExpressionMotion.TYPE_ADD;
            }
            else if (calc === 'mult') {
                calcTypeInt = L2DExpressionMotion.TYPE_MULT;
            }
            else if (calc === 'set') {
                calcTypeInt = L2DExpressionMotion.TYPE_SET;
            }
            else {
                calcTypeInt = L2DExpressionMotion.TYPE_ADD;
            }
            if (calcTypeInt == L2DExpressionMotion.TYPE_ADD) {
                let defaultValue = param.def == null ? 0 : parseFloat(param.def);
                value = value - defaultValue;
            }
            else if (calcTypeInt == L2DExpressionMotion.TYPE_MULT) {
                let defaultValue = param.def == null ? 1 : parseFloat(param.def);
                if (defaultValue == 0)
                    defaultValue = 1;
                value = value / defaultValue;
            }
            const item = new L2DExpressionParam();
            item.id = paramID;
            item.type = calcTypeInt;
            item.value = value;
            ret.paramList.push(item);
        }
        return ret;
    }
    updateParamExe(model, timeMSec, weight, motionQueueEnt) {
        for (let i = this.paramList.length - 1; i >= 0; --i) {
            const param = this.paramList[i];
            if (param.type == L2DExpressionMotion.TYPE_ADD) {
                model.addToParamFloat(param.id, param.value, weight);
            }
            else if (param.type == L2DExpressionMotion.TYPE_MULT) {
                model.multParamFloat(param.id, param.value, weight);
            }
            else if (param.type == L2DExpressionMotion.TYPE_SET) {
                model.setParamFloat(param.id, param.value, weight);
            }
        }
    }
}
L2DExpressionMotion.EXPRESSION_DEFAULT = 'DEFAULT';
L2DExpressionMotion.TYPE_SET = 0;
L2DExpressionMotion.TYPE_ADD = 1;
L2DExpressionMotion.TYPE_MULT = 2;
function L2DExpressionParam() {
    this.id = '';
    this.type = -1;
    this.value = null;
}
class L2DEyeBlink {
    constructor() {
        this.nextBlinkTime = null;
        this.stateStartTime = null;
        this.blinkIntervalMsec = null;
        this.eyeState = EYE_STATE.STATE_FIRST;
        this.blinkIntervalMsec = 4000;
        this.closingMotionMsec = 100;
        this.closedMotionMsec = 50;
        this.openingMotionMsec = 150;
        this.closeIfZero = true;
        this.eyeID_L = 'PARAM_EYE_L_OPEN';
        this.eyeID_R = 'PARAM_EYE_R_OPEN';
    }
    calcNextBlink() {
        const time = UtSystem.getUserTimeMSec();
        const r = Math.random();
        return time + r * (2 * this.blinkIntervalMsec - 1);
    }
    setInterval(blinkIntervalMsec) {
        this.blinkIntervalMsec = blinkIntervalMsec;
    }
    setEyeMotion(closingMotionMsec, closedMotionMsec, openingMotionMsec) {
        this.closingMotionMsec = closingMotionMsec;
        this.closedMotionMsec = closedMotionMsec;
        this.openingMotionMsec = openingMotionMsec;
    }
    updateParam(model) {
        const time = UtSystem.getUserTimeMSec();
        let eyeParamValue;
        let t = 0;
        switch (this.eyeState) {
            case EYE_STATE.STATE_CLOSING:
                t = (time - this.stateStartTime) / this.closingMotionMsec;
                if (t >= 1) {
                    t = 1;
                    this.eyeState = EYE_STATE.STATE_CLOSED;
                    this.stateStartTime = time;
                }
                eyeParamValue = 1 - t;
                break;
            case EYE_STATE.STATE_CLOSED:
                t = (time - this.stateStartTime) / this.closedMotionMsec;
                if (t >= 1) {
                    this.eyeState = EYE_STATE.STATE_OPENING;
                    this.stateStartTime = time;
                }
                eyeParamValue = 0;
                break;
            case EYE_STATE.STATE_OPENING:
                t = (time - this.stateStartTime) / this.openingMotionMsec;
                if (t >= 1) {
                    t = 1;
                    this.eyeState = EYE_STATE.STATE_INTERVAL;
                    this.nextBlinkTime = this.calcNextBlink();
                }
                eyeParamValue = t;
                break;
            case EYE_STATE.STATE_INTERVAL:
                if (this.nextBlinkTime < time) {
                    this.eyeState = EYE_STATE.STATE_CLOSING;
                    this.stateStartTime = time;
                }
                eyeParamValue = 1;
                break;
            case EYE_STATE.STATE_FIRST:
            default:
                this.eyeState = EYE_STATE.STATE_INTERVAL;
                this.nextBlinkTime = this.calcNextBlink();
                eyeParamValue = 1;
                break;
        }
        if (!this.closeIfZero)
            eyeParamValue = -eyeParamValue;
        model.setParamFloat(this.eyeID_L, eyeParamValue);
        model.setParamFloat(this.eyeID_R, eyeParamValue);
    }
}
const EYE_STATE = () => { };
EYE_STATE.STATE_FIRST = 'STATE_FIRST';
EYE_STATE.STATE_INTERVAL = 'STATE_INTERVAL';
EYE_STATE.STATE_CLOSING = 'STATE_CLOSING';
EYE_STATE.STATE_CLOSED = 'STATE_CLOSED';
EYE_STATE.STATE_OPENING = 'STATE_OPENING';
class L2DMatrix44 {
    constructor() {
        this.tr = new Float32Array(16);
        this.identity();
    }
    static mul(a, b, dst) {
        const c = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
        const n = 4;
        let i, j, k;
        for (i = 0; i < n; i++) {
            for (j = 0; j < n; j++) {
                for (k = 0; k < n; k++) {
                    c[i + j * 4] += a[i + k * 4] * b[k + j * 4];
                }
            }
        }
        for (i = 0; i < 16; i++) {
            dst[i] = c[i];
        }
    }
    identity() {
        for (let i = 0; i < 16; i++)
            this.tr[i] = i % 5 == 0 ? 1 : 0;
    }
    getArray() {
        return this.tr;
    }
    getCopyMatrix() {
        return new Float32Array(this.tr);
    }
    setMatrix(tr) {
        if (this.tr == null || this.tr.length != this.tr.length)
            return;
        for (let i = 0; i < 16; i++)
            this.tr[i] = tr[i];
    }
    getScaleX() {
        return this.tr[0];
    }
    getScaleY() {
        return this.tr[5];
    }
    transformX(src) {
        return this.tr[0] * src + this.tr[12];
    }
    transformY(src) {
        return this.tr[5] * src + this.tr[13];
    }
    invertTransformX(src) {
        return (src - this.tr[12]) / this.tr[0];
    }
    invertTransformY(src) {
        return (src - this.tr[13]) / this.tr[5];
    }
    multTranslate(shiftX, shiftY) {
        const tr1 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, shiftX, shiftY, 0, 1];
        L2DMatrix44.mul(tr1, this.tr, this.tr);
    }
    translate(x, y) {
        this.tr[12] = x;
        this.tr[13] = y;
    }
    translateX(x) {
        this.tr[12] = x;
    }
    translateY(y) {
        this.tr[13] = y;
    }
    multScale(scaleX, scaleY) {
        const tr1 = [scaleX, 0, 0, 0, 0, scaleY, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
        L2DMatrix44.mul(tr1, this.tr, this.tr);
    }
    scale(scaleX, scaleY) {
        this.tr[0] = scaleX;
        this.tr[5] = scaleY;
    }
}
class L2DModelMatrix extends L2DMatrix44 {
    constructor(w, h) {
        super();
        this.width = w;
        this.height = h;
    }
    setPosition(x, y) {
        this.translate(x, y);
    }
    setCenterPosition(x, y) {
        const w = this.width * this.getScaleX();
        const h = this.height * this.getScaleY();
        this.translate(x - w / 2, y - h / 2);
    }
    top(y) {
        this.setY(y);
    }
    bottom(y) {
        const h = this.height * this.getScaleY();
        this.translateY(y - h);
    }
    left(x) {
        this.setX(x);
    }
    right(x) {
        const w = this.width * this.getScaleX();
        this.translateX(x - w);
    }
    centerX(x) {
        const w = this.width * this.getScaleX();
        this.translateX(x - w / 2);
    }
    centerY(y) {
        const h = this.height * this.getScaleY();
        this.translateY(y - h / 2);
    }
    setX(x) {
        this.translateX(x);
    }
    setY(y) {
        this.translateY(y);
    }
    setHeight(h) {
        const scaleX = h / this.height;
        const scaleY = -scaleX;
        this.scale(scaleX, scaleY);
    }
    setWidth(w) {
        const scaleX = w / this.width;
        const scaleY = -scaleX;
        this.scale(scaleX, scaleY);
    }
}
class L2DMotionManager extends MotionQueueManager {
    constructor() {
        super();
        this.currentPriority = null;
        this.reservePriority = null;
        this.super = MotionQueueManager.prototype;
    }
    getCurrentPriority() {
        return this.currentPriority;
    }
    getReservePriority() {
        return this.reservePriority;
    }
    reserveMotion(priority) {
        if (this.reservePriority >= priority) {
            return false;
        }
        if (this.currentPriority >= priority) {
            return false;
        }
        this.reservePriority = priority;
        return true;
    }
    setReservePriority(val) {
        this.reservePriority = val;
    }
    updateParam(model) {
        const updated = MotionQueueManager.prototype.updateParam.call(this, model);
        if (this.isFinished()) {
            this.currentPriority = 0;
        }
        return updated;
    }
    startMotionPrio(motion, priority) {
        if (priority == this.reservePriority) {
            this.reservePriority = 0;
        }
        this.currentPriority = priority;
        return this.startMotion(motion, false);
    }
}
class L2DPhysics {
    constructor() {
        this.physicsList = [];
        this.startTimeMSec = UtSystem.getUserTimeMSec();
    }
    static load(buf) {
        const ret = new L2DPhysics();
        const pm = Live2DFramework.getPlatformManager();
        const json = pm.jsonParseFromBytes(buf);
        const params = json.physics_hair;
        const paramNum = params.length;
        for (let i = 0; i < paramNum; i++) {
            const param = params[i];
            const physics = new PhysicsHair();
            const setup = param.setup;
            const length = parseFloat(setup.length);
            const resist = parseFloat(setup.regist);
            const mass = parseFloat(setup.mass);
            physics.setup(length, resist, mass);
            const srcList = param.src;
            const srcNum = srcList.length;
            for (let j = 0; j < srcNum; j++) {
                const src = srcList[j];
                let id = src.id;
                let type = PhysicsHair.Src.SRC_TO_X;
                let typeStr = src.ptype;
                if (typeStr === 'x') {
                    type = PhysicsHair.Src.SRC_TO_X;
                }
                else if (typeStr === 'y') {
                    type = PhysicsHair.Src.SRC_TO_Y;
                }
                else if (typeStr === 'angle') {
                    type = PhysicsHair.Src.SRC_TO_G_ANGLE;
                }
                else {
                    UtDebug.error('live2d', 'Invalid parameter:PhysicsHair.Src');
                }
                let scale = parseFloat(src.scale);
                let weight = parseFloat(src.weight);
                physics.addSrcParam(type, id, scale, weight);
            }
            const targetList = param.targets;
            const targetNum = targetList.length;
            for (let j = 0; j < targetNum; j++) {
                const target = targetList[j];
                let id = target.id;
                let type = PhysicsHair.Target.TARGET_FROM_ANGLE;
                let typeStr = target.ptype;
                if (typeStr === 'angle') {
                    type = PhysicsHair.Target.TARGET_FROM_ANGLE;
                }
                else if (typeStr === 'angle_v') {
                    type = PhysicsHair.Target.TARGET_FROM_ANGLE_V;
                }
                else {
                    UtDebug.error('live2d', 'Invalid parameter:PhysicsHair.Target');
                }
                let scale = parseFloat(target.scale);
                let weight = parseFloat(target.weight);
                physics.addTargetParam(type, id, scale, weight);
            }
            ret.physicsList.push(physics);
        }
        return ret;
    }
    updateParam(model) {
        const timeMSec = UtSystem.getUserTimeMSec() - this.startTimeMSec;
        for (let i = 0; i < this.physicsList.length; i++) {
            this.physicsList[i].update(model, timeMSec);
        }
    }
}
class L2DPose {
    constructor() {
        this.lastTime = 0;
        this.lastModel = null;
        this.partsGroups = [];
    }
    static load(buf) {
        const ret = new L2DPose();
        const pm = Live2DFramework.getPlatformManager();
        const json = pm.jsonParseFromBytes(buf);
        const poseListInfo = json.parts_visible;
        const poseNum = poseListInfo.length;
        for (let i_pose = 0; i_pose < poseNum; i_pose++) {
            const poseInfo = poseListInfo[i_pose];
            const idListInfo = poseInfo.group;
            const idNum = idListInfo.length;
            const partsGroup = [];
            for (let i_group = 0; i_group < idNum; i_group++) {
                const partsInfo = idListInfo[i_group];
                const parts = new L2DPartsParam(partsInfo.id);
                partsGroup[i_group] = parts;
                if (partsInfo.link == null)
                    continue;
                const linkListInfo = partsInfo.link;
                const linkNum = linkListInfo.length;
                parts.link = [];
                for (let i_link = 0; i_link < linkNum; i_link++) {
                    const linkParts = new L2DPartsParam(linkListInfo[i_link]);
                    parts.link.push(linkParts);
                }
            }
            ret.partsGroups.push(partsGroup);
        }
        return ret;
    }
    updateParam(model) {
        if (model == null)
            return;
        if (!(model == this.lastModel)) {
            this.initParam(model);
        }
        this.lastModel = model;
        const curTime = UtSystem.getUserTimeMSec();
        let deltaTimeSec = this.lastTime == 0 ? 0 : (curTime - this.lastTime) / 1000.0;
        this.lastTime = curTime;
        if (deltaTimeSec < 0)
            deltaTimeSec = 0;
        for (let i = 0; i < this.partsGroups.length; i++) {
            this.normalizePartsOpacityGroup(model, this.partsGroups[i], deltaTimeSec);
            this.copyOpacityOtherParts(model, this.partsGroups[i]);
        }
    }
    initParam(model) {
        if (model == null)
            return;
        for (let i = 0; i < this.partsGroups.length; i++) {
            const partsGroup = this.partsGroups[i];
            for (let j = 0; j < partsGroup.length; j++) {
                partsGroup[j].initIndex(model);
                const partsIndex = partsGroup[j].partsIndex;
                const paramIndex = partsGroup[j].paramIndex;
                if (partsIndex < 0)
                    continue;
                const v = model.getParamFloat(paramIndex) != 0;
                model.setPartsOpacity(partsIndex, v ? 1.0 : 0.0);
                model.setParamFloat(paramIndex, v ? 1.0 : 0.0);
                if (partsGroup[j].link == null)
                    continue;
                for (let k = 0; k < partsGroup[j].link.length; k++) {
                    partsGroup[j].link[k].initIndex(model);
                }
            }
        }
    }
    normalizePartsOpacityGroup(model, partsGroup, deltaTimeSec) {
        let visibleParts = -1;
        let visibleOpacity = 1.0;
        const CLEAR_TIME_SEC = 0.5;
        const phi = 0.5;
        const maxBackOpacity = 0.15;
        for (let i = 0; i < partsGroup.length; i++) {
            let partsIndex = partsGroup[i].partsIndex;
            const paramIndex = partsGroup[i].paramIndex;
            if (partsIndex < 0)
                continue;
            if (model.getParamFloat(paramIndex) != 0) {
                if (visibleParts >= 0) {
                    break;
                }
                visibleParts = i;
                visibleOpacity = model.getPartsOpacity(partsIndex);
                visibleOpacity += deltaTimeSec / CLEAR_TIME_SEC;
                if (visibleOpacity > 1) {
                    visibleOpacity = 1;
                }
            }
        }
        if (visibleParts < 0) {
            visibleParts = 0;
            visibleOpacity = 1;
        }
        for (let i = 0; i < partsGroup.length; i++) {
            let partsIndex = partsGroup[i].partsIndex;
            if (partsIndex < 0)
                continue;
            if (visibleParts == i) {
                model.setPartsOpacity(partsIndex, visibleOpacity);
            }
            else {
                let opacity = model.getPartsOpacity(partsIndex);
                let a1;
                if (visibleOpacity < phi) {
                    a1 = (visibleOpacity * (phi - 1)) / phi + 1;
                }
                else {
                    a1 = ((1 - visibleOpacity) * phi) / (1 - phi);
                }
                const backOp = (1 - a1) * (1 - visibleOpacity);
                if (backOp > maxBackOpacity) {
                    a1 = 1 - maxBackOpacity / (1 - visibleOpacity);
                }
                if (opacity > a1) {
                    opacity = a1;
                }
                model.setPartsOpacity(partsIndex, opacity);
            }
        }
    }
    copyOpacityOtherParts(model, partsGroup) {
        for (let i_group = 0; i_group < partsGroup.length; i_group++) {
            const partsParam = partsGroup[i_group];
            if (partsParam.link == null)
                continue;
            if (partsParam.partsIndex < 0)
                continue;
            const opacity = model.getPartsOpacity(partsParam.partsIndex);
            for (let i_link = 0; i_link < partsParam.link.length; i_link++) {
                const linkParts = partsParam.link[i_link];
                if (linkParts.partsIndex < 0)
                    continue;
                model.setPartsOpacity(linkParts.partsIndex, opacity);
            }
        }
    }
}
class L2DPartsParam {
    constructor(id) {
        this.paramIndex = -1;
        this.partsIndex = -1;
        this.link = null;
        this.id = id;
    }
    initIndex(model) {
        this.paramIndex = model.getParamIndex('VISIBLE:' + this.id);
        this.partsIndex = model.getPartsDataIndex(PartsDataID.getID(this.id));
        model.setParamFloat(this.paramIndex, 1);
    }
}
class L2DTargetPoint {
    constructor() {
        this.EPSILON = 0.01;
        this.faceTargetX = 0;
        this.faceTargetY = 0;
        this.faceX = 0;
        this.faceY = 0;
        this.faceVX = 0;
        this.faceVY = 0;
        this.lastTimeSec = 0;
    }
    setPoint(x, y) {
        this.faceTargetX = x;
        this.faceTargetY = y;
    }
    getX() {
        return this.faceX;
    }
    getY() {
        return this.faceY;
    }
    update() {
        const TIME_TO_MAX_SPEED = 0.15;
        const FACE_PARAM_MAX_V = 40.0 / 7.5;
        const MAX_V = FACE_PARAM_MAX_V / L2DTargetPoint.FRAME_RATE;
        if (this.lastTimeSec == 0) {
            this.lastTimeSec = UtSystem.getUserTimeMSec();
            return;
        }
        const curTimeSec = UtSystem.getUserTimeMSec();
        const deltaTimeWeight = ((curTimeSec - this.lastTimeSec) * L2DTargetPoint.FRAME_RATE) / 1000.0;
        this.lastTimeSec = curTimeSec;
        const FRAME_TO_MAX_SPEED = TIME_TO_MAX_SPEED * L2DTargetPoint.FRAME_RATE;
        const MAX_A = (deltaTimeWeight * MAX_V) / FRAME_TO_MAX_SPEED;
        const dx = this.faceTargetX - this.faceX;
        const dy = this.faceTargetY - this.faceY;
        if (Math.abs(dx) <= this.EPSILON && Math.abs(dy) <= this.EPSILON)
            return;
        const d = Math.sqrt(dx * dx + dy * dy);
        const vx = (MAX_V * dx) / d;
        const vy = (MAX_V * dy) / d;
        let ax = vx - this.faceVX;
        let ay = vy - this.faceVY;
        let a = Math.sqrt(ax * ax + ay * ay);
        if (a < -MAX_A || a > MAX_A) {
            ax *= MAX_A / a;
            ay *= MAX_A / a;
            a = MAX_A;
        }
        this.faceVX += ax;
        this.faceVY += ay;
        {
            const max_v = 0.5 *
                (Math.sqrt(MAX_A * MAX_A + 16 * MAX_A * d - 8 * MAX_A * d) - MAX_A);
            const cur_v = Math.sqrt(this.faceVX * this.faceVX + this.faceVY * this.faceVY);
            if (cur_v > max_v) {
                this.faceVX *= max_v / cur_v;
                this.faceVY *= max_v / cur_v;
            }
        }
        this.faceX += this.faceVX;
        this.faceY += this.faceVY;
    }
}
L2DTargetPoint.FRAME_RATE = 30;
class L2DViewMatrix extends L2DMatrix44 {
    constructor() {
        super();
        this.screenLeft = null;
        this.screenRight = null;
        this.screenTop = null;
        this.screenBottom = null;
        this.maxLeft = null;
        this.maxRight = null;
        this.maxTop = null;
        this.maxBottom = null;
        this.max = Number.MAX_VALUE;
        this.min = 0;
    }
    getMaxScale() {
        return this.max;
    }
    getMinScale() {
        return this.min;
    }
    setMaxScale(v) {
        this.max = v;
    }
    setMinScale(v) {
        this.min = v;
    }
    isMaxScale() {
        return this.getScaleX() == this.max;
    }
    isMinScale() {
        return this.getScaleX() == this.min;
    }
    adjustTranslate(shiftX, shiftY) {
        if (this.tr[0] * this.maxLeft + (this.tr[12] + shiftX) > this.screenLeft)
            shiftX = this.screenLeft - this.tr[0] * this.maxLeft - this.tr[12];
        if (this.tr[0] * this.maxRight + (this.tr[12] + shiftX) < this.screenRight)
            shiftX = this.screenRight - this.tr[0] * this.maxRight - this.tr[12];
        if (this.tr[5] * this.maxTop + (this.tr[13] + shiftY) < this.screenTop)
            shiftY = this.screenTop - this.tr[5] * this.maxTop - this.tr[13];
        if (this.tr[5] * this.maxBottom + (this.tr[13] + shiftY) >
            this.screenBottom)
            shiftY = this.screenBottom - this.tr[5] * this.maxBottom - this.tr[13];
        const tr1 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, shiftX, shiftY, 0, 1];
        L2DMatrix44.mul(tr1, this.tr, this.tr);
    }
    adjustScale(cx, cy, scale) {
        const targetScale = scale * this.tr[0];
        if (targetScale < this.min) {
            if (this.tr[0] > 0)
                scale = this.min / this.tr[0];
        }
        else if (targetScale > this.max) {
            if (this.tr[0] > 0)
                scale = this.max / this.tr[0];
        }
        const tr1 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, cx, cy, 0, 1];
        const tr2 = [scale, 0, 0, 0, 0, scale, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
        const tr3 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -cx, -cy, 0, 1];
        L2DMatrix44.mul(tr3, this.tr, this.tr);
        L2DMatrix44.mul(tr2, this.tr, this.tr);
        L2DMatrix44.mul(tr1, this.tr, this.tr);
    }
    setScreenRect(left, right, bottom, top) {
        this.screenLeft = left;
        this.screenRight = right;
        this.screenTop = top;
        this.screenBottom = bottom;
    }
    setMaxScreenRect(left, right, bottom, top) {
        this.maxLeft = left;
        this.maxRight = right;
        this.maxTop = top;
        this.maxBottom = bottom;
    }
    getScreenLeft() {
        return this.screenLeft;
    }
    getScreenRight() {
        return this.screenRight;
    }
    getScreenBottom() {
        return this.screenBottom;
    }
    getScreenTop() {
        return this.screenTop;
    }
    getMaxLeft() {
        return this.maxLeft;
    }
    getMaxRight() {
        return this.maxRight;
    }
    getMaxBottom() {
        return this.maxBottom;
    }
    getMaxTop() {
        return this.maxTop;
    }
}
class Live2DFramework {
    static getPlatformManager() {
        return Live2DFramework.platformManager;
    }
    static setPlatformManager(platformManager) {
        Live2DFramework.platformManager = platformManager;
    }
}
Live2DFramework.platformManager = null;
export { L2DBaseModel, L2DViewMatrix, L2DEyeBlink, Live2DFramework, L2DMatrix44, L2DTargetPoint };


================================================
FILE: build/cubism2/PlatformManager.d.ts
================================================
export default PlatformManager;
declare class PlatformManager {
    cache: {};
    loadBytes(path: any, callback: any): any;
    loadLive2DModel(path: any, callback: any): void;
    loadTexture(model: any, no: any, path: any, callback: any): void;
    jsonParseFromBytes(buf: any): any;
}


================================================
FILE: build/cubism2/PlatformManager.js
================================================
import logger from '../logger.js';
class PlatformManager {
    constructor() {
        this.cache = {};
    }
    loadBytes(path, callback) {
        if (path in this.cache) {
            return callback(this.cache[path]);
        }
        fetch(path)
            .then(response => response.arrayBuffer())
            .then(arrayBuffer => {
            this.cache[path] = arrayBuffer;
            callback(arrayBuffer);
        });
    }
    loadLive2DModel(path, callback) {
        let model = null;
        this.loadBytes(path, buf => {
            model = Live2DModelWebGL.loadModel(buf);
            callback(model);
        });
    }
    loadTexture(model, no, path, callback) {
        const loadedImage = new Image();
        loadedImage.crossOrigin = 'anonymous';
        loadedImage.src = path;
        loadedImage.onload = () => {
            const canvas = document.getElementById('live2d');
            const gl = canvas.getContext('webgl2', { premultipliedAlpha: true, preserveDrawingBuffer: true });
            let texture = gl.createTexture();
            if (!texture) {
                logger.error('Failed to generate gl texture name.');
                return -1;
            }
            if (model.isPremultipliedAlpha() == false) {
                gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1);
            }
            gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);
            gl.activeTexture(gl.TEXTURE0);
            gl.bindTexture(gl.TEXTURE_2D, texture);
            gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, loadedImage);
            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
            gl.generateMipmap(gl.TEXTURE_2D);
            model.setTexture(no, texture);
            texture = null;
            if (typeof callback == 'function')
                callback();
        };
        loadedImage.onerror = () => {
            logger.error('Failed to load image : ' + path);
        };
    }
    jsonParseFromBytes(buf) {
        let jsonStr;
        const bomCode = new Uint8Array(buf, 0, 3);
        if (bomCode[0] == 239 && bomCode[1] == 187 && bomCode[2] == 191) {
            jsonStr = String.fromCharCode.apply(null, new Uint8Array(buf, 3));
        }
        else {
            jsonStr = String.fromCharCode.apply(null, new Uint8Array(buf));
        }
        const jsonObj = JSON.parse(jsonStr);
        return jsonObj;
    }
}
export default PlatformManager;


================================================
FILE: build/cubism2/index.d.ts
================================================
export default Cubism2Model;
declare class Cubism2Model {
    live2DMgr: LAppLive2DManager;
    isDrawStart: boolean;
    gl: any;
    canvas: HTMLElement;
    dragMgr: L2DTargetPoint;
    viewMatrix: L2DViewMatrix;
    projMatrix: L2DMatrix44;
    deviceToScreen: L2DMatrix44;
    oldLen: number;
    _boundMouseEvent: any;
    _boundTouchEvent: any;
    initL2dCanvas(canvasId: any): void;
    init(canvasId: any, modelSettingPath: any, modelSetting: any): Promise<void>;
    destroy(): void;
    _drawFrameId: number;
    startDraw(): void;
    draw(): void;
    changeModel(modelSettingPath: any): Promise<void>;
    changeModelWithJSON(modelSettingPath: any, modelSetting: any): Promise<void>;
    modelScaling(scale: any): void;
    modelTurnHead(event: any): void;
    followPointer(event: any): void;
    lookFront(): void;
    mouseEvent(e: any): void;
    touchEvent(e: any): void;
    transformViewX(deviceX: any): number;
    transformViewY(deviceY: any): number;
    transformScreenX(deviceX: any): number;
    transformScreenY(deviceY: any): number;
}
import LAppLive2DManager from './LAppLive2DManager.js';
import { L2DTargetPoint } from './Live2DFramework.js';
import { L2DViewMatrix } from './Live2DFramework.js';
import { L2DMatrix44 } from './Live2DFramework.js';


================================================
FILE: build/cubism2/index.js
================================================
import { L2DMatrix44, L2DTargetPoint, L2DViewMatrix } from './Live2DFramework.js';
import LAppDefine from './LAppDefine.js';
import MatrixStack from './utils/MatrixStack.js';
import LAppLive2DManager from './LAppLive2DManager.js';
import logger from '../logger.js';
function normalizePoint(x, y, x0, y0, w, h) {
    const dx = x - x0;
    const dy = y - y0;
    let targetX = 0, targetY = 0;
    if (dx >= 0) {
        targetX = dx / (w - x0);
    }
    else {
        targetX = dx / x0;
    }
    if (dy >= 0) {
        targetY = dy / (h - y0);
    }
    else {
        targetY = dy / y0;
    }
    return {
        vx: targetX,
        vy: -targetY
    };
}
class Cubism2Model {
    constructor() {
        this.live2DMgr = new LAppLive2DManager();
        this.isDrawStart = false;
        this.gl = null;
        this.canvas = null;
        this.dragMgr = null;
        this.viewMatrix = null;
        this.projMatrix = null;
        this.deviceToScreen = null;
        this.oldLen = 0;
        this._boundMouseEvent = this.mouseEvent.bind(this);
        this._boundTouchEvent = this.touchEvent.bind(this);
    }
    initL2dCanvas(canvasId) {
        this.canvas = document.getElementById(canvasId);
        if (this.canvas.addEventListener) {
            this.canvas.addEventListener('mousewheel', this._boundMouseEvent, false);
            this.canvas.addEventListener('click', this._boundMouseEvent, false);
            document.addEventListener('mousemove', this._boundMouseEvent, false);
            document.addEventListener('mouseout', this._boundMouseEvent, false);
            this.canvas.addEventListener('contextmenu', this._boundMouseEvent, false);
            this.canvas.addEventListener('touchstart', this._boundTouchEvent, false);
            this.canvas.addEventListener('touchend', this._boundTouchEvent, false);
            this.canvas.addEventListener('touchmove', this._boundTouchEvent, false);
        }
    }
    async init(canvasId, modelSettingPath, modelSetting) {
        this.initL2dCanvas(canvasId);
        const width = this.canvas.width;
        const height = this.canvas.height;
        this.dragMgr = new L2DTargetPoint();
        const ratio = height / width;
        const left = LAppDefine.VIEW_LOGICAL_LEFT;
        const right = LAppDefine.VIEW_LOGICAL_RIGHT;
        const bottom = -ratio;
        const top = ratio;
        this.viewMatrix = new L2DViewMatrix();
        this.viewMatrix.setScreenRect(left, right, bottom, top);
        this.viewMatrix.setMaxScreenRect(LAppDefine.VIEW_LOGICAL_MAX_LEFT, LAppDefine.VIEW_LOGICAL_MAX_RIGHT, LAppDefine.VIEW_LOGICAL_MAX_BOTTOM, LAppDefine.VIEW_LOGICAL_MAX_TOP);
        this.viewMatrix.setMaxScale(LAppDefine.VIEW_MAX_SCALE);
        this.viewMatrix.setMinScale(LAppDefine.VIEW_MIN_SCALE);
        this.projMatrix = new L2DMatrix44();
        this.projMatrix.multScale(1, width / height);
        this.deviceToScreen = new L2DMatrix44();
        this.deviceToScreen.multTranslate(-width / 2.0, -height / 2.0);
        this.deviceToScreen.multScale(2 / width, -2 / width);
        this.gl = this.canvas.getContext('webgl2', { premultipliedAlpha: true, preserveDrawingBuffer: true });
        if (!this.gl) {
            logger.error('Failed to create WebGL context.');
            return;
        }
        Live2D.setGL(this.gl);
        this.gl.clearColor(0.0, 0.0, 0.0, 0.0);
        await this.changeModelWithJSON(modelSettingPath, modelSetting);
        this.startDraw();
    }
    destroy() {
        if (this.canvas) {
            this.canvas.removeEventListener('mousewheel', this._boundMouseEvent, false);
            this.canvas.removeEventListener('click', this._boundMouseEvent, false);
            document.removeEventListener('mousemove', this._boundMouseEvent, false);
            document.removeEventListener('mouseout', this._boundMouseEvent, false);
            this.canvas.removeEventListener('contextmenu', this._boundMouseEvent, false);
            this.canvas.removeEventListener('touchstart', this._boundTouchEvent, false);
            this.canvas.removeEventListener('touchend', this._boundTouchEvent, false);
            this.canvas.removeEventListener('touchmove', this._boundTouchEvent, false);
        }
        if (this._drawFrameId) {
            window.cancelAnimationFrame(this._drawFrameId);
            this._drawFrameId = null;
        }
        this.isDrawStart = false;
        if (this.live2DMgr && typeof this.live2DMgr.release === 'function') {
            this.live2DMgr.release();
        }
        if (this.gl) {
        }
        this.canvas = null;
        this.gl = null;
        this.dragMgr = null;
        this.viewMatrix = null;
        this.projMatrix = null;
        this.deviceToScreen = null;
    }
    startDraw() {
        if (!this.isDrawStart) {
            this.isDrawStart = true;
            const tick = () => {
                this.draw();
                this._drawFrameId = window.requestAnimationFrame(tick, this.canvas);
            };
            tick();
        }
    }
    draw() {
        MatrixStack.reset();
        MatrixStack.loadIdentity();
        this.dragMgr.update();
        this.live2DMgr.setDrag(this.dragMgr.getX(), this.dragMgr.getY());
        this.gl.clear(this.gl.COLOR_BUFFER_BIT);
        MatrixStack.multMatrix(this.projMatrix.getArray());
        MatrixStack.multMatrix(this.viewMatrix.getArray());
        MatrixStack.push();
        const model = this.live2DMgr.getModel();
        if (model == null)
            return;
        if (model.initialized && !model.updating) {
            model.update();
            model.draw(this.gl);
        }
        MatrixStack.pop();
    }
    async changeModel(modelSettingPath) {
        await this.live2DMgr.changeModel(this.gl, modelSettingPath);
    }
    async changeModelWithJSON(modelSettingPath, modelSetting) {
        await this.live2DMgr.changeModelWithJSON(this.gl, modelSettingPath, modelSetting);
    }
    modelScaling(scale) {
        const isMaxScale = this.viewMatrix.isMaxScale();
        const isMinScale = this.viewMatrix.isMinScale();
        this.viewMatrix.adjustScale(0, 0, scale);
        if (!isMaxScale) {
            if (this.viewMatrix.isMaxScale()) {
                this.live2DMgr.maxScaleEvent();
            }
        }
        if (!isMinScale) {
            if (this.viewMatrix.isMinScale()) {
                this.live2DMgr.minScaleEvent();
            }
        }
    }
    modelTurnHead(event) {
        var _b;
        const rect = this.canvas.getBoundingClientRect();
        const { vx, vy } = normalizePoint(event.clientX, event.clientY, rect.left + rect.width / 2, rect.top + rect.height / 2, window.innerWidth, window.innerHeight);
        logger.trace('onMouseDown device( x:' +
            event.clientX +
            ' y:' +
            event.clientY +
            ' ) view( x:' +
            vx +
            ' y:' +
            vy +
            ')');
        this.dragMgr.setPoint(vx, vy);
        this.live2DMgr.tapEvent(vx, vy);
        if ((_b = this.live2DMgr) === null || _b === void 0 ? void 0 : _b.model.hitTest(LAppDefine.HIT_AREA_BODY, vx, vy)) {
            window.dispatchEvent(new Event('live2d:tapbody'));
        }
    }
    followPointer(event) {
        var _b;
        const rect = this.canvas.getBoundingClientRect();
        const { vx, vy } = normalizePoint(event.clientX, event.clientY, rect.left + rect.width / 2, rect.top + rect.height / 2, window.innerWidth, window.innerHeight);
        logger.trace('onMouseMove device( x:' +
            event.clientX +
            ' y:' +
            event.clientY +
            ' ) view( x:' +
            vx +
            ' y:' +
            vy +
            ')');
        this.dragMgr.setPoint(vx, vy);
        if ((_b = this.live2DMgr) === null || _b === void 0 ? void 0 : _b.model.hitTest(LAppDefine.HIT_AREA_BODY, vx, vy)) {
            window.dispatchEvent(new Event('live2d:hoverbody'));
        }
    }
    lookFront() {
        this.dragMgr.setPoint(0, 0);
    }
    mouseEvent(e) {
        e.preventDefault();
        if (e.type == 'mousewheel') {
            if (e.wheelDelta > 0)
                this.modelScaling(1.1);
            else
                this.modelScaling(0.9);
        }
        else if (e.type == 'click' || e.type == 'contextmenu') {
            this.modelTurnHead(e);
        }
        else if (e.type == 'mousemove') {
            this.followPointer(e);
        }
        else if (e.type == 'mouseout') {
            this.lookFront();
        }
    }
    touchEvent(e) {
        e.preventDefault();
        const touch = e.touches[0];
        if (e.type == 'touchstart') {
            if (e.touches.length == 1)
                this.modelTurnHead(touch);
        }
        else if (e.type == 'touchmove') {
            this.followPointer(touch);
            if (e.touches.length == 2) {
                const touch1 = e.touches[0];
                const touch2 = e.touches[1];
                const len = Math.pow(touch1.pageX - touch2.pageX, 2) +
                    Math.pow(touch1.pageY - touch2.pageY, 2);
                if (this.oldLen - len < 0)
                    this.modelScaling(1.025);
                else
                    this.modelScaling(0.975);
                this.oldLen = len;
            }
        }
        else if (e.type == 'touchend') {
            this.lookFront();
        }
    }
    transformViewX(deviceX) {
        const screenX = this.deviceToScreen.transformX(deviceX);
        return this.viewMatrix.invertTransformX(screenX);
    }
    transformViewY(deviceY) {
        const screenY = this.deviceToScreen.transformY(deviceY);
        return this.viewMatrix.invertTransformY(screenY);
    }
    transformScreenX(deviceX) {
        return this.deviceToScreen.transformX(deviceX);
    }
    transformScreenY(deviceY) {
        return this.deviceToScreen.transformY(deviceY);
    }
}
export default Cubism2Model;


================================================
FILE: build/cubism2/utils/MatrixStack.d.ts
================================================
export default MatrixStack;
declare class MatrixStack {
    static reset(): void;
    static loadIdentity(): void;
    static push(): void;
    static pop(): void;
    static getMatrix(): number[];
    static multMatrix(matNew: any): void;
}
declare namespace MatrixStack {
    let depth: number;
    let matrixStack: number[];
    let currentMatrix: number[];
    let tmp: any[];
}


================================================
FILE: build/cubism2/utils/MatrixStack.js
================================================
class MatrixStack {
    static reset() {
        this.depth = 0;
    }
    static loadIdentity() {
        for (let i = 0; i < 16; i++) {
            this.currentMatrix[i] = i % 5 == 0 ? 1 : 0;
        }
    }
    static push() {
        const offset = this.depth * 16;
        const nextOffset = (this.depth + 1) * 16;
        if (this.matrixStack.length < nextOffset + 16) {
            this.matrixStack.length = nextOffset + 16;
        }
        for (let i = 0; i < 16; i++) {
            this.matrixStack[nextOffset + i] = this.currentMatrix[i];
        }
        this.depth++;
    }
    static pop() {
        this.depth--;
        if (this.depth < 0) {
            this.depth = 0;
        }
        const offset = this.depth * 16;
        for (let i = 0; i < 16; i++) {
            this.currentMatrix[i] = this.matrixStack[offset + i];
        }
    }
    static getMatrix() {
        return this.currentMatrix;
    }
    static multMatrix(matNew) {
        let i, j, k;
        for (i = 0; i < 16; i++) {
            this.tmp[i] = 0;
        }
        for (i = 0; i < 4; i++) {
            for (j = 0; j < 4; j++) {
                for (k = 0; k < 4; k++) {
                    this.tmp[i + j * 4] +=
                        this.currentMatrix[i + k * 4] * matNew[k + j * 4];
                }
            }
        }
        for (i = 0; i < 16; i++) {
            this.currentMatrix[i] = this.tmp[i];
        }
    }
}
MatrixStack.matrixStack = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
MatrixStack.depth = 0;
MatrixStack.currentMatrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
MatrixStack.tmp = new Array(16);
export default MatrixStack;


================================================
FILE: build/cubism2/utils/ModelSettingJson.d.ts
================================================
export default ModelSettingJson;
declare class ModelSettingJson {
    NAME: string;
    ID: string;
    MODEL: string;
    TEXTURES: string;
    HIT_AREAS: string;
    HIT_AREAS_CUSTOM: string;
    PHYSICS: string;
    POSE: string;
    EXPRESSIONS: string;
    MOTION_GROUPS: string;
    SOUND: string;
    FADE_IN: string;
    FADE_OUT: string;
    LAYOUT: string;
    INIT_PARAM: string;
    INIT_PARTS_VISIBLE: string;
    VALUE: string;
    FILE: string;
    json: {};
    loadModelSetting(path: any, callback: any): void;
    getTextureFile(n: any): any;
    getModelFile(): any;
    getTextureNum(): any;
    getHitAreaNum(): any;
    getHitAreaCustom(): any;
    getHitAreaID(n: any): any;
    getHitAreaName(n: any): any;
    getPhysicsFile(): any;
    getPoseFile(): any;
    getExpressionNum(): any;
    getExpressionFile(n: any): any;
    getExpressionName(n: any): any;
    getLayout(): any;
    getInitParamNum(): any;
    getMotionNum(name: any): any;
    getMotionFile(name: any, n: any): any;
    getMotionSound(name: any, n: any): any;
    getMotionFadeIn(name: any, n: any): any;
    getMotionFadeOut(name: any, n: any): any;
    getInitParamID(n: any): any;
    getInitParamValue(n: any): any;
    getInitPartsVisibleNum(): any;
    getInitPartsVisibleID(n: any): any;
    getInitPartsVisibleValue(n: any): any;
}


================================================
FILE: build/cubism2/utils/ModelSettingJson.js
================================================
import { Live2DFramework } from '../Live2DFramework.js';
class ModelSettingJson {
    constructor() {
        this.NAME = 'name';
        this.ID = 'id';
        this.MODEL = 'model';
        this.TEXTURES = 'textures';
        this.HIT_AREAS = 'hit_areas';
        this.HIT_AREAS_CUSTOM = 'hit_areas_custom';
        this.PHYSICS = 'physics';
        this.POSE = 'pose';
        this.EXPRESSIONS = 'expressions';
        this.MOTION_GROUPS = 'motions';
        this.SOUND = 'sound';
        this.FADE_IN = 'fade_in';
        this.FADE_OUT = 'fade_out';
        this.LAYOUT = 'layout';
        this.INIT_PARAM = 'init_param';
        this.INIT_PARTS_VISIBLE = 'init_parts_visible';
        this.VALUE = 'val';
        this.FILE = 'file';
        this.json = {};
    }
    loadModelSetting(path, callback) {
        const pm = Live2DFramework.getPlatformManager();
        pm.loadBytes(path, buf => {
            const str = String.fromCharCode.apply(null, new Uint8Array(buf));
            this.json = JSON.parse(str);
            callback();
        });
    }
    getTextureFile(n) {
        if (this.json[this.TEXTURES] == null || this.json[this.TEXTURES][n] == null)
            return null;
        return this.json[this.TEXTURES][n];
    }
    getModelFile() {
        return this.json[this.MODEL];
    }
    getTextureNum() {
        if (this.json[this.TEXTURES] == null)
            return 0;
        return this.json[this.TEXTURES].length;
    }
    getHitAreaNum() {
        if (this.json[this.HIT_AREAS] == null)
            return 0;
        return this.json[this.HIT_AREAS].length;
    }
    getHitAreaCustom() {
        return this.json[this.HIT_AREAS_CUSTOM];
    }
    getHitAreaID(n) {
        if (this.json[this.HIT_AREAS] == null ||
            this.json[this.HIT_AREAS][n] == null)
            return null;
        return this.json[this.HIT_AREAS][n][this.ID];
    }
    getHitAreaName(n) {
        if (this.json[this.HIT_AREAS] == null ||
            this.json[this.HIT_AREAS][n] == null)
            return null;
        return this.json[this.HIT_AREAS][n][this.NAME];
    }
    getPhysicsFile() {
        return this.json[this.PHYSICS];
    }
    getPoseFile() {
        return this.json[this.POSE];
    }
    getExpressionNum() {
        return this.json[this.EXPRESSIONS] == null
            ? 0
            : this.json[this.EXPRESSIONS].length;
    }
    getExpressionFile(n) {
        if (this.json[this.EXPRESSIONS] == null)
            return null;
        return this.json[this.EXPRESSIONS][n][this.FILE];
    }
    getExpressionName(n) {
        if (this.json[this.EXPRESSIONS] == null)
            return null;
        return this.json[this.EXPRESSIONS][n][this.NAME];
    }
    getLayout() {
        return this.json[this.LAYOUT];
    }
    getInitParamNum() {
        return this.json[this.INIT_PARAM] == null
            ? 0
            : this.json[this.INIT_PARAM].length;
    }
    getMotionNum(name) {
        if (this.json[this.MOTION_GROUPS] == null ||
            this.json[this.MOTION_GROUPS][name] == null)
            return 0;
        return this.json[this.MOTION_GROUPS][name].length;
    }
    getMotionFile(name, n) {
        if (this.json[this.MOTION_GROUPS] == null ||
            this.json[this.MOTION_GROUPS][name] == null ||
            this.json[this.MOTION_GROUPS][name][n] == null)
            return null;
        return this.json[this.MOTION_GROUPS][name][n][this.FILE];
    }
    getMotionSound(name, n) {
        if (this.json[this.MOTION_GROUPS] == null ||
            this.json[this.MOTION_GROUPS][name] == null ||
            this.json[this.MOTION_GROUPS][name][n] == null ||
            this.json[this.MOTION_GROUPS][name][n][this.SOUND] == null)
            return null;
        return this.json[this.MOTION_GROUPS][name][n][this.SOUND];
    }
    getMotionFadeIn(name, n) {
        if (this.json[this.MOTION_GROUPS] == null ||
            this.json[this.MOTION_GROUPS][name] == null ||
            this.json[this.MOTION_GROUPS][name][n] == null ||
            this.json[this.MOTION_GROUPS][name][n][this.FADE_IN] == null)
            return 1000;
        return this.json[this.MOTION_GROUPS][name][n][this.FADE_IN];
    }
    getMotionFadeOut(name, n) {
        if (this.json[this.MOTION_GROUPS] == null ||
            this.json[this.MOTION_GROUPS][name] == null ||
            this.json[this.MOTION_GROUPS][name][n] == null ||
            this.json[this.MOTION_GROUPS][name][n][this.FADE_OUT] == null)
            return 1000;
        return this.json[this.MOTION_GROUPS][name][n][this.FADE_OUT];
    }
    getInitParamID(n) {
        if (this.json[this.INIT_PARAM] == null ||
            this.json[this.INIT_PARAM][n] == null)
            return null;
        return this.json[this.INIT_PARAM][n][this.ID];
    }
    getInitParamValue(n) {
        if (this.json[this.INIT_PARAM] == null ||
            this.json[this.INIT_PARAM][n] == null)
            return NaN;
        return this.json[this.INIT_PARAM][n][this.VALUE];
    }
    getInitPartsVisibleNum() {
        return this.json[this.INIT_PARTS_VISIBLE] == null
            ? 0
            : this.json[this.INIT_PARTS_VISIBLE].length;
    }
    getInitPartsVisibleID(n) {
        if (this.json[this.INIT_PARTS_VISIBLE] == null ||
            this.json[this.INIT_PARTS_VISIBLE][n] == null)
            return null;
        return this.json[this.INIT_PARTS_VISIBLE][n][this.ID];
    }
    getInitPartsVisibleValue(n) {
        if (this.json[this.INIT_PARTS_VISIBLE] == null ||
            this.json[this.INIT_PARTS_VISIBLE][n] == null)
            return NaN;
        return this.json[this.INIT_PARTS_VISIBLE][n][this.VALUE];
    }
}
export default ModelSettingJson;


================================================
FILE: build/cubism5/index.d.ts
================================================
export class AppDelegate extends LAppDelegate {
    _drawFrameId: number;
    stop(): void;
    transformOffset(e: any): {
        x: number;
        y: number;
    };
    onMouseMove(e: any): void;
    onMouseEnd(e: any): void;
    onTap(e: any): void;
    mouseMoveEventListener: any;
    mouseEndedEventListener: any;
    tapEventListener: any;
    changeModel(modelSettingPath: string): void;
    get subdelegates(): import("@framework/type/csmvector.js").csmVector<LAppSubdelegate>;
}
import { LAppDelegate } from '@demo/lappdelegate.js';
import { LAppSubdelegate } from '@demo/lappsubdelegate.js';


================================================
FILE: build/cubism5/index.js
================================================
import { LAppDelegate } from '@demo/lappdelegate.js';
import { LAppSubdelegate } from '@demo/lappsubdelegate.js';
import * as LAppDefine from '@demo/lappdefine.js';
import { LAppModel } from '@demo/lappmodel.js';
import { LAppPal } from '@demo/lapppal';
import logger from '../logger.js';
LAppPal.printMessage = () => { };
class AppSubdelegate extends LAppSubdelegate {
    initialize(canvas) {
        if (!this._glManager.initialize(canvas)) {
            return false;
        }
        this._canvas = canvas;
        if (LAppDefine.CanvasSize === 'auto') {
            this.resizeCanvas();
        }
        else {
            canvas.width = LAppDefine.CanvasSize.width;
            canvas.height = LAppDefine.CanvasSize.height;
        }
        this._textureManager.setGlManager(this._glManager);
        const gl = this._glManager.getGl();
        if (!this._frameBuffer) {
            this._frameBuffer = gl.getParameter(gl.FRAMEBUFFER_BINDING);
        }
        gl.enable(gl.BLEND);
        gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
        this._view.initialize(this);
        this._view._gear = {
            render: () => { },
            isHit: () => { },
            release: () => { }
        };
        this._view._back = {
            render: () => { },
            release: () => { }
        };
        this._live2dManager._subdelegate = this;
        this._resizeObserver = new window.ResizeObserver((entries, observer) => this.resizeObserverCallback.call(this, entries, observer));
        this._resizeObserver.observe(this._canvas);
        return true;
    }
    onResize() {
        this.resizeCanvas();
        this._view.initialize(this);
    }
    update() {
        if (this._glManager.getGl().isContextLost()) {
            return;
        }
        if (this._needResize) {
            this.onResize();
            this._needResize = false;
        }
        const gl = this._glManager.getGl();
        gl.clearColor(0.0, 0.0, 0.0, 0.0);
        gl.enable(gl.DEPTH_TEST);
        gl.depthFunc(gl.LEQUAL);
        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
        gl.clearDepth(1.0);
        gl.enable(gl.BLEND);
        gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
        this._view.render();
    }
}
export class AppDelegate extends LAppDelegate {
    run() {
        const loop = () => {
            LAppPal.updateTime();
            for (let i = 0; i < this._subdelegates.getSize(); i++) {
                this._subdelegates.at(i).update();
            }
            this._drawFrameId = window.requestAnimationFrame(loop);
        };
        loop();
    }
    stop() {
        if (this._drawFrameId) {
            window.cancelAnimationFrame(this._drawFrameId);
            this._drawFrameId = null;
        }
    }
    release() {
        this.stop();
        this.releaseEventListener();
        this._subdelegates.clear();
        this._cubismOption = null;
    }
    transformOffset(e) {
        const subdelegate = this._subdelegates.at(0);
        const rect = subdelegate.getCanvas().getBoundingClientRect();
        const localX = e.pageX - rect.left;
        const localY = e.pageY - rect.top;
        const posX = localX * window.devicePixelRatio;
        const posY = localY * window.devicePixelRatio;
        const x = subdelegate._view.transformViewX(posX);
        const y = subdelegate._view.transformViewY(posY);
        return {
            x, y
        };
    }
    onMouseMove(e) {
        const lapplive2dmanager = this._subdelegates.at(0).getLive2DManager();
        const { x, y } = this.transformOffset(e);
        const model = lapplive2dmanager._models.at(0);
        lapplive2dmanager.onDrag(x, y);
        lapplive2dmanager.onTap(x, y);
        if (model.hitTest(LAppDefine.HitAreaNameBody, x, y)) {
            window.dispatchEvent(new Event('live2d:hoverbody'));
        }
    }
    onMouseEnd(e) {
        const lapplive2dmanager = this._subdelegates.at(0).getLive2DManager();
        const { x, y } = this.transformOffset(e);
        lapplive2dmanager.onDrag(0.0, 0.0);
        lapplive2dmanager.onTap(x, y);
    }
    onTap(e) {
        const lapplive2dmanager = this._subdelegates.at(0).getLive2DManager();
        const { x, y } = this.transformOffset(e);
        const model = lapplive2dmanager._models.at(0);
        if (model.hitTest(LAppDefine.HitAreaNameBody, x, y)) {
            window.dispatchEvent(new Event('live2d:tapbody'));
        }
    }
    initializeEventListener() {
        this.mouseMoveEventListener = this.onMouseMove.bind(this);
        this.mouseEndedEventListener = this.onMouseEnd.bind(this);
        this.tapEventListener = this.onTap.bind(this);
        document.addEventListener('mousemove', this.mouseMoveEventListener, {
            passive: true
        });
        document.addEventListener('mouseout', this.mouseEndedEventListener, {
            passive: true
        });
        document.addEventListener('pointerdown', this.tapEventListener, {
            passive: true
        });
    }
    releaseEventListener() {
        document.removeEventListener('mousemove', this.mouseMoveEventListener, {
            passive: true
        });
        this.mouseMoveEventListener = null;
        document.removeEventListener('mouseout', this.mouseEndedEventListener, {
            passive: true
        });
        this.mouseEndedEventListener = null;
        document.removeEventListener('pointerdown', this.tapEventListener, {
            passive: true
        });
    }
    initializeSubdelegates() {
        this._canvases.prepareCapacity(LAppDefine.CanvasNum);
        this._subdelegates.prepareCapacity(LAppDefine.CanvasNum);
        const canvas = document.getElementById('live2d');
        this._canvases.pushBack(canvas);
        canvas.style.width = canvas.width;
        canvas.style.height = canvas.height;
        for (let i = 0; i < this._canvases.getSize(); i++) {
            const subdelegate = new AppSubdelegate();
            const result = subdelegate.initialize(this._canvases.at(i));
            if (!result) {
                logger.error('Failed to initialize AppSubdelegate');
                return;
            }
            this._subdelegates.pushBack(subdelegate);
        }
        for (let i = 0; i < LAppDefine.CanvasNum; i++) {
            if (this._subdelegates.at(i).isContextLost()) {
                logger.error(`The context for Canvas at index ${i} was lost, possibly because the acquisition limit for WebGLRenderingContext was reached.`);
            }
        }
    }
    changeModel(modelSettingPath) {
        const segments = modelSettingPath.split('/');
        const modelJsonName = segments.pop();
        const modelPath = segments.join('/') + '/';
        const live2dManager = this._subdelegates.at(0).getLive2DManager();
        live2dManager.releaseAllModel();
        const instance = new LAppModel();
        instance.setSubdelegate(live2dManager._subdelegate);
        instance.loadAssets(modelPath, modelJsonName);
        live2dManager._models.pushBack(instance);
    }
    get subdelegates() {
        return this._subdelegates;
    }
}


================================================
FILE: build/drag.d.ts
================================================
declare function registerDrag(): void;
export default registerDrag;


================================================
FILE: build/drag.js
================================================
function registerDrag() {
    const element = document.getElementById('waifu');
    if (!element)
        return;
    let winWidth = window.innerWidth, winHeight = window.innerHeight;
    const imgWidth = element.offsetWidth, imgHeight = element.offsetHeight;
    element.addEventListener('mousedown', event => {
        if (event.button === 2) {
            return;
        }
        const canvas = document.getElementById('live2d');
        if (event.target !== canvas)
            return;
        event.preventDefault();
        const _offsetX = event.offsetX, _offsetY = event.offsetY;
        document.onmousemove = event => {
            const _x = event.clientX, _y = event.clientY;
            let _left = _x - _offsetX, _top = _y - _offsetY;
            if (_top < 0) {
                _top = 0;
            }
            else if (_top >= winHeight - imgHeight) {
                _top = winHeight - imgHeight;
            }
            if (_left < 0) {
                _left = 0;
            }
            else if (_left >= winWidth - imgWidth) {
                _left = winWidth - imgWidth;
            }
            element.style.top = _top + 'px';
            element.style.left = _left + 'px';
        };
        document.onmouseup = () => {
            document.onmousemove = null;
        };
    });
    window.onresize = () => {
        winWidth = window.innerWidth;
        winHeight = window.innerHeight;
    };
}
export default registerDrag;


================================================
FILE: build/icons.d.ts
================================================
declare const fa_comment = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d=\"M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z\"/></svg>";
declare const fa_paper_plane = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d=\"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z\"/></svg>";
declare const fa_street_view = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d=\"M320 64A64 64 0 1 0 192 64a64 64 0 1 0 128 0zm-96 96c-35.3 0-64 28.7-64 64l0 48c0 17.7 14.3 32 32 32l1.8 0 11.1 99.5c1.8 16.2 15.5 28.5 31.8 28.5l38.7 0c16.3 0 30-12.3 31.8-28.5L318.2 304l1.8 0c17.7 0 32-14.3 32-32l0-48c0-35.3-28.7-64-64-64l-64 0zM132.3 394.2c13-2.4 21.7-14.9 19.3-27.9s-14.9-21.7-27.9-19.3c-32.4 5.9-60.9 14.2-82 24.8c-10.5 5.3-20.3 11.7-27.8 19.6C6.4 399.5 0 410.5 0 424c0 21.4 15.5 36.1 29.1 45c14.7 9.6 34.3 17.3 56.4 23.4C130.2 504.7 190.4 512 256 512s125.8-7.3 170.4-19.6c22.1-6.1 41.8-13.8 56.4-23.4c13.7-8.9 29.1-23.6 29.1-45c0-13.5-6.4-24.5-14-32.6c-7.5-7.9-17.3-14.3-27.8-19.6c-21-10.6-49.5-18.9-82-24.8c-13-2.4-25.5 6.3-27.9 19.3s6.3 25.5 19.3 27.9c30.2 5.5 53.7 12.8 69 20.5c3.2 1.6 5.8 3.1 7.9 4.5c3.6 2.4 3.6 7.2 0 9.6c-8.8 5.7-23.1 11.8-43 17.3C374.3 457 318.5 464 256 464s-118.3-7-157.7-17.9c-19.9-5.5-34.2-11.6-43-17.3c-3.6-2.4-3.6-7.2 0-9.6c2.1-1.4 4.8-2.9 7.9-4.5c15.3-7.7 38.8-14.9 69-20.5z\"/></svg>";
declare const fa_shirt = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d=\"M211.8 0c7.8 0 14.3 5.7 16.7 13.2C240.8 51.9 277.1 80 320 80s79.2-28.1 91.5-66.8C413.9 5.7 420.4 0 428.2 0l12.6 0c22.5 0 44.2 7.9 61.5 22.3L628.5 127.4c6.6 5.5 10.7 13.5 11.4 22.1s-2.1 17.1-7.8 23.6l-56 64c-11.4 13.1-31.2 14.6-44.6 3.5L480 197.7 480 448c0 35.3-28.7 64-64 64l-192 0c-35.3 0-64-28.7-64-64l0-250.3-51.5 42.9c-13.3 11.1-33.1 9.6-44.6-3.5l-56-64c-5.7-6.5-8.5-15-7.8-23.6s4.8-16.6 11.4-22.1L137.7 22.3C155 7.9 176.7 0 199.2 0l12.6 0z\"/></svg>";
declare const fa_camera_retro = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d=\"M220.6 121.2L271.1 96 448 96l0 96-114.8 0c-21.9-15.1-48.5-24-77.2-24s-55.2 8.9-77.2 24L64 192l0-64 128 0c9.9 0 19.7-2.3 28.6-6.8zM0 128L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L271.1 32c-9.9 0-19.7 2.3-28.6 6.8L192 64l-32 0 0-16c0-8.8-7.2-16-16-16L80 32c-8.8 0-16 7.2-16 16l0 16C28.7 64 0 92.7 0 128zM168 304a88 88 0 1 1 176 0 88 88 0 1 1 -176 0z\"/></svg>";
declare const fa_info_circle = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\"/></svg>";
declare const fa_xmark = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/></svg>";
declare const fa_child = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d=\"M96 64a64 64 0 1 1 128 0A64 64 0 1 1 96 64zm48 320l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-192.2L59.1 321c-9.4 15-29.2 19.4-44.1 10S-4.5 301.9 4.9 287l39.9-63.3C69.7 184 113.2 160 160 160s90.3 24 115.2 63.6L315.1 287c9.4 15 4.9 34.7-10 44.1s-34.7 4.9-44.1-10L240 287.8 240 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-32 0z\"/></svg>";
export { fa_comment, fa_paper_plane, fa_street_view, fa_shirt, fa_camera_retro, fa_info_circle, fa_xmark, fa_child };


================================================
FILE: build/icons.js
================================================
const fa_comment = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"/></svg>';
const fa_paper_plane = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"/></svg>';
const fa_street_view = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M320 64A64 64 0 1 0 192 64a64 64 0 1 0 128 0zm-96 96c-35.3 0-64 28.7-64 64l0 48c0 17.7 14.3 32 32 32l1.8 0 11.1 99.5c1.8 16.2 15.5 28.5 31.8 28.5l38.7 0c16.3 0 30-12.3 31.8-28.5L318.2 304l1.8 0c17.7 0 32-14.3 32-32l0-48c0-35.3-28.7-64-64-64l-64 0zM132.3 394.2c13-2.4 21.7-14.9 19.3-27.9s-14.9-21.7-27.9-19.3c-32.4 5.9-60.9 14.2-82 24.8c-10.5 5.3-20.3 11.7-27.8 19.6C6.4 399.5 0 410.5 0 424c0 21.4 15.5 36.1 29.1 45c14.7 9.6 34.3 17.3 56.4 23.4C130.2 504.7 190.4 512 256 512s125.8-7.3 170.4-19.6c22.1-6.1 41.8-13.8 56.4-23.4c13.7-8.9 29.1-23.6 29.1-45c0-13.5-6.4-24.5-14-32.6c-7.5-7.9-17.3-14.3-27.8-19.6c-21-10.6-49.5-18.9-82-24.8c-13-2.4-25.5 6.3-27.9 19.3s6.3 25.5 19.3 27.9c30.2 5.5 53.7 12.8 69 20.5c3.2 1.6 5.8 3.1 7.9 4.5c3.6 2.4 3.6 7.2 0 9.6c-8.8 5.7-23.1 11.8-43 17.3C374.3 457 318.5 464 256 464s-118.3-7-157.7-17.9c-19.9-5.5-34.2-11.6-43-17.3c-3.6-2.4-3.6-7.2 0-9.6c2.1-1.4 4.8-2.9 7.9-4.5c15.3-7.7 38.8-14.9 69-20.5z"/></svg>';
const fa_shirt = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M211.8 0c7.8 0 14.3 5.7 16.7 13.2C240.8 51.9 277.1 80 320 80s79.2-28.1 91.5-66.8C413.9 5.7 420.4 0 428.2 0l12.6 0c22.5 0 44.2 7.9 61.5 22.3L628.5 127.4c6.6 5.5 10.7 13.5 11.4 22.1s-2.1 17.1-7.8 23.6l-56 64c-11.4 13.1-31.2 14.6-44.6 3.5L480 197.7 480 448c0 35.3-28.7 64-64 64l-192 0c-35.3 0-64-28.7-64-64l0-250.3-51.5 42.9c-13.3 11.1-33.1 9.6-44.6-3.5l-56-64c-5.7-6.5-8.5-15-7.8-23.6s4.8-16.6 11.4-22.1L137.7 22.3C155 7.9 176.7 0 199.2 0l12.6 0z"/></svg>';
const fa_camera_retro = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M220.6 121.2L271.1 96 448 96l0 96-114.8 0c-21.9-15.1-48.5-24-77.2-24s-55.2 8.9-77.2 24L64 192l0-64 128 0c9.9 0 19.7-2.3 28.6-6.8zM0 128L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L271.1 32c-9.9 0-19.7 2.3-28.6 6.8L192 64l-32 0 0-16c0-8.8-7.2-16-16-16L80 32c-8.8 0-16 7.2-16 16l0 16C28.7 64 0 92.7 0 128zM168 304a88 88 0 1 1 176 0 88 88 0 1 1 -176 0z"/></svg>';
const fa_info_circle = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>';
const fa_xmark = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>';
const fa_child = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M96 64a64 64 0 1 1 128 0A64 64 0 1 1 96 64zm48 320l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-192.2L59.1 321c-9.4 15-29.2 19.4-44.1 10S-4.5 301.9 4.9 287l39.9-63.3C69.7 184 113.2 160 160 160s90.3 24 115.2 63.6L315.1 287c9.4 15 4.9 34.7-10 44.1s-34.7 4.9-44.1-10L240 287.8 240 480c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-32 0z"/></svg>';
export { fa_comment, fa_paper_plane, fa_street_view, fa_shirt, fa_camera_retro, fa_info_circle, fa_xmark, fa_child };


================================================
FILE: build/index.d.ts
================================================
export { default as registerDrag } from './drag.js';
export { default as logger, LogLevel } from './logger.js';
export { default as Cubism2Model } from './cubism2/index.js';
export * from './tools.js';
export * from './message.js';
export * from './model.js';
export * from './utils.js';
export * from './widget.js';


================================================
FILE: build/index.js
================================================
export { default as registerDrag } from './drag.js';
export { default as logger } from './logger.js';
export { default as Cubism2Model } from './cubism2/index.js';
export * from './tools.js';
export * from './message.js';
export * from './model.js';
export * from './utils.js';
export * from './widget.js';


================================================
FILE: build/logger.d.ts
================================================
type LogLevel = 'error' | 'warn' | 'info' | 'trace';
declare class Logger {
    private static levelOrder;
    private level;
    constructor(level?: LogLevel);
    setLevel(level: LogLevel | undefined): void;
    private shouldLog;
    error(message: string, ...args: any[]): void;
    warn(message: string, ...args: any[]): void;
    info(message: string, ...args: any[]): void;
    trace(message: string, ...args: any[]): void;
}
declare const logger: Logger;
export default logger;
export { LogLevel };


================================================
FILE: build/logger.js
================================================
class Logger {
    constructor(level = 'info') {
        this.level = level;
    }
    setLevel(level) {
        if (!level)
            return;
        this.level = level;
    }
    shouldLog(level) {
        return Logger.levelOrder[level] <= Logger.levelOrder[this.level];
    }
    error(message, ...args) {
        if (this.shouldLog('error')) {
            console.error('[Live2D Widget][ERROR]', message, ...args);
        }
    }
    warn(message, ...args) {
        if (this.shouldLog('warn')) {
            console.warn('[Live2D Widget][WARN]', message, ...args);
        }
    }
    info(message, ...args) {
        if (this.shouldLog('info')) {
            console.log('[Live2D Widget][INFO]', message, ...args);
        }
    }
    trace(message, ...args) {
        if (this.shouldLog('trace')) {
            console.log('[Live2D Widget][TRACE]', message, ...args);
        }
    }
}
Logger.levelOrder = {
    error: 0,
    warn: 1,
    info: 2,
    trace: 3,
};
const logger = new Logger();
export default logger;


================================================
FILE: build/message.d.ts
================================================
type Time = {
    hour: string;
    text: string;
}[];
declare function showMessage(text: string | string[], timeout: number, priority: number, override?: boolean): void;
declare function welcomeMessage(time: Time, welcomeTemplate?: string, referrerTemplate?: string): string;
declare function i18n(template: string, ...args: string[]): string;
export { showMessage, welcomeMessage, i18n, Time };


================================================
FILE: build/message.js
================================================
import { randomSelection } from './utils.js';
let messageTimer = null;
function showMessage(text, timeout, priority, override = true) {
    let currentPriority = parseInt(sessionStorage.getItem('waifu-message-priority'), 10);
    if (isNaN(currentPriority)) {
        currentPriority = 0;
    }
    if (!text ||
        (override && currentPriority > priority) ||
        (!override && currentPriority >= priority))
        return;
    if (messageTimer) {
        clearTimeout(messageTimer);
        messageTimer = null;
    }
    text = randomSelection(text);
    sessionStorage.setItem('waifu-message-priority', String(priority));
    const tips = document.getElementById('waifu-tips');
    tips.innerHTML = text;
    tips.classList.add('waifu-tips-active');
    messageTimer = setTimeout(() => {
        sessionStorage.removeItem('waifu-message-priority');
        tips.classList.remove('waifu-tips-active');
    }, timeout);
}
function welcomeMessage(time, welcomeTemplate, referrerTemplate) {
    if (location.pathname === '/') {
        for (const { hour, text } of time) {
            const now = new Date(), after = hour.split('-')[0], before = hour.split('-')[1] || after;
            if (Number(after) <= now.getHours() &&
                now.getHours() <= Number(before)) {
                return text;
            }
        }
    }
    if (!welcomeTemplate)
        return '';
    const text = i18n(welcomeTemplate, document.title);
    if (document.referrer === '' || !referrerTemplate)
        return text;
    const referrer = new URL(document.referrer);
    if (location.hostname === referrer.hostname)
        return text;
    return `${i18n(referrerTemplate, referrer.hostname)}<br>${text}`;
}
function i18n(template, ...args) {
    return template.replace(/\$(\d+)/g, (_, idx) => {
        var _b;
        const i = parseInt(idx, 10) - 1;
        return (_b = args[i]) !== null && _b !== void 0 ? _b : '';
    });
}
export { showMessage, welcomeMessage, i18n };


================================================
FILE: build/model.d.ts
================================================
import { LogLevel } from './logger.js';
interface ModelList {
    name: string;
    paths: string[];
    message: string;
}
interface Config {
    waifuPath: string;
    apiPath?: string;
    cdnPath?: string;
    cubism2Path?: string;
    cubism5Path?: string;
    modelId?: number;
    tools?: string[];
    drag?: boolean;
    logLevel?: LogLevel;
}
declare class ModelManager {
    readonly useCDN: boolean;
    private readonly cdnPath;
    private readonly cubism2Path;
    private readonly cubism5Path;
    private _modelId;
    private _modelTexturesId;
    private modelList;
    private cubism2model;
    private cubism5model;
    private currentModelVersion;
    private loading;
    private modelJSONCache;
    private models;
    private constructor();
    static initCheck(config: Config, models?: ModelList[]): Promise<ModelManager>;
    set modelId(modelId: number);
    get modelId(): number;
    set modelTexturesId(modelTexturesId: number);
    get modelTexturesId(): number;
    resetCanvas(): void;
    fetchWithCache(url: string): Promise<any>;
    checkModelVersion(modelSetting: any): 2 | 3;
    loadLive2D(modelSettingPath: string, modelSetting: object): Promise<void>;
    loadTextureCache(modelName: string): Promise<any[]>;
    loadModel(message: string | string[]): Promise<void>;
    loadRandTexture(successMessage?: string | string[], failMessage?: string | string[]): Promise<void>;
    loadNextModel(): Promise<void>;
}
export { ModelManager, Config, ModelList };


================================================
FILE: build/model.js
================================================
import { showMessage } from './message.js';
import { loadExternalResource, randomOtherOption } from './utils.js';
import logger from './logger.js';
class ModelManager {
    constructor(config, models = []) {
        var _b;
        this.modelList = null;
        let { apiPath, cdnPath } = config;
        const { cubism2Path, cubism5Path } = config;
        let useCDN = false;
        if (typeof cdnPath === 'string') {
            if (!cdnPath.endsWith('/'))
                cdnPath += '/';
            useCDN = true;
        }
        else if (typeof apiPath === 'string') {
            if (!apiPath.endsWith('/'))
                apiPath += '/';
            cdnPath = apiPath;
            useCDN = true;
            logger.warn('apiPath option is deprecated. Please use cdnPath instead.');
        }
        else if (!models.length) {
            throw 'Invalid initWidget argument!';
        }
        let modelId = parseInt(localStorage.getItem('modelId'), 10);
        let modelTexturesId = parseInt(localStorage.getItem('modelTexturesId'), 10);
        if (isNaN(modelId) || isNaN(modelTexturesId)) {
            modelTexturesId = 0;
        }
        if (isNaN(modelId)) {
            modelId = (_b = config.modelId) !== null && _b !== void 0 ? _b : 0;
        }
        this.useCDN = useCDN;
        this.cdnPath = cdnPath || '';
        this.cubism2Path = cubism2Path || '';
        this.cubism5Path = cubism5Path || '';
        this._modelId = modelId;
        this._modelTexturesId = modelTexturesId;
        this.currentModelVersion = 0;
        this.loading = false;
        this.modelJSONCache = {};
        this.models = models;
    }
    static async initCheck(config, models = []) {
        const model = new ModelManager(config, models);
        if (model.useCDN) {
            const response = await fetch(`${model.cdnPath}model_list.json`);
            model.modelList = await response.json();
            if (model.modelId >= model.modelList.models.length) {
                model.modelId = 0;
            }
            const modelName = model.modelList.models[model.modelId];
            if (Array.isArray(modelName)) {
                if (model.modelTexturesId >= modelName.length) {
                    model.modelTexturesId = 0;
                }
            }
            else {
                const modelSettingPath = `${model.cdnPath}model/${modelName}/index.json`;
                const modelSetting = await model.fetchWithCache(modelSettingPath);
                const version = model.checkModelVersion(modelSetting);
                if (version === 2) {
                    const textureCache = await model.loadTextureCache(modelName);
                    if (model.modelTexturesId >= textureCache.length) {
                        model.modelTexturesId = 0;
                    }
                }
            }
        }
        else {
            if (model.modelId >= model.models.length) {
                model.modelId = 0;
            }
            if (model.modelTexturesId >= model.models[model.modelId].paths.length) {
                model.modelTexturesId = 0;
            }
        }
        return model;
    }
    set modelId(modelId) {
        this._modelId = modelId;
        localStorage.setItem('modelId', modelId.toString());
    }
    get modelId() {
        return this._modelId;
    }
    set modelTexturesId(modelTexturesId) {
        this._modelTexturesId = modelTexturesId;
        localStorage.setItem('modelTexturesId', modelTexturesId.toString());
    }
    get modelTexturesId() {
        return this._modelTexturesId;
    }
    resetCanvas() {
        document.getElementById('waifu-canvas').innerHTML = '<canvas id="live2d" width="800" height="800"></canvas>';
    }
    async fetchWithCache(url) {
        let result;
        if (url in this.modelJSONCache) {
            result = this.modelJSONCache[url];
        }
        else {
            try {
                const response = await fetch(url);
                result = await response.json();
            }
            catch (_b) {
                result = null;
            }
            this.modelJSONCache[url] = result;
        }
        return result;
    }
    checkModelVersion(modelSetting) {
        if (modelSetting.Version === 3 || modelSetting.FileReferences) {
            return 3;
        }
        return 2;
    }
    async loadLive2D(modelSettingPath, modelSetting) {
        if (this.loading) {
            logger.warn('Still loading. Abort.');
            return;
        }
        this.loading = true;
        try {
            const version = this.checkModelVersion(modelSetting);
            if (version === 2) {
                if (!this.cubism2model) {
                    if (!this.cubism2Path) {
                        logger.error('No cubism2Path set, cannot load Cubism 2 Core.');
                        return;
                    }
                    await loadExternalResource(this.cubism2Path, 'js');
                    const { default: Cubism2Model } = await import('./cubism2/index.js');
                    this.cubism2model = new Cubism2Model();
                }
                if (this.currentModelVersion === 3) {
                    this.cubism5model.release();
                    this.resetCanvas();
                }
                if (this.currentModelVersion === 3 || !this.cubism2model.gl) {
                    await this.cubism2model.init('live2d', modelSettingPath, modelSetting);
                }
                else {
                    await this.cubism2model.changeModelWithJSON(modelSettingPath, modelSetting);
                }
            }
            else {
                if (!this.cubism5Path) {
                    logger.error('No cubism5Path set, cannot load Cubism 5 Core.');
                    return;
                }
                await loadExternalResource(this.cubism5Path, 'js');
                const { AppDelegate: Cubism5Model } = await import('./cubism5/index.js');
                this.cubism5model = new Cubism5Model();
                if (this.currentModelVersion === 2) {
                    this.cubism2model.destroy();
                    this.resetCanvas();
                }
                if (this.currentModelVersion === 2 || !this.cubism5model.subdelegates.at(0)) {
                    this.cubism5model.initialize();
                    this.cubism5model.changeModel(modelSettingPath);
                    this.cubism5model.run();
                }
                else {
                    this.cubism5model.changeModel(modelSettingPath);
                }
            }
            logger.info(`Model ${modelSettingPath} (Cubism version ${version}) loaded`);
            this.currentModelVersion = version;
        }
        catch (err) {
            console.error('loadLive2D failed', err);
        }
        this.loading = false;
    }
    async loadTextureCache(modelName) {
        const textureCache = await this.fetchWithCache(`${this.cdnPath}model/${modelName}/textures.cache`);
        return textureCache || [];
    }
    async loadModel(message) {
        let modelSettingPath, modelSetting;
        if (this.useCDN) {
            let modelName = this.modelList.models[this.modelId];
            if (Array.isArray(modelName)) {
                modelName = modelName[this.modelTexturesId];
            }
            modelSettingPath = `${this.cdnPath}model/${modelName}/index.json`;
            modelSetting = await this.fetchWithCache(modelSettingPath);
            const version = this.checkModelVersion(modelSetting);
            if (version === 2) {
                const textureCache = await this.loadTextureCache(modelName);
                if (textureCache.length > 0) {
                    let textures = textureCache[this.modelTexturesId];
                    if (typeof textures === 'string')
                        textures = [textures];
                    modelSetting.textures = textures;
                }
            }
        }
        else {
            modelSettingPath = this.models[this.modelId].paths[this.modelTexturesId];
            modelSetting = await this.fetchWithCache(modelSettingPath);
        }
        await this.loadLive2D(modelSettingPath, modelSetting);
        showMessage(message, 4000, 10);
    }
    async loadRandTexture(successMessage = '', failMessage = '') {
        const { modelId } = this;
        let noTextureAvailable = false;
        if (this.useCDN) {
            const modelName = this.modelList.models[modelId];
            if (Array.isArray(modelName)) {
                this.modelTexturesId = randomOtherOption(modelName.length, this.modelTexturesId);
            }
            else {
                const modelSettingPath = `${this.cdnPath}model/${modelName}/index.json`;
                const modelSetting = await this.fetchWithCache(modelSettingPath);
                const version = this.checkModelVersion(modelSetting);
                if (version === 2) {
                    const textureCache = await this.loadTextureCache(modelName);
                    if (textureCache.length <= 1) {
                        noTextureAvailable = true;
                    }
                    else {
                        this.modelTexturesId = randomOtherOption(textureCache.length, this.modelTexturesId);
                    }
                }
                else {
                    noTextureAvailable = true;
                }
            }
        }
        else {
            if (this.models[modelId].paths.length === 1) {
                noTextureAvailable = true;
            }
            else {
                this.modelTexturesId = randomOtherOption(this.models[modelId].paths.length, this.modelTexturesId);
            }
        }
        if (noTextureAvailable) {
            showMessage(failMessage, 4000, 10);
        }
        else {
            await this.loadModel(successMessage);
        }
    }
    async loadNextModel() {
        this.modelTexturesId = 0;
        if (this.useCDN) {
            this.modelId = (this.modelId + 1) % this.modelList.models.length;
            await this.loadModel(this.modelList.messages[this.modelId]);
        }
        else {
            this.modelId = (this.modelId + 1) % this.models.length;
            await this.loadModel(this.models[this.modelId].message);
        }
    }
}
export { ModelManager };


================================================
FILE: build/tools.d.ts
================================================
import type { Config, ModelManager } from './model.js';
import type { Tips } from './widget.js';
interface Tools {
    [key: string]: {
        icon: string;
        callback: (message: any) => void;
    };
}
declare class ToolsManager {
    tools: Tools;
    config: Config;
    constructor(model: ModelManager, config: Config, tips: Tips);
    registerTools(): void;
}
export { ToolsManager, Tools };


================================================
FILE: build/tools.js
================================================
import { fa_comment, fa_paper_plane, fa_street_view, fa_shirt, fa_camera_retro, fa_info_circle, fa_xmark } from './icons.js';
import { showMessage, i18n } from './message.js';
class ToolsManager {
    constructor(model, config, tips) {
        this.config = config;
        this.tools = {
            hitokoto: {
                icon: fa_comment,
                callback: async () => {
                    const response = await fetch('https://v1.hitokoto.cn');
                    const result = await response.json();
                    const template = tips.message.hitokoto;
                    const text = i18n(template, result.from, result.creator);
                    showMessage(result.hitokoto, 6000, 9);
                    setTimeout(() => {
                        showMessage(text, 4000, 9);
                    }, 6000);
                }
            },
            asteroids: {
                icon: fa_paper_plane,
                callback: () => {
                    if (window.Asteroids) {
                        if (!window.ASTEROIDSPLAYERS)
                            window.ASTEROIDSPLAYERS = [];
                        window.ASTEROIDSPLAYERS.push(new window.Asteroids());
                    }
                    else {
                        const script = document.createElement('script');
                        script.src =
                            'https://fastly.jsdelivr.net/gh/stevenjoezhang/asteroids/asteroids.js';
                        document.head.appendChild(script);
                    }
                }
            },
            'switch-model': {
                icon: fa_street_view,
                callback: () => model.loadNextModel()
            },
            'switch-texture': {
                icon: fa_shirt,
                callback: () => {
                    let successMessage = '', failMessage = '';
                    if (tips) {
                        successMessage = tips.message.changeSuccess;
                        failMessage = tips.message.changeFail;
                    }
                    model.loadRandTexture(successMessage, failMessage);
                }
            },
            photo: {
                icon: fa_camera_retro,
                callback: () => {
                    const message = tips.message.photo;
                    showMessage(message, 6000, 9);
                    const canvas = document.getElementById('live2d');
                    if (!canvas)
                        return;
                    const imageUrl = canvas.toDataURL();
                    const link = document.createElement('a');
                    link.style.display = 'none';
                    link.href = imageUrl;
                    link.download = 'live2d-photo.png';
                    document.body.appendChild(link);
                    link.click();
                    document.body.removeChild(link);
                }
            },
            info: {
                icon: fa_info_circle,
                callback: () => {
                    open('https://github.com/stevenjoezhang/live2d-widget');
                }
            },
            quit: {
                icon: fa_xmark,
                callback: () => {
                    localStorage.setItem('waifu-display', Date.now().toString());
                    const message = tips.message.goodbye;
                    showMessage(message, 2000, 11);
                    const waifu = document.getElementById('waifu');
                    if (!waifu)
                        return;
                    waifu.classList.remove('waifu-active');
                    setTimeout(() => {
                        waifu.classList.add('waifu-hidden');
                        const waifuToggle = document.getElementById('waifu-toggle');
                        waifuToggle === null || waifuToggle === void 0 ? void 0 : waifuToggle.classList.add('waifu-toggle-active');
                    }, 3000);
                }
            }
        };
    }
    registerTools() {
        var _b;
        if (!Array.isArray(this.config.tools)) {
            this.config.tools = Object.keys(this.tools);
        }
        for (const toolName of this.config.tools) {
            if (this.tools[toolName]) {
                const { icon, callback } = this.tools[toolName];
                const element = document.createElement('span');
                element.id = `waifu-tool-${toolName}`;
                element.innerHTML = icon;
                (_b = document
                    .getElementById('waifu-tool')) === null || _b === void 0 ? void 0 : _b.insertAdjacentElement('beforeend', element);
                element.addEventListener('click', callback);
            }
        }
    }
}
export { ToolsManager };


================================================
FILE: build/utils.d.ts
================================================
declare function randomSelection(obj: string[] | string): string;
declare function randomOtherOption(total: number, excludeIndex: number): number;
declare function loadExternalResource(url: string, type: string): Promise<string>;
export { randomSelection, loadExternalResource, randomOtherOption };


================================================
FILE: build/utils.js
================================================
function randomSelection(obj) {
    return Array.isArray(obj) ? obj[Math.floor(Math.random() * obj.length)] : obj;
}
function randomOtherOption(total, excludeIndex) {
    const idx = Math.floor(Math.random() * (total - 1));
    return idx >= excludeIndex ? idx + 1 : idx;
}
function loadExternalResource(url, type) {
    return new Promise((resolve, reject) => {
        let tag;
        if (type === 'css') {
            tag = document.createElement('link');
            tag.rel = 'stylesheet';
            tag.href = url;
        }
        else if (type === 'js') {
            tag = document.createElement('script');
            tag.src = url;
        }
        if (tag) {
            tag.onload = () => resolve(url);
            tag.onerror = () => reject(url);
            document.head.appendChild(tag);
        }
    });
}
export { randomSelection, loadExternalResource, randomOtherOption };


================================================
FILE: build/waifu-tips.d.ts
================================================
export {};


================================================
FILE: build/waifu-tips.js
================================================
import { initWidget } from './widget.js';
window.initWidget = initWidget;


================================================
FILE: build/widget.d.ts
================================================
import { Config, ModelList } from './model.js';
import { Time } from './message.js';
interface Tips {
    message: {
        default: string[];
        console: string;
        copy: string;
        visibilitychange: string;
        changeSuccess: string;
        changeFail: string;
        photo: string;
        goodbye: string;
        hitokoto: string;
        welcome: string;
        referrer: string;
        hoverBody: string | string[];
        tapBody: string | string[];
    };
    time: Time;
    mouseover: {
        selector: string;
        text: string | string[];
    }[];
    click: {
        selector: string;
        text: string | string[];
    }[];
    seasons: {
        date: string;
        text: string | string[];
    }[];
    models: ModelList[];
}
declare function initWidget(config: string | Config): void;
export { initWidget, Tips };


================================================
FILE: build/widget.js
================================================
import { ModelManager } from './model.js';
import { showMessage, welcomeMessage } from './message.js';
import { randomSelection } from './utils.js';
import { ToolsManager } from './tools.js';
import logger from './logger.js';
import registerDrag from './drag.js';
import { fa_child } from './icons.js';
function registerEventListener(tips) {
    let userAction = false;
    let userActionTimer;
    const messageArray = tips.message.default;
    tips.seasons.forEach(({ date, text }) => {
        const now = new Date(), after = date.split('-')[0], before = date.split('-')[1] || after;
        if (Number(after.split('/')[0]) <= now.getMonth() + 1 &&
            now.getMonth() + 1 <= Number(before.split('/')[0]) &&
            Number(after.split('/')[1]) <= now.getDate() &&
            now.getDate() <= Number(before.split('/')[1])) {
            text = randomSelection(text);
            text = text.replace('{year}', String(now.getFullYear()));
            messageArray.push(text);
        }
    });
    let lastHoverElement;
    window.addEventListener('mousemove', () => (userAction = true));
    window.addEventListener('keydown', () => (userAction = true));
    setInterval(() => {
        if (userAction) {
            userAction = false;
            clearInterval(userActionTimer);
            userActionTimer = null;
        }
        else if (!userActionTimer) {
            userActionTimer = setInterval(() => {
                showMessage(messageArray, 6000, 9);
            }, 20000);
        }
    }, 1000);
    window.addEventListener('mouseover', (event) => {
        var _b;
        for (let { selector, text } of tips.mouseover) {
            if (!((_b = event.target) === null || _b === void 0 ? void 0 : _b.closest(selector)))
                continue;
            if (lastHoverElement === selector)
                return;
            lastHoverElement = selector;
            text = randomSelection(text);
            text = text.replace('{text}', event.target.innerText);
            showMessage(text, 4000, 8);
            return;
        }
    });
    window.addEventListener('click', (event) => {
        var _b;
        for (let { selector, text } of tips.click) {
            if (!((_b = event.target) === null || _b === void 0 ? void 0 : _b.closest(selector)))
                continue;
            text = randomSelection(text);
            text = text.replace('{text}', event.target.innerText);
            showMessage(text, 4000, 8);
            return;
        }
    });
    window.addEventListener('live2d:hoverbody', () => {
        const text = randomSelection(tips.message.hoverBody);
        showMessage(text, 4000, 8, false);
    });
    window.addEventListener('live2d:tapbody', () => {
        const text = randomSelection(tips.message.tapBody);
        showMessage(text, 4000, 9);
    });
    const devtools = () => { };
    console.log('%c', devtools);
    devtools.toString = () => {
        showMessage(tips.message.console, 6000, 9);
    };
    window.addEventListener('copy', () => {
        showMessage(tips.message.copy, 6000, 9);
    });
    window.addEventListener('visibilitychange', () => {
        if (!document.hidden)
            showMessage(tips.message.visibilitychange, 6000, 9);
    });
}
async function loadWidget(config) {
    var _b;
    localStorage.removeItem('waifu-display');
    sessionStorage.removeItem('waifu-message-priority');
    document.body.insertAdjacentHTML('beforeend', `<div id="waifu">
       <div id="waifu-tips"></div>
       <div id="waifu-canvas">
         <canvas id="live2d" width="800" height="800"></canvas>
       </div>
       <div id="waifu-tool"></div>
     </div>`);
    let models = [];
    let tips;
    if (config.waifuPath) {
        const response = await fetch(config.waifuPath);
        tips = await response.json();
        models = tips.models;
        registerEventListener(tips);
        showMessage(welcomeMessage(tips.time, tips.message.welcome, tips.message.referrer), 7000, 11);
    }
    const model = await ModelManager.initCheck(config, models);
    await model.loadModel('');
    new ToolsManager(model, config, tips).registerTools();
    if (config.drag)
        registerDrag();
    (_b = document.getElementById('waifu')) === null || _b === void 0 ? void 0 : _b.classList.add('waifu-active');
}
function initWidget(config) {
    if (typeof config === 'string') {
        logger.error('Your config for Live2D initWidget is outdated. Please refer to https://github.com/stevenjoezhang/live2d-widget/blob/master/dist/autoload.js');
        return;
    }
    logger.setLevel(config.logLevel);
    document.body.insertAdjacentHTML('beforeend', `<div id="waifu-toggle">
       ${fa_child}
     </div>`);
    const toggle = document.getElementById('waifu-toggle');
    toggle === null || toggle === void 0 ? void 0 : toggle.addEventListener('click', () => {
        var _b;
        toggle === null || toggle === void 0 ? void 0 : toggle.classList.remove('waifu-toggle-active');
        if (toggle === null || toggle === void 0 ? void 0 : toggle.getAttribute('first-time')) {
            loadWidget(config);
            toggle === null || toggle === void 0 ? void 0 : toggle.removeAttribute('first-time');
        }
        else {
            localStorage.removeItem('waifu-display');
            (_b = document.getElementById('waifu')) === null || _b === void 0 ? void 0 : _b.classList.remove('waifu-hidden');
            setTimeout(() => {
                var _b;
                (_b = document.getElementById('waifu')) === null || _b === void 0 ? void 0 : _b.classList.add('waifu-active');
            }, 0);
        }
    });
    if (localStorage.getItem('waifu-display') &&
        Date.now() - Number(localStorage.getItem('waifu-display')) <= 86400000) {
        toggle === null || toggle === void 0 ? void 0 : toggle.setAttribute('first-time', 'true');
        setTimeout(() => {
            toggle === null || toggle === void 0 ? void 0 : toggle.classList.add('waifu-toggle-active');
        }, 0);
    }
    else {
        loadWidget(config);
    }
}
export { initWidget };


================================================
FILE: demo/chat.html
================================================
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>看板娘聊天平台</title>
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css">
<script src="../dist/live2d.min.js"></script>
<style>
html, body {
	height: 100%;
}
body {
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 40px;
	padding-bottom: 40px;
	background-color: #f5f5f5;
}
#waifu {
	bottom: 0;
	left: 0;
	line-height: 0;
	margin-bottom: -10px;
	position: fixed;
	transform: translateY(3px);
	transition: transform .3s ease-in-out, bottom 3s ease-in-out;
	z-index: 1;
}
#waifu:hover {
	transform: translateY(0);
}
#waifu-tips {
	animation: shake 50s ease-in-out 5s infinite;
	background-color: rgba(236, 217, 188, .5);
	border: 1px solid rgba(224, 186, 140, .62);
	border-radius: 12px;
	box-shadow: 0 3px 15px 2px rgba(191, 158, 118, .2);
	font-size: 14px;
	line-height: 24px;
	margin: -100px 20px;
	min-height: 70px;
	overflow: hidden;
	padding: 5px 10px;
	position: absolute;
	text-overflow: ellipsis;
	transition: opacity 1s;
	width: 250px;
	word-break: break-all;
}
#waifu-tips.waifu-tips-active {
	opacity: 1;
	transition: opacity .2s;
}
#waifu-tips span {
	color: #0099cc;
}
#live2d {
	cursor: grab;
	height: 300px;
	position: relative;
	width: 300px;
}
#live2d:active {
	cursor: grabbing;
}
textarea {
	background-color: transparent;
    border: none;
	width: 100%;
	resize: none;
	min-height: 100px;
}
textarea:focus {
  outline: none;
}
</style>
</head>
<body>
	<div id="waifu">
		<div id="waifu-tips"><textarea id="text" disabled="true"></textarea></div>
		<canvas id="live2d" width="800" height="800"></canvas>
	</div>
<script type="module">
/*
 * _(:з」∠)_
 * Created by Shuqiao Zhang in 2025.
 * https://zhangshuqiao.org
 */

/*
 * This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */
import { Cubism2Model } from "../build/index.js";

class ChatManager {
	constructor() {
		this.apiUrl = null;
		this.apiKey = null;
		this.conversationHistory = [];
		this.systemPrompt = '请扮演Potion Maker中的Pio,在接下来的对话中,使用萌萌哒的语气回答问题。';
	}

	async create() {
		// 提示用户输入API URL和Key
		this.apiUrl = prompt("请输入大模型API URL (例如: https://api.openai.com/v1/chat/completions):");
		if (!this.apiUrl) {
			return "呜呜~ 你没有输入API URL呢,Pio无法开始对话啦~";
		}

		this.apiKey = prompt("请输入API Key:");
		if (!this.apiKey) {
			return "呜呜~ 你没有输入API Key呢,Pio无法开始对话啦~";
		}

		// 初始化对话历史,添加系统提示词
		this.conversationHistory = [
			{
				role: "system",
				content: this.systemPrompt
			}
		];

		return "嗨~ 我是Pio哦!有什么可以帮助你的吗?(按Enter发送消息)";
	}

	async message(content) {
		if (!this.apiUrl || !this.apiKey) {
			return "呜呜~ API配置不完整,请刷新页面重新配置~";
		}

		// 添加用户消息到历史
		this.conversationHistory.push({
			role: "user",
			content: content
		});

		try {
			const response = await fetch(this.apiUrl, {
				method: 'POST',
				headers: {
					'Content-Type': 'application/json',
					'Authorization': `Bearer ${this.apiKey}`
				},
				body: JSON.stringify({
					messages: this.conversationHistory,
					temperature: 0.7,
					max_tokens: 1000
				})
			});

			if (!response.ok) {
				throw new Error(`API请求失败: ${response.status} ${response.statusText}`);
			}

			const data = await response.json();
			const assistantMessage = data.choices[0].message.content;

			// 添加助手回复到历史
			this.conversationHistory.push({
				role: "assistant",
				content: assistantMessage
			});

			return assistantMessage;
		} catch (error) {
			console.error("API调用出错:", error);
			return `呜呜~ 出错了呢: ${error.message}`;
		}
	}
}

window.addEventListener("load", async () => {
	"use strict";

	const apiPath = "https://live2d.fghrsh.net/api";
	const text = document.getElementById("text");
	const manager = new ChatManager();
	let state = 0, loading = false,
		modelId = localStorage.getItem("modelId"),
		modelTexturesId = localStorage.getItem("modelTexturesId");
	if (modelId === null) {
		modelId = 1;
		modelTexturesId = 53;
	}
	const model = new Cubism2Model();
	await loadModel(modelId, modelTexturesId);

	async function loadModel(modelId, modelTexturesId) {
		localStorage.setItem("modelId", modelId);
		if (modelTexturesId === undefined) modelTexturesId = 0;
		localStorage.setItem("modelTexturesId", modelTexturesId);
		const modelSettingPath = `${apiPath}/get/?id=${modelId}-${modelTexturesId}`;
		const response = await fetch(modelSettingPath);
		const modelSetting = await response.json();
		if (!model.gl) {
			await model.init('live2d', modelSettingPath, modelSetting);
		} else {
			await model.changeModelWithJSON(modelSettingPath, modelSetting);
		}
		console.log("live2d", `模型 ${modelId}-${modelTexturesId} 加载完成`);
		setTimeout(() => {
			state = 2;
		}, 2000);
	}

	text.addEventListener("keydown", async (e) => {
		if (e.code === "Enter") {
			e.preventDefault();
			let content = text.value;
			if (content === "") return;
			console.log(content);
			text.disabled = true;
			text.value = await manager.message(content);
			text.disabled = false;
		}
	});

	const message = await manager.create();
	text.value = message;
	text.disabled = false;
});
</script>
</body>
</html>


================================================
FILE: demo/demo.html
================================================
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Live2D 看板娘 / Demo</title>
<style>
#github svg {
	transition: all 1s;
	fill: #222;
	color: #fff;
	position: absolute;
	top: 0;
	right: 0;
	border: 0;
	width: 80px;
	height: 80px;
}
#github:hover svg {
	width: 160px;
	height: 160px;
}
</style>
</head>
<body>
<a id="github" href="https://github.com/stevenjoezhang/live2d-widget" target="_blank" title="Visit the open-source code on GitHub!">
	<svg viewBox="0 0 250 250" aria-hidden="true">
		<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
		<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" class="octo-arm"></path>
		<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
	</svg>
</a>
<script src="../dist/autoload.js"></script>
</body>
</html>


================================================
FILE: demo/login.html
================================================
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>看板娘登陆平台</title>
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css">
<script src="../dist/live2d.min.js"></script>
<style>
html, body {
	height: 100%;
}
body {
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 40px;
	padding-bottom: 40px;
	background-color: #f5f5f5;
}
.form-signin {
	width: 100%;
	max-width: 330px;
	padding: 15px;
	margin: 0 auto;
}
.form-signin .checkbox {
	font-weight: 400;
}
.form-signin .form-control {
	position: relative;
	box-sizing: border-box;
	height: auto;
	padding: 10px;
	font-size: 16px;
}
.form-signin .form-control:focus {
	z-index: 2;
}
.form-signin input[type=text] {
	margin-bottom: -1px;
	border-bottom-right-radius: 0;
	border-bottom-left-radius: 0;
}
.form-signin input[type=password] {
	margin-bottom: 10px;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}
#stage {
	position: relative;
}
#stage img {
	width: 100%;
	margin-bottom: 20px;
	border-radius: 20px;
}
#stage button {
	position: absolute;
	padding: 0;
}
#inner {
	position: relative;
	background-color: #999;
	clip-path: circle(120px at center);
}
#cover {
	position: absolute;
	background-color: #CB3837;
	width: 100%;
	height: 100%;
	bottom: 0;
	transition: all 1s;
	box-shadow: 0 0 0 5px rgba(0, 0, 0, .1);
	overflow: hidden;
}
#text {
	position: absolute;
	font-size: 2em;
	opacity: 0.4;
	font-weight: bold;
	word-wrap: break-word;
	max-width: 100%;
}
#detail {
	position: absolute;
	background: rgba(255, 255, 255, .1);
	width: 100%;
	height: 10px;
	botto
Download .txt
gitextract_2gq63twy/

├── .github/
│   └── workflows/
│       ├── linter.yml
│       └── tester.yml
├── .gitignore
├── .prettierignore
├── .prettierrc.yaml
├── LICENSE
├── README.en.md
├── README.md
├── build/
│   ├── cubism2/
│   │   ├── LAppDefine.d.ts
│   │   ├── LAppDefine.js
│   │   ├── LAppLive2DManager.d.ts
│   │   ├── LAppLive2DManager.js
│   │   ├── LAppModel.d.ts
│   │   ├── LAppModel.js
│   │   ├── Live2DFramework.d.ts
│   │   ├── Live2DFramework.js
│   │   ├── PlatformManager.d.ts
│   │   ├── PlatformManager.js
│   │   ├── index.d.ts
│   │   ├── index.js
│   │   └── utils/
│   │       ├── MatrixStack.d.ts
│   │       ├── MatrixStack.js
│   │       ├── ModelSettingJson.d.ts
│   │       └── ModelSettingJson.js
│   ├── cubism5/
│   │   ├── index.d.ts
│   │   └── index.js
│   ├── drag.d.ts
│   ├── drag.js
│   ├── icons.d.ts
│   ├── icons.js
│   ├── index.d.ts
│   ├── index.js
│   ├── logger.d.ts
│   ├── logger.js
│   ├── message.d.ts
│   ├── message.js
│   ├── model.d.ts
│   ├── model.js
│   ├── tools.d.ts
│   ├── tools.js
│   ├── utils.d.ts
│   ├── utils.js
│   ├── waifu-tips.d.ts
│   ├── waifu-tips.js
│   ├── widget.d.ts
│   └── widget.js
├── demo/
│   ├── chat.html
│   ├── demo.html
│   └── login.html
├── dist/
│   ├── autoload.js
│   ├── chunk/
│   │   ├── index.js
│   │   └── index2.js
│   ├── waifu-tips.js
│   ├── waifu-tips.json
│   └── waifu.css
├── eslint.config.js
├── package.json
├── renovate.json
├── rollup.config.js
├── src/
│   ├── cubism2/
│   │   ├── LAppDefine.js
│   │   ├── LAppLive2DManager.js
│   │   ├── LAppModel.js
│   │   ├── Live2DFramework.js
│   │   ├── PlatformManager.js
│   │   ├── index.js
│   │   └── utils/
│   │       ├── MatrixStack.js
│   │       └── ModelSettingJson.js
│   ├── cubism5/
│   │   └── index.js
│   ├── drag.ts
│   ├── icons.ts
│   ├── index.ts
│   ├── logger.ts
│   ├── message.ts
│   ├── model.ts
│   ├── tools.ts
│   ├── types/
│   │   ├── index.d.ts
│   │   ├── live2dApi.d.ts
│   │   └── window.d.ts
│   ├── utils.ts
│   ├── waifu-tips.ts
│   └── widget.ts
└── tsconfig.json
Download .txt
SYMBOL INDEX (1844 symbols across 50 files)

FILE: build/cubism2/LAppLive2DManager.d.ts
  class LAppLive2DManager (line 2) | class LAppLive2DManager {

FILE: build/cubism2/LAppLive2DManager.js
  class LAppLive2DManager (line 6) | class LAppLive2DManager {
    method constructor (line 7) | constructor() {
    method getModel (line 13) | getModel() {
    method releaseModel (line 16) | releaseModel(gl) {
    method changeModel (line 22) | async changeModel(gl, modelSettingPath) {
    method changeModelWithJSON (line 39) | async changeModelWithJSON(gl, modelSettingPath, modelSetting) {
    method setDrag (line 52) | setDrag(x, y) {
    method maxScaleEvent (line 57) | maxScaleEvent() {
    method minScaleEvent (line 63) | minScaleEvent() {
    method tapEvent (line 69) | tapEvent(x, y) {

FILE: build/cubism2/LAppModel.d.ts
  class LAppModel (line 2) | class LAppModel extends L2DBaseModel {

FILE: build/cubism2/LAppModel.js
  class LAppModel (line 6) | class LAppModel extends L2DBaseModel {
    method constructor (line 7) | constructor() {
    method loadJSON (line 13) | loadJSON(callback) {
    method loadModelSetting (line 91) | async loadModelSetting(modelSettingPath, modelSetting) {
    method load (line 99) | load(gl, modelSettingPath, callback) {
    method release (line 108) | release(gl) {
    method preloadMotionGroup (line 112) | preloadMotionGroup(name) {
    method update (line 121) | update() {
    method setRandomExpression (line 167) | setRandomExpression() {
    method startRandomMotion (line 175) | startRandomMotion(name, priority) {
    method startMotion (line 180) | startMotion(name, no, priority) {
    method setFadeInFadeOut (line 204) | setFadeInFadeOut(name, no, priority, motion) {
    method setExpression (line 221) | setExpression(name) {
    method draw (line 227) | draw(gl) {
    method hitTest (line 235) | hitTest(id, testX, testY) {

FILE: build/cubism2/Live2DFramework.d.ts
  class L2DBaseModel (line 1) | class L2DBaseModel {
  class L2DViewMatrix (line 46) | class L2DViewMatrix extends L2DMatrix44 {
  class L2DEyeBlink (line 76) | class L2DEyeBlink {
  class Live2DFramework (line 92) | class Live2DFramework {
  class L2DMatrix44 (line 99) | class L2DMatrix44 {
  class L2DTargetPoint (line 119) | class L2DTargetPoint {
  class L2DModelMatrix (line 136) | class L2DModelMatrix extends L2DMatrix44 {
  class L2DPhysics (line 153) | class L2DPhysics {
  class L2DPose (line 159) | class L2DPose {
  class L2DMotionManager (line 169) | class L2DMotionManager {

FILE: build/cubism2/Live2DFramework.js
  class L2DBaseModel (line 2) | class L2DBaseModel {
    method constructor (line 3) | constructor() {
    method getModelMatrix (line 27) | getModelMatrix() {
    method setAlpha (line 30) | setAlpha(a) {
    method getAlpha (line 37) | getAlpha() {
    method isInitialized (line 40) | isInitialized() {
    method setInitialized (line 43) | setInitialized(v) {
    method isUpdating (line 46) | isUpdating() {
    method setUpdating (line 49) | setUpdating(v) {
    method getLive2DModel (line 52) | getLive2DModel() {
    method setLipSync (line 55) | setLipSync(v) {
    method setLipSyncValue (line 58) | setLipSyncValue(v) {
    method setAccel (line 61) | setAccel(x, y, z) {
    method setDrag (line 66) | setDrag(x, y) {
    method getMainMotionManager (line 70) | getMainMotionManager() {
    method getExpressionManager (line 73) | getExpressionManager() {
    method loadModelData (line 76) | loadModelData(path, callback) {
    method loadTexture (line 93) | loadTexture(no, path, callback) {
    method loadMotion (line 105) | loadMotion(name, path, callback) {
    method loadExpression (line 117) | loadExpression(name, path, callback) {
    method loadPose (line 128) | loadPose(path, callback) {
    method loadPhysics (line 142) | loadPhysics(path) {
    method hitTestSimple (line 154) | hitTestSimple(drawID, testX, testY) {
  class L2DExpressionMotion (line 181) | class L2DExpressionMotion extends AMotion {
    method constructor (line 182) | constructor() {
    method loadJson (line 186) | static loadJson(buf) {
    method updateParamExe (line 234) | updateParamExe(model, timeMSec, weight, motionQueueEnt) {
  function L2DExpressionParam (line 253) | function L2DExpressionParam() {
  class L2DEyeBlink (line 258) | class L2DEyeBlink {
    method constructor (line 259) | constructor() {
    method calcNextBlink (line 272) | calcNextBlink() {
    method setInterval (line 277) | setInterval(blinkIntervalMsec) {
    method setEyeMotion (line 280) | setEyeMotion(closingMotionMsec, closedMotionMsec, openingMotionMsec) {
    method updateParam (line 285) | updateParam(model) {
  class L2DMatrix44 (line 342) | class L2DMatrix44 {
    method constructor (line 343) | constructor() {
    method mul (line 347) | static mul(a, b, dst) {
    method identity (line 362) | identity() {
    method getArray (line 366) | getArray() {
    method getCopyMatrix (line 369) | getCopyMatrix() {
    method setMatrix (line 372) | setMatrix(tr) {
    method getScaleX (line 378) | getScaleX() {
    method getScaleY (line 381) | getScaleY() {
    method transformX (line 384) | transformX(src) {
    method transformY (line 387) | transformY(src) {
    method invertTransformX (line 390) | invertTransformX(src) {
    method invertTransformY (line 393) | invertTransformY(src) {
    method multTranslate (line 396) | multTranslate(shiftX, shiftY) {
    method translate (line 400) | translate(x, y) {
    method translateX (line 404) | translateX(x) {
    method translateY (line 407) | translateY(y) {
    method multScale (line 410) | multScale(scaleX, scaleY) {
    method scale (line 414) | scale(scaleX, scaleY) {
  class L2DModelMatrix (line 419) | class L2DModelMatrix extends L2DMatrix44 {
    method constructor (line 420) | constructor(w, h) {
    method setPosition (line 425) | setPosition(x, y) {
    method setCenterPosition (line 428) | setCenterPosition(x, y) {
    method top (line 433) | top(y) {
    method bottom (line 436) | bottom(y) {
    method left (line 440) | left(x) {
    method right (line 443) | right(x) {
    method centerX (line 447) | centerX(x) {
    method centerY (line 451) | centerY(y) {
    method setX (line 455) | setX(x) {
    method setY (line 458) | setY(y) {
    method setHeight (line 461) | setHeight(h) {
    method setWidth (line 466) | setWidth(w) {
  class L2DMotionManager (line 472) | class L2DMotionManager extends MotionQueueManager {
    method constructor (line 473) | constructor() {
    method getCurrentPriority (line 479) | getCurrentPriority() {
    method getReservePriority (line 482) | getReservePriority() {
    method reserveMotion (line 485) | reserveMotion(priority) {
    method setReservePriority (line 495) | setReservePriority(val) {
    method updateParam (line 498) | updateParam(model) {
    method startMotionPrio (line 505) | startMotionPrio(motion, priority) {
  class L2DPhysics (line 513) | class L2DPhysics {
    method constructor (line 514) | constructor() {
    method load (line 518) | static load(buf) {
    method updateParam (line 579) | updateParam(model) {
  class L2DPose (line 586) | class L2DPose {
    method constructor (line 587) | constructor() {
    method load (line 592) | static load(buf) {
    method updateParam (line 621) | updateParam(model) {
    method initParam (line 638) | initParam(model) {
    method normalizePartsOpacityGroup (line 660) | normalizePartsOpacityGroup(model, partsGroup, deltaTimeSec) {
    method copyOpacityOtherParts (line 714) | copyOpacityOtherParts(model, partsGroup) {
  class L2DPartsParam (line 731) | class L2DPartsParam {
    method constructor (line 732) | constructor(id) {
    method initIndex (line 738) | initIndex(model) {
  class L2DTargetPoint (line 744) | class L2DTargetPoint {
    method constructor (line 745) | constructor() {
    method setPoint (line 755) | setPoint(x, y) {
    method getX (line 759) | getX() {
    method getY (line 762) | getY() {
    method update (line 765) | update() {
  class L2DViewMatrix (line 809) | class L2DViewMatrix extends L2DMatrix44 {
    method constructor (line 810) | constructor() {
    method getMaxScale (line 823) | getMaxScale() {
    method getMinScale (line 826) | getMinScale() {
    method setMaxScale (line 829) | setMaxScale(v) {
    method setMinScale (line 832) | setMinScale(v) {
    method isMaxScale (line 835) | isMaxScale() {
    method isMinScale (line 838) | isMinScale() {
    method adjustTranslate (line 841) | adjustTranslate(shiftX, shiftY) {
    method adjustScale (line 854) | adjustScale(cx, cy, scale) {
    method setScreenRect (line 871) | setScreenRect(left, right, bottom, top) {
    method setMaxScreenRect (line 877) | setMaxScreenRect(left, right, bottom, top) {
    method getScreenLeft (line 883) | getScreenLeft() {
    method getScreenRight (line 886) | getScreenRight() {
    method getScreenBottom (line 889) | getScreenBottom() {
    method getScreenTop (line 892) | getScreenTop() {
    method getMaxLeft (line 895) | getMaxLeft() {
    method getMaxRight (line 898) | getMaxRight() {
    method getMaxBottom (line 901) | getMaxBottom() {
    method getMaxTop (line 904) | getMaxTop() {
  class Live2DFramework (line 908) | class Live2DFramework {
    method getPlatformManager (line 909) | static getPlatformManager() {
    method setPlatformManager (line 912) | static setPlatformManager(platformManager) {

FILE: build/cubism2/PlatformManager.d.ts
  class PlatformManager (line 2) | class PlatformManager {

FILE: build/cubism2/PlatformManager.js
  class PlatformManager (line 2) | class PlatformManager {
    method constructor (line 3) | constructor() {
    method loadBytes (line 6) | loadBytes(path, callback) {
    method loadLive2DModel (line 17) | loadLive2DModel(path, callback) {
    method loadTexture (line 24) | loadTexture(model, no, path, callback) {
    method jsonParseFromBytes (line 55) | jsonParseFromBytes(buf) {

FILE: build/cubism2/index.d.ts
  class Cubism2Model (line 2) | class Cubism2Model {

FILE: build/cubism2/index.js
  function normalizePoint (line 6) | function normalizePoint(x, y, x0, y0, w, h) {
  class Cubism2Model (line 27) | class Cubism2Model {
    method constructor (line 28) | constructor() {
    method initL2dCanvas (line 41) | initL2dCanvas(canvasId) {
    method init (line 54) | async init(canvasId, modelSettingPath, modelSetting) {
    method destroy (line 84) | destroy() {
    method startDraw (line 112) | startDraw() {
    method draw (line 122) | draw() {
    method changeModel (line 140) | async changeModel(modelSettingPath) {
    method changeModelWithJSON (line 143) | async changeModelWithJSON(modelSettingPath, modelSetting) {
    method modelScaling (line 146) | modelScaling(scale) {
    method modelTurnHead (line 161) | modelTurnHead(event) {
    method followPointer (line 180) | followPointer(event) {
    method lookFront (line 198) | lookFront() {
    method mouseEvent (line 201) | mouseEvent(e) {
    method touchEvent (line 219) | touchEvent(e) {
    method transformViewX (line 244) | transformViewX(deviceX) {
    method transformViewY (line 248) | transformViewY(deviceY) {
    method transformScreenX (line 252) | transformScreenX(deviceX) {
    method transformScreenY (line 255) | transformScreenY(deviceY) {

FILE: build/cubism2/utils/MatrixStack.d.ts
  class MatrixStack (line 2) | class MatrixStack {

FILE: build/cubism2/utils/MatrixStack.js
  class MatrixStack (line 1) | class MatrixStack {
    method reset (line 2) | static reset() {
    method loadIdentity (line 5) | static loadIdentity() {
    method push (line 10) | static push() {
    method pop (line 21) | static pop() {
    method getMatrix (line 31) | static getMatrix() {
    method multMatrix (line 34) | static multMatrix(matNew) {

FILE: build/cubism2/utils/ModelSettingJson.d.ts
  class ModelSettingJson (line 2) | class ModelSettingJson {

FILE: build/cubism2/utils/ModelSettingJson.js
  class ModelSettingJson (line 2) | class ModelSettingJson {
    method constructor (line 3) | constructor() {
    method loadModelSetting (line 24) | loadModelSetting(path, callback) {
    method getTextureFile (line 32) | getTextureFile(n) {
    method getModelFile (line 37) | getModelFile() {
    method getTextureNum (line 40) | getTextureNum() {
    method getHitAreaNum (line 45) | getHitAreaNum() {
    method getHitAreaCustom (line 50) | getHitAreaCustom() {
    method getHitAreaID (line 53) | getHitAreaID(n) {
    method getHitAreaName (line 59) | getHitAreaName(n) {
    method getPhysicsFile (line 65) | getPhysicsFile() {
    method getPoseFile (line 68) | getPoseFile() {
    method getExpressionNum (line 71) | getExpressionNum() {
    method getExpressionFile (line 76) | getExpressionFile(n) {
    method getExpressionName (line 81) | getExpressionName(n) {
    method getLayout (line 86) | getLayout() {
    method getInitParamNum (line 89) | getInitParamNum() {
    method getMotionNum (line 94) | getMotionNum(name) {
    method getMotionFile (line 100) | getMotionFile(name, n) {
    method getMotionSound (line 107) | getMotionSound(name, n) {
    method getMotionFadeIn (line 115) | getMotionFadeIn(name, n) {
    method getMotionFadeOut (line 123) | getMotionFadeOut(name, n) {
    method getInitParamID (line 131) | getInitParamID(n) {
    method getInitParamValue (line 137) | getInitParamValue(n) {
    method getInitPartsVisibleNum (line 143) | getInitPartsVisibleNum() {
    method getInitPartsVisibleID (line 148) | getInitPartsVisibleID(n) {
    method getInitPartsVisibleValue (line 154) | getInitPartsVisibleValue(n) {

FILE: build/cubism5/index.d.ts
  class AppDelegate (line 1) | class AppDelegate extends LAppDelegate {

FILE: build/cubism5/index.js
  class AppSubdelegate (line 8) | class AppSubdelegate extends LAppSubdelegate {
    method initialize (line 9) | initialize(canvas) {
    method onResize (line 43) | onResize() {
    method update (line 47) | update() {
  class AppDelegate (line 66) | class AppDelegate extends LAppDelegate {
    method run (line 67) | run() {
    method stop (line 77) | stop() {
    method release (line 83) | release() {
    method transformOffset (line 89) | transformOffset(e) {
    method onMouseMove (line 102) | onMouseMove(e) {
    method onMouseEnd (line 112) | onMouseEnd(e) {
    method onTap (line 118) | onTap(e) {
    method initializeEventListener (line 126) | initializeEventListener() {
    method releaseEventListener (line 140) | releaseEventListener() {
    method initializeSubdelegates (line 153) | initializeSubdelegates() {
    method changeModel (line 175) | changeModel(modelSettingPath) {
    method subdelegates (line 186) | get subdelegates() {

FILE: build/drag.js
  function registerDrag (line 1) | function registerDrag() {

FILE: build/logger.d.ts
  type LogLevel (line 1) | type LogLevel = 'error' | 'warn' | 'info' | 'trace';
  class Logger (line 2) | class Logger {

FILE: build/logger.js
  class Logger (line 1) | class Logger {
    method constructor (line 2) | constructor(level = 'info') {
    method setLevel (line 5) | setLevel(level) {
    method shouldLog (line 10) | shouldLog(level) {
    method error (line 13) | error(message, ...args) {
    method warn (line 18) | warn(message, ...args) {
    method info (line 23) | info(message, ...args) {
    method trace (line 28) | trace(message, ...args) {

FILE: build/message.d.ts
  type Time (line 1) | type Time = {

FILE: build/message.js
  function showMessage (line 3) | function showMessage(text, timeout, priority, override = true) {
  function welcomeMessage (line 26) | function welcomeMessage(time, welcomeTemplate, referrerTemplate) {
  function i18n (line 46) | function i18n(template, ...args) {

FILE: build/model.d.ts
  type ModelList (line 2) | interface ModelList {
  type Config (line 7) | interface Config {
  class ModelManager (line 18) | class ModelManager {

FILE: build/model.js
  class ModelManager (line 4) | class ModelManager {
    method constructor (line 5) | constructor(config, models = []) {
    method initCheck (line 45) | static async initCheck(config, models = []) {
    method modelId (line 81) | set modelId(modelId) {
    method modelId (line 85) | get modelId() {
    method modelTexturesId (line 88) | set modelTexturesId(modelTexturesId) {
    method modelTexturesId (line 92) | get modelTexturesId() {
    method resetCanvas (line 95) | resetCanvas() {
    method fetchWithCache (line 98) | async fetchWithCache(url) {
    method checkModelVersion (line 115) | checkModelVersion(modelSetting) {
    method loadLive2D (line 121) | async loadLive2D(modelSettingPath, modelSetting) {
    method loadTextureCache (line 179) | async loadTextureCache(modelName) {
    method loadModel (line 183) | async loadModel(message) {
    method loadRandTexture (line 210) | async loadRandTexture(successMessage = '', failMessage = '') {
    method loadNextModel (line 251) | async loadNextModel() {

FILE: build/tools.d.ts
  type Tools (line 3) | interface Tools {
  class ToolsManager (line 9) | class ToolsManager {

FILE: build/tools.js
  class ToolsManager (line 3) | class ToolsManager {
    method constructor (line 4) | constructor(model, config, tips) {
    method registerTools (line 94) | registerTools() {

FILE: build/utils.js
  function randomSelection (line 1) | function randomSelection(obj) {
  function randomOtherOption (line 4) | function randomOtherOption(total, excludeIndex) {
  function loadExternalResource (line 8) | function loadExternalResource(url, type) {

FILE: build/widget.d.ts
  type Tips (line 3) | interface Tips {

FILE: build/widget.js
  function registerEventListener (line 8) | function registerEventListener(tips) {
  function loadWidget (line 84) | async function loadWidget(config) {
  function initWidget (line 111) | function initWidget(config) {

FILE: dist/autoload.js
  function loadExternalResource (line 13) | function loadExternalResource(url, type) {

FILE: dist/chunk/index.js
  class e (line 5) | class e{constructor(){this.live2DModel=null,this.modelMatrix=null,this.e...
    method constructor (line 5) | constructor(){this.live2DModel=null,this.modelMatrix=null,this.eyeBlin...
    method getModelMatrix (line 5) | getModelMatrix(){return this.modelMatrix}
    method setAlpha (line 5) | setAlpha(t){t>.999&&(t=1),t<.001&&(t=0),this.alpha=t}
    method getAlpha (line 5) | getAlpha(){return this.alpha}
    method isInitialized (line 5) | isInitialized(){return this.initialized}
    method setInitialized (line 5) | setInitialized(t){this.initialized=t}
    method isUpdating (line 5) | isUpdating(){return this.updating}
    method setUpdating (line 5) | setUpdating(t){this.updating=t}
    method getLive2DModel (line 5) | getLive2DModel(){return this.live2DModel}
    method setLipSync (line 5) | setLipSync(t){this.lipSync=t}
    method setLipSyncValue (line 5) | setLipSyncValue(t){this.lipSyncValue=t}
    method setAccel (line 5) | setAccel(t,e,i){this.accelX=t,this.accelY=e,this.accelZ=i}
    method setDrag (line 5) | setDrag(t,e){this.dragX=t,this.dragY=e}
    method getMainMotionManager (line 5) | getMainMotionManager(){return this.mainMotionManager}
    method getExpressionManager (line 5) | getExpressionManager(){return this.expressionManager}
    method loadModelData (line 5) | loadModelData(e,i){const s=M.getPlatformManager();t.info("Load model :...
    method loadTexture (line 5) | loadTexture(e,s,n){i++;const a=M.getPlatformManager();t.info("Load Tex...
    method loadMotion (line 5) | loadMotion(e,i,s){const n=M.getPlatformManager();t.trace("Load Motion ...
    method loadExpression (line 5) | loadExpression(e,i,n){const a=M.getPlatformManager();t.trace("Load Exp...
    method loadPose (line 5) | loadPose(e,i){const s=M.getPlatformManager();t.trace("Load Pose : "+e)...
    method loadPhysics (line 5) | loadPhysics(e){const i=M.getPlatformManager();t.trace("Load Physics : ...
    method hitTestSimple (line 5) | hitTestSimple(t,e,i){const s=this.live2DModel.getDrawDataIndex(t);if(s...
  class s (line 5) | class s extends AMotion{constructor(){super(),this.paramList=[]}static l...
    method constructor (line 5) | constructor(){super(),this.paramList=[]}
    method loadJson (line 5) | static loadJson(t){const e=new s,i=M.getPlatformManager().jsonParseFro...
    method updateParamExe (line 5) | updateParamExe(t,e,i,n){for(let e=this.paramList.length-1;e>=0;--e){co...
  function n (line 5) | function n(){this.id="",this.type=-1,this.value=null}
  class a (line 5) | class a{constructor(){this.nextBlinkTime=null,this.stateStartTime=null,t...
    method constructor (line 5) | constructor(){this.nextBlinkTime=null,this.stateStartTime=null,this.bl...
    method calcNextBlink (line 5) | calcNextBlink(){return UtSystem.getUserTimeMSec()+Math.random()*(2*thi...
    method setInterval (line 5) | setInterval(t){this.blinkIntervalMsec=t}
    method setEyeMotion (line 5) | setEyeMotion(t,e,i){this.closingMotionMsec=t,this.closedMotionMsec=e,t...
    method updateParam (line 5) | updateParam(t){const e=UtSystem.getUserTimeMSec();let i,s=0;switch(thi...
  class o (line 5) | class o{constructor(){this.tr=new Float32Array(16),this.identity()}stati...
    method constructor (line 5) | constructor(){this.tr=new Float32Array(16),this.identity()}
    method mul (line 5) | static mul(t,e,i){const s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let n,a,r;...
    method identity (line 5) | identity(){for(let t=0;t<16;t++)this.tr[t]=t%5==0?1:0}
    method getArray (line 5) | getArray(){return this.tr}
    method getCopyMatrix (line 5) | getCopyMatrix(){return new Float32Array(this.tr)}
    method setMatrix (line 5) | setMatrix(t){if(null!=this.tr&&this.tr.length==this.tr.length)for(let ...
    method getScaleX (line 5) | getScaleX(){return this.tr[0]}
    method getScaleY (line 5) | getScaleY(){return this.tr[5]}
    method transformX (line 5) | transformX(t){return this.tr[0]*t+this.tr[12]}
    method transformY (line 5) | transformY(t){return this.tr[5]*t+this.tr[13]}
    method invertTransformX (line 5) | invertTransformX(t){return(t-this.tr[12])/this.tr[0]}
    method invertTransformY (line 5) | invertTransformY(t){return(t-this.tr[13])/this.tr[5]}
    method multTranslate (line 5) | multTranslate(t,e){const i=[1,0,0,0,0,1,0,0,0,0,1,0,t,e,0,1];o.mul(i,t...
    method translate (line 5) | translate(t,e){this.tr[12]=t,this.tr[13]=e}
    method translateX (line 5) | translateX(t){this.tr[12]=t}
    method translateY (line 5) | translateY(t){this.tr[13]=t}
    method multScale (line 5) | multScale(t,e){const i=[t,0,0,0,0,e,0,0,0,0,1,0,0,0,0,1];o.mul(i,this....
    method scale (line 5) | scale(t,e){this.tr[0]=t,this.tr[5]=e}
  class h (line 5) | class h extends o{constructor(t,e){super(),this.width=t,this.height=e}se...
    method constructor (line 5) | constructor(t,e){super(),this.width=t,this.height=e}
    method setPosition (line 5) | setPosition(t,e){this.translate(t,e)}
    method setCenterPosition (line 5) | setCenterPosition(t,e){const i=this.width*this.getScaleX(),s=this.heig...
    method top (line 5) | top(t){this.setY(t)}
    method bottom (line 5) | bottom(t){const e=this.height*this.getScaleY();this.translateY(t-e)}
    method left (line 5) | left(t){this.setX(t)}
    method right (line 5) | right(t){const e=this.width*this.getScaleX();this.translateX(t-e)}
    method centerX (line 5) | centerX(t){const e=this.width*this.getScaleX();this.translateX(t-e/2)}
    method centerY (line 5) | centerY(t){const e=this.height*this.getScaleY();this.translateY(t-e/2)}
    method setX (line 5) | setX(t){this.translateX(t)}
    method setY (line 5) | setY(t){this.translateY(t)}
    method setHeight (line 5) | setHeight(t){const e=t/this.height,i=-e;this.scale(e,i)}
    method setWidth (line 5) | setWidth(t){const e=t/this.width,i=-e;this.scale(e,i)}
  class l (line 5) | class l extends MotionQueueManager{constructor(){super(),this.currentPri...
    method constructor (line 5) | constructor(){super(),this.currentPriority=null,this.reservePriority=n...
    method getCurrentPriority (line 5) | getCurrentPriority(){return this.currentPriority}
    method getReservePriority (line 5) | getReservePriority(){return this.reservePriority}
    method reserveMotion (line 5) | reserveMotion(t){return!(this.reservePriority>=t)&&(!(this.currentPrio...
    method setReservePriority (line 5) | setReservePriority(t){this.reservePriority=t}
    method updateParam (line 5) | updateParam(t){const e=MotionQueueManager.prototype.updateParam.call(t...
    method startMotionPrio (line 5) | startMotionPrio(t,e){return e==this.reservePriority&&(this.reservePrio...
  class c (line 5) | class c{constructor(){this.physicsList=[],this.startTimeMSec=UtSystem.ge...
    method constructor (line 5) | constructor(){this.physicsList=[],this.startTimeMSec=UtSystem.getUserT...
    method load (line 5) | static load(t){const e=new c,i=M.getPlatformManager().jsonParseFromByt...
    method updateParam (line 5) | updateParam(t){const e=UtSystem.getUserTimeMSec()-this.startTimeMSec;f...
  class d (line 5) | class d{constructor(){this.lastTime=0,this.lastModel=null,this.partsGrou...
    method constructor (line 5) | constructor(){this.lastTime=0,this.lastModel=null,this.partsGroups=[]}
    method load (line 5) | static load(t){const e=new d,i=M.getPlatformManager().jsonParseFromByt...
    method updateParam (line 5) | updateParam(t){if(null==t)return;t!=this.lastModel&&this.initParam(t),...
    method initParam (line 5) | initParam(t){if(null!=t)for(let e=0;e<this.partsGroups.length;e++){con...
    method normalizePartsOpacityGroup (line 5) | normalizePartsOpacityGroup(t,e,i){let s=-1,n=1;const a=.5;for(let a=0;...
    method copyOpacityOtherParts (line 5) | copyOpacityOtherParts(t,e){for(let i=0;i<e.length;i++){const s=e[i];if...
  class u (line 5) | class u{constructor(t){this.paramIndex=-1,this.partsIndex=-1,this.link=n...
    method constructor (line 5) | constructor(t){this.paramIndex=-1,this.partsIndex=-1,this.link=null,th...
    method initIndex (line 5) | initIndex(t){this.paramIndex=t.getParamIndex("VISIBLE:"+this.id),this....
  class m (line 5) | class m{constructor(){this.EPSILON=.01,this.faceTargetX=0,this.faceTarge...
    method constructor (line 5) | constructor(){this.EPSILON=.01,this.faceTargetX=0,this.faceTargetY=0,t...
    method setPoint (line 5) | setPoint(t,e){this.faceTargetX=t,this.faceTargetY=e}
    method getX (line 5) | getX(){return this.faceX}
    method getY (line 5) | getY(){return this.faceY}
    method update (line 5) | update(){const t=40/7.5/m.FRAME_RATE;if(0==this.lastTimeSec)return voi...
  class g (line 5) | class g extends o{constructor(){super(),this.screenLeft=null,this.screen...
    method constructor (line 5) | constructor(){super(),this.screenLeft=null,this.screenRight=null,this....
    method getMaxScale (line 5) | getMaxScale(){return this.max}
    method getMinScale (line 5) | getMinScale(){return this.min}
    method setMaxScale (line 5) | setMaxScale(t){this.max=t}
    method setMinScale (line 5) | setMinScale(t){this.min=t}
    method isMaxScale (line 5) | isMaxScale(){return this.getScaleX()==this.max}
    method isMinScale (line 5) | isMinScale(){return this.getScaleX()==this.min}
    method adjustTranslate (line 5) | adjustTranslate(t,e){this.tr[0]*this.maxLeft+(this.tr[12]+t)>this.scre...
    method adjustScale (line 5) | adjustScale(t,e,i){const s=i*this.tr[0];s<this.min?this.tr[0]>0&&(i=th...
    method setScreenRect (line 5) | setScreenRect(t,e,i,s){this.screenLeft=t,this.screenRight=e,this.scree...
    method setMaxScreenRect (line 5) | setMaxScreenRect(t,e,i,s){this.maxLeft=t,this.maxRight=e,this.maxTop=s...
    method getScreenLeft (line 5) | getScreenLeft(){return this.screenLeft}
    method getScreenRight (line 5) | getScreenRight(){return this.screenRight}
    method getScreenBottom (line 5) | getScreenBottom(){return this.screenBottom}
    method getScreenTop (line 5) | getScreenTop(){return this.screenTop}
    method getMaxLeft (line 5) | getMaxLeft(){return this.maxLeft}
    method getMaxRight (line 5) | getMaxRight(){return this.maxRight}
    method getMaxBottom (line 5) | getMaxBottom(){return this.maxBottom}
    method getMaxTop (line 5) | getMaxTop(){return this.maxTop}
  class M (line 5) | class M{static getPlatformManager(){return M.platformManager}static setP...
    method getPlatformManager (line 5) | static getPlatformManager(){return M.platformManager}
    method setPlatformManager (line 5) | static setPlatformManager(t){M.platformManager=t}
  class w (line 5) | class w{static reset(){this.depth=0}static loadIdentity(){for(let t=0;t<...
    method reset (line 5) | static reset(){this.depth=0}
    method loadIdentity (line 5) | static loadIdentity(){for(let t=0;t<16;t++)this.currentMatrix[t]=t%5==...
    method push (line 5) | static push(){this.depth;const t=16*(this.depth+1);this.matrixStack.le...
    method pop (line 5) | static pop(){this.depth--,this.depth<0&&(this.depth=0);const t=16*this...
    method getMatrix (line 5) | static getMatrix(){return this.currentMatrix}
    method multMatrix (line 5) | static multMatrix(t){let e,i,s;for(e=0;e<16;e++)this.tmp[e]=0;for(e=0;...
  class F (line 5) | class F{constructor(){this.NAME="name",this.ID="id",this.MODEL="model",t...
    method constructor (line 5) | constructor(){this.NAME="name",this.ID="id",this.MODEL="model",this.TE...
    method loadModelSetting (line 5) | loadModelSetting(t,e){M.getPlatformManager().loadBytes(t,(t=>{const i=...
    method getTextureFile (line 5) | getTextureFile(t){return null==this.json[this.TEXTURES]||null==this.js...
    method getModelFile (line 5) | getModelFile(){return this.json[this.MODEL]}
    method getTextureNum (line 5) | getTextureNum(){return null==this.json[this.TEXTURES]?0:this.json[this...
    method getHitAreaNum (line 5) | getHitAreaNum(){return null==this.json[this.HIT_AREAS]?0:this.json[thi...
    method getHitAreaCustom (line 5) | getHitAreaCustom(){return this.json[this.HIT_AREAS_CUSTOM]}
    method getHitAreaID (line 5) | getHitAreaID(t){return null==this.json[this.HIT_AREAS]||null==this.jso...
    method getHitAreaName (line 5) | getHitAreaName(t){return null==this.json[this.HIT_AREAS]||null==this.j...
    method getPhysicsFile (line 5) | getPhysicsFile(){return this.json[this.PHYSICS]}
    method getPoseFile (line 5) | getPoseFile(){return this.json[this.POSE]}
    method getExpressionNum (line 5) | getExpressionNum(){return null==this.json[this.EXPRESSIONS]?0:this.jso...
    method getExpressionFile (line 5) | getExpressionFile(t){return null==this.json[this.EXPRESSIONS]?null:thi...
    method getExpressionName (line 5) | getExpressionName(t){return null==this.json[this.EXPRESSIONS]?null:thi...
    method getLayout (line 5) | getLayout(){return this.json[this.LAYOUT]}
    method getInitParamNum (line 5) | getInitParamNum(){return null==this.json[this.INIT_PARAM]?0:this.json[...
    method getMotionNum (line 5) | getMotionNum(t){return null==this.json[this.MOTION_GROUPS]||null==this...
    method getMotionFile (line 5) | getMotionFile(t,e){return null==this.json[this.MOTION_GROUPS]||null==t...
    method getMotionSound (line 5) | getMotionSound(t,e){return null==this.json[this.MOTION_GROUPS]||null==...
    method getMotionFadeIn (line 5) | getMotionFadeIn(t,e){return null==this.json[this.MOTION_GROUPS]||null=...
    method getMotionFadeOut (line 5) | getMotionFadeOut(t,e){return null==this.json[this.MOTION_GROUPS]||null...
    method getInitParamID (line 5) | getInitParamID(t){return null==this.json[this.INIT_PARAM]||null==this....
    method getInitParamValue (line 5) | getInitParamValue(t){return null==this.json[this.INIT_PARAM]||null==th...
    method getInitPartsVisibleNum (line 5) | getInitPartsVisibleNum(){return null==this.json[this.INIT_PARTS_VISIBL...
    method getInitPartsVisibleID (line 5) | getInitPartsVisibleID(t){return null==this.json[this.INIT_PARTS_VISIBL...
    method getInitPartsVisibleValue (line 5) | getInitPartsVisibleValue(t){return null==this.json[this.INIT_PARTS_VIS...
  class U (line 5) | class U extends e{constructor(){super(),this.modelHomeDir="",this.modelS...
    method constructor (line 5) | constructor(){super(),this.modelHomeDir="",this.modelSetting=null,this...
    method loadJSON (line 5) | loadJSON(t){const e=this.modelHomeDir+this.modelSetting.getModelFile()...
    method loadModelSetting (line 5) | async loadModelSetting(t,e){this.setUpdating(!0),this.setInitialized(!...
    method load (line 5) | load(t,e,i){this.setUpdating(!0),this.setInitialized(!1),this.modelHom...
    method release (line 5) | release(t){const e=M.getPlatformManager();t.deleteTexture(e.texture)}
    method preloadMotionGroup (line 5) | preloadMotionGroup(t){for(let e=0;e<this.modelSetting.getMotionNum(t);...
    method update (line 5) | update(){if(null==this.live2DModel)return void t.error("Failed to upda...
    method setRandomExpression (line 5) | setRandomExpression(){const t=[];for(const e in this.expressions)t.pus...
    method startRandomMotion (line 5) | startRandomMotion(t,e){const i=this.modelSetting.getMotionNum(t),s=par...
    method startMotion (line 5) | startMotion(e,i,s){const n=this.modelSetting.getMotionFile(e,i);if(nul...
    method setFadeInFadeOut (line 5) | setFadeInFadeOut(e,i,s,n){const a=this.modelSetting.getMotionFile(e,i)...
    method setExpression (line 5) | setExpression(e){var i;const s=this.expressions[e];t.trace("Expression...
    method draw (line 5) | draw(t){w.push(),w.multMatrix(this.modelMatrix.getArray()),this.tmpMat...
    method hitTest (line 5) | hitTest(t,e,i){const s=this.modelSetting.getHitAreaNum();if(0==s){cons...
  class X (line 5) | class X{constructor(){this.cache={}}loadBytes(t,e){if(t in this.cache)re...
    method constructor (line 5) | constructor(){this.cache={}}
    method loadBytes (line 5) | loadBytes(t,e){if(t in this.cache)return e(this.cache[t]);fetch(t).the...
    method loadLive2DModel (line 5) | loadLive2DModel(t,e){let i=null;this.loadBytes(t,(t=>{i=Live2DModelWeb...
    method loadTexture (line 5) | loadTexture(e,i,s,n){const a=new Image;a.crossOrigin="anonymous",a.src...
    method jsonParseFromBytes (line 5) | jsonParseFromBytes(t){let e;const i=new Uint8Array(t,0,3);e=239==i[0]&...
  class Y (line 5) | class Y{constructor(){this.model=null,this.reloading=!1,Live2D.init(),M....
    method constructor (line 5) | constructor(){this.model=null,this.reloading=!1,Live2D.init(),M.setPla...
    method getModel (line 5) | getModel(){return this.model}
    method releaseModel (line 5) | releaseModel(t){this.model&&(this.model.release(t),this.model=null)}
    method changeModel (line 5) | async changeModel(t,e){return new Promise(((i,s)=>{if(this.reloading)r...
    method changeModelWithJSON (line 5) | async changeModelWithJSON(t,e,i){if(this.reloading)return;this.reloadi...
    method setDrag (line 5) | setDrag(t,e){this.model&&this.model.setDrag(t,e)}
    method maxScaleEvent (line 5) | maxScaleEvent(){t.trace("Max scale event."),this.model&&this.model.sta...
    method minScaleEvent (line 5) | minScaleEvent(){t.trace("Min scale event."),this.model&&this.model.sta...
    method tapEvent (line 5) | tapEvent(e,i){return t.trace("tapEvent view x:"+e+" y:"+i),!!this.mode...
  function j (line 5) | function j(t,e,i,s,n,a){const r=t-i,o=e-s;let h=0,l=0;return h=r>=0?r/(n...
  class G (line 5) | class G{constructor(){this.live2DMgr=new Y,this.isDrawStart=!1,this.gl=n...
    method constructor (line 5) | constructor(){this.live2DMgr=new Y,this.isDrawStart=!1,this.gl=null,th...
    method initL2dCanvas (line 5) | initL2dCanvas(t){this.canvas=document.getElementById(t),this.canvas.ad...
    method init (line 5) | async init(e,i,s){this.initL2dCanvas(e);const n=this.canvas.width,a=th...
    method destroy (line 5) | destroy(){this.canvas&&(this.canvas.removeEventListener("mousewheel",t...
    method startDraw (line 5) | startDraw(){if(!this.isDrawStart){this.isDrawStart=!0;const t=()=>{thi...
    method draw (line 5) | draw(){w.reset(),w.loadIdentity(),this.dragMgr.update(),this.live2DMgr...
    method changeModel (line 5) | async changeModel(t){await this.live2DMgr.changeModel(this.gl,t)}
    method changeModelWithJSON (line 5) | async changeModelWithJSON(t,e){await this.live2DMgr.changeModelWithJSO...
    method modelScaling (line 5) | modelScaling(t){const e=this.viewMatrix.isMaxScale(),i=this.viewMatrix...
    method modelTurnHead (line 5) | modelTurnHead(e){var i;const s=this.canvas.getBoundingClientRect(),{vx...
    method followPointer (line 5) | followPointer(e){var i;const s=this.canvas.getBoundingClientRect(),{vx...
    method lookFront (line 5) | lookFront(){this.dragMgr.setPoint(0,0)}
    method mouseEvent (line 5) | mouseEvent(t){t.preventDefault(),"mousewheel"==t.type?t.wheelDelta>0?t...
    method touchEvent (line 5) | touchEvent(t){t.preventDefault();const e=t.touches[0];if("touchstart"=...
    method transformViewX (line 5) | transformViewX(t){const e=this.deviceToScreen.transformX(t);return thi...
    method transformViewY (line 5) | transformViewY(t){const e=this.deviceToScreen.transformY(t);return thi...
    method transformScreenX (line 5) | transformScreenX(t){return this.deviceToScreen.transformX(t)}
    method transformScreenY (line 5) | transformScreenY(t){return this.deviceToScreen.transformY(t)}

FILE: dist/chunk/index2.js
  class e (line 5) | class e{constructor(t=0){t<1?(this._ptr=[],this._capacity=0,this._size=0...
    method constructor (line 5) | constructor(t=0){t<1?(this._ptr=[],this._capacity=0,this._size=0):(thi...
    method at (line 5) | at(t){return this._ptr[t]}
    method set (line 5) | set(t,e){this._ptr[t]=e}
    method get (line 5) | get(t=0){const e=new Array;for(let i=t;i<this._size;i++)e.push(this._p...
    method pushBack (line 5) | pushBack(t){this._size>=this._capacity&&this.prepareCapacity(0==this._...
    method clear (line 5) | clear(){this._ptr.length=0,this._size=0}
    method getSize (line 5) | getSize(){return this._size}
    method assign (line 5) | assign(t,e){this._size<t&&this.prepareCapacity(t);for(let i=0;i<t;i++)...
    method resize (line 5) | resize(t,e=null){this.updateSize(t,e,!0)}
    method updateSize (line 5) | updateSize(t,e=null,i=!0){if(this._size<t)if(this.prepareCapacity(t),i...
    method insert (line 5) | insert(t,e,i){let s=t._index;const r=e._index,a=i._index,n=a-r;this.pr...
    method remove (line 5) | remove(t){return!(t<0||this._size<=t)&&(this._ptr.splice(t,1),--this._...
    method erase (line 5) | erase(t){const e=t._index;if(e<0||this._size<=e)return t;this._ptr.spl...
    method prepareCapacity (line 5) | prepareCapacity(t){t>this._capacity&&(0==this._capacity?(this._ptr=new...
    method begin (line 5) | begin(){return 0==this._size?this.end():new i(this,0)}
    method end (line 5) | end(){return new i(this,this._size)}
    method getOffset (line 5) | getOffset(t){const i=new e;return i._ptr=this.get(t),i._size=this.get(...
  method constructor (line 5) | constructor(t,e){this._vector=null!=t?t:null,this._index=null!=e?e:0}
  method set (line 5) | set(t){return this._index=t._index,this._vector=t._vector,this}
  method preIncrement (line 5) | preIncrement(){return++this._index,this}
  method preDecrement (line 5) | preDecrement(){return--this._index,this}
  method increment (line 5) | increment(){return new t(this._vector,this._index++)}
  method decrement (line 5) | decrement(){return new t(this._vector,this._index--)}
  method ptr (line 5) | ptr(){return this._vector._ptr[this._index]}
  method substitution (line 5) | substitution(t){return this._index=t._index,this._vector=t._vector,this}
  method notEqual (line 5) | notEqual(t){return this._index!=t._index||this._vector!=t._vector}
  class g (line 5) | class g{append(t,e){return this.s+=void 0!==e?t.substr(0,e):t,this}expan...
    method append (line 5) | append(t,e){return this.s+=void 0!==e?t.substr(0,e):t,this}
    method expansion (line 5) | expansion(t,e){for(let i=0;i<t;i++)this.append(e);return this}
    method getBytes (line 5) | getBytes(){return encodeURIComponent(this.s).replace(/%../g,"x").length}
    method getLength (line 5) | getLength(){return this.s.length}
    method isLess (line 5) | isLess(t){return this.s<t.s}
    method isGreat (line 5) | isGreat(t){return this.s>t.s}
    method isEqual (line 5) | isEqual(t){return this.s==t}
    method isEmpty (line 5) | isEmpty(){return 0==this.s.length}
    method constructor (line 5) | constructor(t){this.s=t}
  class d (line 5) | class d{static createIdInternal(t){return new d(t)}getString(){return th...
    method createIdInternal (line 5) | static createIdInternal(t){return new d(t)}
    method getString (line 5) | getString(){return this._id}
    method isEqual (line 5) | isEqual(t){return"string"==typeof t?this._id.isEqual(t):t instanceof g...
    method isNotEqual (line 5) | isNotEqual(t){return"string"==typeof t?!this._id.isEqual(t):t instance...
    method constructor (line 5) | constructor(t){this._id="string"!=typeof t?t:new g(t)}
  class _ (line 5) | class _{constructor(){this._ids=new e}release(){for(let t=0;t<this._ids....
    method constructor (line 5) | constructor(){this._ids=new e}
    method release (line 5) | release(){for(let t=0;t<this._ids.getSize();++t)this._ids.set(t,void 0...
    method registerIds (line 5) | registerIds(t){for(let e=0;e<t.length;e++)this.registerId(t[e])}
    method registerId (line 5) | registerId(t){let e=null;return"string"!=typeof t?this.registerId(t.s)...
    method getId (line 5) | getId(t){return this.registerId(t)}
    method isExist (line 5) | isExist(t){return"string"==typeof t?null!=this.findId(t):this.isExist(...
    method findId (line 5) | findId(t){for(let e=0;e<this._ids.getSize();++e)if(this._ids.at(e).get...
  class c (line 5) | class c{constructor(){this._tr=new Float32Array(16),this.loadIdentity()}...
    method constructor (line 5) | constructor(){this._tr=new Float32Array(16),this.loadIdentity()}
    method multiply (line 5) | static multiply(t,e,i){const s=new Float32Array([0,0,0,0,0,0,0,0,0,0,0...
    method loadIdentity (line 5) | loadIdentity(){const t=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0...
    method setMatrix (line 5) | setMatrix(t){for(let e=0;e<16;++e)this._tr[e]=t[e]}
    method getArray (line 5) | getArray(){return this._tr}
    method getScaleX (line 5) | getScaleX(){return this._tr[0]}
    method getScaleY (line 5) | getScaleY(){return this._tr[5]}
    method getTranslateX (line 5) | getTranslateX(){return this._tr[12]}
    method getTranslateY (line 5) | getTranslateY(){return this._tr[13]}
    method transformX (line 5) | transformX(t){return this._tr[0]*t+this._tr[12]}
    method transformY (line 5) | transformY(t){return this._tr[5]*t+this._tr[13]}
    method invertTransformX (line 5) | invertTransformX(t){return(t-this._tr[12])/this._tr[0]}
    method invertTransformY (line 5) | invertTransformY(t){return(t-this._tr[13])/this._tr[5]}
    method translateRelative (line 5) | translateRelative(t,e){const i=new Float32Array([1,0,0,0,0,1,0,0,0,0,1...
    method translate (line 5) | translate(t,e){this._tr[12]=t,this._tr[13]=e}
    method translateX (line 5) | translateX(t){this._tr[12]=t}
    method translateY (line 5) | translateY(t){this._tr[13]=t}
    method scaleRelative (line 5) | scaleRelative(t,e){const i=new Float32Array([t,0,0,0,0,e,0,0,0,0,1,0,0...
    method scale (line 5) | scale(t,e){this._tr[0]=t,this._tr[5]=e}
    method multiplyByMatrix (line 5) | multiplyByMatrix(t){c.multiply(t.getArray(),this._tr,this._tr)}
    method clone (line 5) | clone(){const t=new c;for(let e=0;e<this._tr.length;e++)t._tr[e]=this....
  class m (line 5) | class m{constructor(t,e,i,s){this.x=t,this.y=e,this.width=i,this.height=...
    method constructor (line 5) | constructor(t,e,i,s){this.x=t,this.y=e,this.width=i,this.height=s}
    method getCenterX (line 5) | getCenterX(){return this.x+.5*this.width}
    method getCenterY (line 5) | getCenterY(){return this.y+.5*this.height}
    method getRight (line 5) | getRight(){return this.x+this.width}
    method getBottom (line 5) | getBottom(){return this.y+this.height}
    method setRect (line 5) | setRect(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}
    method expand (line 5) | expand(t,e){this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e}
  class p (line 5) | class p{static create(){return null}static delete(t){}initialize(t){this...
    method create (line 5) | static create(){return null}
    method delete (line 5) | static delete(t){}
    method initialize (line 5) | initialize(t){this._model=t}
    method drawModel (line 5) | drawModel(){null!=this.getModel()&&(this.saveProfile(),this.doDrawMode...
    method setMvpMatrix (line 5) | setMvpMatrix(t){this._mvpMatrix4x4.setMatrix(t.getArray())}
    method getMvpMatrix (line 5) | getMvpMatrix(){return this._mvpMatrix4x4}
    method setModelColor (line 5) | setModelColor(t,e,i,s){t<0?t=0:t>1&&(t=1),e<0?e=0:e>1&&(e=1),i<0?i=0:i...
    method getModelColor (line 5) | getModelColor(){return JSON.parse(JSON.stringify(this._modelColor))}
    method getModelColorWithOpacity (line 5) | getModelColorWithOpacity(t){const e=this.getModelColor();return e.a*=t...
    method setIsPremultipliedAlpha (line 5) | setIsPremultipliedAlpha(t){this._isPremultipliedAlpha=t}
    method isPremultipliedAlpha (line 5) | isPremultipliedAlpha(){return this._isPremultipliedAlpha}
    method setIsCulling (line 5) | setIsCulling(t){this._isCulling=t}
    method isCulling (line 5) | isCulling(){return this._isCulling}
    method setAnisotropy (line 5) | setAnisotropy(t){this._anisotropy=t}
    method getAnisotropy (line 5) | getAnisotropy(){return this._anisotropy}
    method getModel (line 5) | getModel(){return this._model}
    method useHighPrecisionMask (line 5) | useHighPrecisionMask(t){this._useHighPrecisionMask=t}
    method isUsingHighPrecisionMask (line 5) | isUsingHighPrecisionMask(){return this._useHighPrecisionMask}
    method constructor (line 5) | constructor(){this._isCulling=!1,this._isPremultipliedAlpha=!1,this._a...
  class f (line 5) | class f{constructor(t=1,e=1,i=1,s=1){this.r=t,this.g=e,this.b=i,this.a=s}}
    method constructor (line 5) | constructor(t=1,e=1,i=1,s=1){this.r=t,this.g=e,this.b=i,this.a=s}
  class y (line 5) | class y{constructor(t,e){this._clippingIdList=t,this._clippingIdCount=e,...
    method constructor (line 5) | constructor(t,e){this._clippingIdList=t,this._clippingIdCount=e,this._...
    method release (line 5) | release(){null!=this._layoutBounds&&(this._layoutBounds=null),null!=th...
    method addClippedDrawable (line 5) | addClippedDrawable(t){this._clippedDrawableIndexList.push(t)}
  class P (line 5) | class P{static print(t,e,i){if(t<$.getLoggingLevel())return;const s=$.co...
    method print (line 5) | static print(t,e,i){if(t<$.getLoggingLevel())return;const s=$.coreLogF...
    method dumpBytes (line 5) | static dumpBytes(t,e,i){for(let s=0;s<i;s++)s%16==0&&s>0?this.print(t,...
    method constructor (line 5) | constructor(){}
  class F (line 5) | class F{constructor(t,e){this.first=null==t?null:t,this.second=null==e?n...
    method constructor (line 5) | constructor(t,e){this.first=null==t?null:t,this.second=null==e?null:e}
  class I (line 5) | class I{constructor(t){null!=t?t<1?(this._keyValues=[],this._dummyValue=...
    method constructor (line 5) | constructor(t){null!=t?t<1?(this._keyValues=[],this._dummyValue=null,t...
    method release (line 5) | release(){this.clear()}
    method appendKey (line 5) | appendKey(t){let e=-1;for(let i=0;i<this._size;i++)if(this._keyValues[...
    method getValue (line 5) | getValue(t){let e=-1;for(let i=0;i<this._size;i++)if(this._keyValues[i...
    method setValue (line 5) | setValue(t,e){let i=-1;for(let e=0;e<this._size;e++)if(this._keyValues...
    method isExist (line 5) | isExist(t){for(let e=0;e<this._size;e++)if(this._keyValues[e].first==t...
    method clear (line 5) | clear(){this._keyValues=void 0,this._keyValues=null,this._keyValues=[]...
    method getSize (line 5) | getSize(){return this._size}
    method prepareCapacity (line 5) | prepareCapacity(t,e){t>this._keyValues.length&&(0==this._keyValues.len...
    method begin (line 5) | begin(){return new V(this,0)}
    method end (line 5) | end(){return new V(this,this._size)}
    method erase (line 5) | erase(t){const e=t._index;if(e<0||this._size<=e)return t;this._keyValu...
    method dumpAsInt (line 5) | dumpAsInt(){for(let t=0;t<this._size;t++)x("{0} ,",this._keyValues[t])...
  class V (line 5) | class V{constructor(t,e){this._map=null!=t?t:new I,this._index=null!=e?e...
    method constructor (line 5) | constructor(t,e){this._map=null!=t?t:new I,this._index=null!=e?e:0}
    method set (line 5) | set(t){return this._index=t._index,this._map=t._map,this}
    method preIncrement (line 5) | preIncrement(){return++this._index,this}
    method preDecrement (line 5) | preDecrement(){return--this._index,this}
    method increment (line 5) | increment(){return new V(this._map,this._index++)}
    method decrement (line 5) | decrement(){const t=new V(this._map,this._index);return this._map=t._m...
    method ptr (line 5) | ptr(){return this._map._keyValues[this._index]}
    method notEqual (line 5) | notEqual(t){return this._index!=t._index||this._map!=t._map}
  class E (line 5) | class E{static parseJsonObject(t,e){return Object.keys(t).forEach((i=>{i...
    method parseJsonObject (line 5) | static parseJsonObject(t,e){return Object.keys(t).forEach((i=>{if("boo...
    method parseJsonArray (line 5) | static parseJsonArray(t){const e=new z;return Object.keys(t).forEach((...
  method constructor (line 5) | constructor(){}
  method getRawString (line 5) | getRawString(t,e){return this.getString(t,e)}
  method toInt (line 5) | toInt(t=0){return t}
  method toFloat (line 5) | toFloat(t=0){return t}
  method toBoolean (line 5) | toBoolean(t=!1){return t}
  method getSize (line 5) | getSize(){return 0}
  method getArray (line 5) | getArray(t=null){return t}
  method getVector (line 5) | getVector(t=new e){return t}
  method getMap (line 5) | getMap(t){return t}
  method getValueByIndex (line 5) | getValueByIndex(e){return t.errorValue.setErrorNotForClientCall(R)}
  method getValueByString (line 5) | getValueByString(e){return t.nullValue.setErrorNotForClientCall(R)}
  method getKeys (line 5) | getKeys(){return t.dummyKeys}
  method isError (line 5) | isError(){return!1}
  method isNull (line 5) | isNull(){return!1}
  method isBool (line 5) | isBool(){return!1}
  method isFloat (line 5) | isFloat(){return!1}
  method isString (line 5) | isString(){return!1}
  method isArray (line 5) | isArray(){return!1}
  method isMap (line 5) | isMap(){return!1}
  method equals (line 5) | equals(t){return!1}
  method isStatic (line 5) | isStatic(){return!1}
  method setErrorNotForClientCall (line 5) | setErrorNotForClientCall(t){return k.errorValue}
  method staticInitializeNotForClientCall (line 5) | static staticInitializeNotForClientCall(){A.trueValue=new A(!0),A.falseV...
  method staticReleaseNotForClientCall (line 5) | static staticReleaseNotForClientCall(){A.trueValue=null,A.falseValue=nul...
  class L (line 5) | class L{constructor(t,e){this._parseCallback=E.parseJsonObject,this._err...
    method constructor (line 5) | constructor(t,e){this._parseCallback=E.parseJsonObject,this._error=nul...
    method create (line 5) | static create(t,e){const i=new L;return i.parseBytes(t,e,i._parseCallb...
    method delete (line 5) | static delete(t){}
    method getRoot (line 5) | getRoot(){return this._root}
    method arrayBufferToString (line 5) | static arrayBufferToString(t){const e=new Uint8Array(t);let i="";for(l...
    method pad (line 5) | static pad(t){return t.length<2?"0"+t:t}
    method parseBytes (line 5) | parseBytes(t,e,i){const s=new Array(1),r=L.arrayBufferToString(t);if(t...
    method getParseError (line 5) | getParseError(){return this._error}
    method checkEndOfFile (line 5) | checkEndOfFile(){return this._root.getArray()[1].equals("EOF")}
    method parseValue (line 5) | parseValue(t,e,i,s){if(this._error)return null;let r,a=null,n=i;for(;n...
    method parseString (line 5) | parseString(t,e,i,s){if(this._error)return null;if(!t)return this._err...
    method parseObject (line 5) | parseObject(t,e,i,s){if(this._error)return null;if(!t)return this._err...
    method parseArray (line 5) | parseArray(t,e,i,s){if(this._error)return null;if(!t)return this._erro...
  class D (line 5) | class D extends T{constructor(t){super(),this._value=t}isFloat(){return!...
    method constructor (line 5) | constructor(t){super(),this._value=t}
    method isFloat (line 5) | isFloat(){return!0}
    method getString (line 5) | getString(t,e){return this._value=parseFloat("\0"),this._stringBuffer=...
    method toInt (line 5) | toInt(t=0){return parseInt(this._value.toString())}
    method toFloat (line 5) | toFloat(t=0){return this._value}
    method equals (line 5) | equals(t){return"number"==typeof t&&(!Math.round(t)&&t==this._value)}
  class A (line 5) | class A extends T{isBool(){return!0}toBoolean(t=!1){return this._boolVal...
    method isBool (line 5) | isBool(){return!0}
    method toBoolean (line 5) | toBoolean(t=!1){return this._boolValue}
    method getString (line 5) | getString(t,e){return this._stringBuffer=this._boolValue?"true":"false...
    method equals (line 5) | equals(t){return"boolean"==typeof t&&t==this._boolValue}
    method isStatic (line 5) | isStatic(){return!0}
    method constructor (line 5) | constructor(t){super(),this._boolValue=t}
  class O (line 5) | class O extends T{constructor(t){super(),"string"==typeof t&&(this._stri...
    method constructor (line 5) | constructor(t){super(),"string"==typeof t&&(this._stringBuffer=t),t in...
    method isString (line 5) | isString(){return!0}
    method getString (line 5) | getString(t,e){return this._stringBuffer}
    method equals (line 5) | equals(t){return"string"==typeof t?this._stringBuffer==t:t instanceof ...
  class k (line 5) | class k extends O{isStatic(){return this._isStatic}setErrorNotForClientC...
    method isStatic (line 5) | isStatic(){return this._isStatic}
    method setErrorNotForClientCall (line 5) | setErrorNotForClientCall(t){return this._stringBuffer=t,this}
    method constructor (line 5) | constructor(t,e){super(t),this._isStatic=e}
    method isError (line 5) | isError(){return!0}
  class N (line 5) | class N extends T{isNull(){return!0}getString(t,e){return this._stringBu...
    method isNull (line 5) | isNull(){return!0}
    method getString (line 5) | getString(t,e){return this._stringBuffer}
    method isStatic (line 5) | isStatic(){return!0}
    method setErrorNotForClientCall (line 5) | setErrorNotForClientCall(t){return this._stringBuffer=t,k.nullValue}
    method constructor (line 5) | constructor(){super(),this._stringBuffer="NullValue"}
  class z (line 5) | class z extends T{constructor(){super(),this._array=new e}release(){for(...
    method constructor (line 5) | constructor(){super(),this._array=new e}
    method release (line 5) | release(){for(let t=this._array.begin();t.notEqual(this._array.end());...
    method isArray (line 5) | isArray(){return!0}
    method getValueByIndex (line 5) | getValueByIndex(t){if(t<0||this._array.getSize()<=t)return T.errorValu...
    method getValueByString (line 5) | getValueByString(t){return T.errorValue.setErrorNotForClientCall(R)}
    method getString (line 5) | getString(t,e){const i=e+"[\n";for(let t=this._array.begin();t.notEqua...
    method add (line 5) | add(t){this._array.pushBack(t)}
    method getVector (line 5) | getVector(t=null){return this._array}
    method getSize (line 5) | getSize(){return this._array.getSize()}
  class U (line 5) | class U extends T{constructor(){super(),this._map=new I}release(){const ...
    method constructor (line 5) | constructor(){super(),this._map=new I}
    method release (line 5) | release(){const t=this._map.begin();for(;t.notEqual(this._map.end());)...
    method isMap (line 5) | isMap(){return!0}
    method getValueByString (line 5) | getValueByString(t){if(t instanceof g){const e=this._map.getValue(t.s)...
    method getValueByIndex (line 5) | getValueByIndex(t){return T.errorValue.setErrorNotForClientCall(R)}
    method getString (line 5) | getString(t,e){this._stringBuffer=e+"{\n";const i=this._map.begin();fo...
    method getMap (line 5) | getMap(t){return this._map}
    method put (line 5) | put(t,e){this._map.setValue(t,e)}
    method getKeys (line 5) | getKeys(){if(!this._keys){this._keys=new e;const t=this._map.begin();f...
    method getSize (line 5) | getSize(){return this._keys.getSize()}
  function X (line 5) | function X(t,e){let i=0;for(let e=1;;e++){const s=t.slice(e-1,e);if("e"=...
  function J (line 5) | function J(t){t&&(t=void 0)}
  class $ (line 5) | class ${static startUp(t=null){if(Y)return M("CubismFramework.startUp() ...
    method startUp (line 5) | static startUp(t=null){if(Y)return M("CubismFramework.startUp() is alr...
    method cleanUp (line 5) | static cleanUp(){Y=!1,j=!1,H=null,q=null}
    method initialize (line 5) | static initialize(t=0){C(Y),Y?j?v("CubismFramework.initialize() skippe...
    method dispose (line 5) | static dispose(){C(Y),Y?j?(T.staticReleaseNotForClientCall(),q.release...
    method isStarted (line 5) | static isStarted(){return Y}
    method isInitialized (line 5) | static isInitialized(){return j}
    method coreLogFunction (line 5) | static coreLogFunction(t){Live2DCubismCore.Logging.csmGetLogFunction()...
    method getLoggingLevel (line 5) | static getLoggingLevel(){return null!=H?H.loggingLevel:K.LogLevel_Off}
    method getIdManager (line 5) | static getIdManager(){return q}
    method constructor (line 5) | constructor(){}
  class Z (line 5) | class Z{}
  class at (line 5) | class at{static loadFileAsBytes(t,e){fetch(t).then((t=>t.arrayBuffer()))...
    method loadFileAsBytes (line 5) | static loadFileAsBytes(t,e){fetch(t).then((t=>t.arrayBuffer())).then((...
    method getDeltaTime (line 5) | static getDeltaTime(){return this.deltaTime}
    method updateTime (line 5) | static updateTime(){this.currentFrame=Date.now(),this.deltaTime=(this....
    method printMessage (line 5) | static printMessage(t){console.trace(t)}
  class nt (line 5) | class nt{constructor(){this._gl=null,this._gl=null}initialize(t){return ...
    method constructor (line 5) | constructor(){this._gl=null,this._gl=null}
    method initialize (line 5) | initialize(t){return this._gl=t.getContext("webgl2"),!!this._gl||(aler...
    method release (line 5) | release(){}
    method getGl (line 5) | getGl(){return this._gl}
  class mt (line 5) | class mt{}
  class pt (line 5) | class pt extends mt{constructor(t,i){super(),this.version="Version",this...
    method constructor (line 5) | constructor(t,i){super(),this.version="Version",this.fileReferences="F...
    method release (line 5) | release(){L.delete(this._json),this._jsonValue=null}
    method getJson (line 5) | getJson(){return this._json}
    method getModelFileName (line 5) | getModelFileName(){return this.isExistModelFile()?this._jsonValue.at(u...
    method getTextureCount (line 5) | getTextureCount(){return this.isExistTextureFiles()?this._jsonValue.at...
    method getTextureDirectory (line 5) | getTextureDirectory(){const t=this._jsonValue.at(ut.FrequestNode_Textu...
    method getTextureFileName (line 5) | getTextureFileName(t){return this._jsonValue.at(ut.FrequestNode_Textur...
    method getHitAreasCount (line 5) | getHitAreasCount(){return this.isExistHitAreas()?this._jsonValue.at(ut...
    method getHitAreaId (line 5) | getHitAreaId(t){return $.getIdManager().getId(this._jsonValue.at(ut.Fr...
    method getHitAreaName (line 5) | getHitAreaName(t){return this._jsonValue.at(ut.FrequestNode_HitAreas)....
    method getPhysicsFileName (line 5) | getPhysicsFileName(){return this.isExistPhysicsFile()?this._jsonValue....
    method getPoseFileName (line 5) | getPoseFileName(){return this.isExistPoseFile()?this._jsonValue.at(ut....
    method getExpressionCount (line 5) | getExpressionCount(){return this.isExistExpressionFile()?this._jsonVal...
    method getExpressionName (line 5) | getExpressionName(t){return this._jsonValue.at(ut.FrequestNode_Express...
    method getExpressionFileName (line 5) | getExpressionFileName(t){return this._jsonValue.at(ut.FrequestNode_Exp...
    method getMotionGroupCount (line 5) | getMotionGroupCount(){return this.isExistMotionGroups()?this._jsonValu...
    method getMotionGroupName (line 5) | getMotionGroupName(t){return this.isExistMotionGroups()?this._jsonValu...
    method getMotionCount (line 5) | getMotionCount(t){return this.isExistMotionGroupName(t)?this._jsonValu...
    method getMotionFileName (line 5) | getMotionFileName(t,e){return this.isExistMotionGroupName(t)?this._jso...
    method getMotionSoundFileName (line 5) | getMotionSoundFileName(t,e){return this.isExistMotionSoundFile(t,e)?th...
    method getMotionFadeInTimeValue (line 5) | getMotionFadeInTimeValue(t,e){return this.isExistMotionFadeIn(t,e)?thi...
    method getMotionFadeOutTimeValue (line 5) | getMotionFadeOutTimeValue(t,e){return this.isExistMotionFadeOut(t,e)?t...
    method getUserDataFile (line 5) | getUserDataFile(){return this.isExistUserDataFile()?this.getJson().get...
    method getLayoutMap (line 5) | getLayoutMap(t){const e=this.getJson().getRoot().getValueByString(this...
    method getEyeBlinkParameterCount (line 5) | getEyeBlinkParameterCount(){if(!this.isExistEyeBlinkParameters())retur...
    method getEyeBlinkParameterId (line 5) | getEyeBlinkParameterId(t){if(!this.isExistEyeBlinkParameters())return ...
    method getLipSyncParameterCount (line 5) | getLipSyncParameterCount(){if(!this.isExistLipSyncParameters())return ...
    method getLipSyncParameterId (line 5) | getLipSyncParameterId(t){if(!this.isExistLipSyncParameters())return nu...
    method isExistModelFile (line 5) | isExistModelFile(){const t=this._jsonValue.at(ut.FrequestNode_Moc);ret...
    method isExistTextureFiles (line 5) | isExistTextureFiles(){const t=this._jsonValue.at(ut.FrequestNode_Textu...
    method isExistHitAreas (line 5) | isExistHitAreas(){const t=this._jsonValue.at(ut.FrequestNode_HitAreas)...
    method isExistPhysicsFile (line 5) | isExistPhysicsFile(){const t=this._jsonValue.at(ut.FrequestNode_Physic...
    method isExistPoseFile (line 5) | isExistPoseFile(){const t=this._jsonValue.at(ut.FrequestNode_Pose);ret...
    method isExistExpressionFile (line 5) | isExistExpressionFile(){const t=this._jsonValue.at(ut.FrequestNode_Exp...
    method isExistMotionGroups (line 5) | isExistMotionGroups(){const t=this._jsonValue.at(ut.FrequestNode_Motio...
    method isExistMotionGroupName (line 5) | isExistMotionGroupName(t){const e=this._jsonValue.at(ut.FrequestNode_M...
    method isExistMotionSoundFile (line 5) | isExistMotionSoundFile(t,e){const i=this._jsonValue.at(ut.FrequestNode...
    method isExistMotionFadeIn (line 5) | isExistMotionFadeIn(t,e){const i=this._jsonValue.at(ut.FrequestNode_Mo...
    method isExistMotionFadeOut (line 5) | isExistMotionFadeOut(t,e){const i=this._jsonValue.at(ut.FrequestNode_M...
    method isExistUserDataFile (line 5) | isExistUserDataFile(){const t=this.getJson().getRoot().getValueByStrin...
    method isExistEyeBlinkParameters (line 5) | isExistEyeBlinkParameters(){if(this._jsonValue.at(ut.FrequestNode_Grou...
    method isExistLipSyncParameters (line 5) | isExistLipSyncParameters(){if(this._jsonValue.at(ut.FrequestNode_Group...
  class ft (line 5) | class ft{static create(){return new ft}static delete(t){}setParameters(t...
    method create (line 5) | static create(){return new ft}
    method delete (line 5) | static delete(t){}
    method setParameters (line 5) | setParameters(t){this._breathParameters=t}
    method getParameters (line 5) | getParameters(){return this._breathParameters}
    method updateParameters (line 5) | updateParameters(t,e){this._currentTime+=e;const i=2*this._currentTime...
    method constructor (line 5) | constructor(){this._currentTime=0}
  class yt (line 5) | class yt{constructor(t,e,i,s,r){this.parameterId=null==t?null:t,this.off...
    method constructor (line 5) | constructor(t,e,i,s,r){this.parameterId=null==t?null:t,this.offset=nul...
  class St (line 5) | class St{static create(t=null){return new St(t)}static delete(t){}setBli...
    method create (line 5) | static create(t=null){return new St(t)}
    method delete (line 5) | static delete(t){}
    method setBlinkingInterval (line 5) | setBlinkingInterval(t){this._blinkingIntervalSeconds=t}
    method setBlinkingSetting (line 5) | setBlinkingSetting(t,e,i){this._closingSeconds=t,this._closedSeconds=e...
    method setParameterIds (line 5) | setParameterIds(t){this._parameterIds=t}
    method getParameterIds (line 5) | getParameterIds(){return this._parameterIds}
    method updateParameters (line 5) | updateParameters(t,e){let i;this._userTimeSeconds+=e;let s=0;switch(th...
    method constructor (line 5) | constructor(t){if(this._blinkingState=_t.EyeState_First,this._nextBlin...
    method determinNextBlinkingTiming (line 5) | determinNextBlinkingTiming(){const t=Math.random();return this._userTi...
  class Mt (line 5) | class Mt{static create(t,e){const i=L.create(t,e);if(!i)return null;cons...
    method create (line 5) | static create(t,e){const i=L.create(t,e);if(!i)return null;const s=new...
    method delete (line 5) | static delete(t){}
    method updateParameters (line 5) | updateParameters(t,e){t!=this._lastModel&&this.reset(t),this._lastMode...
    method reset (line 5) | reset(t){let e=0;for(let i=0;i<this._partGroupCounts.getSize();++i){co...
    method copyPartOpacities (line 5) | copyPartOpacities(t){for(let e=0;e<this._partGroups.getSize();++e){con...
    method doFade (line 5) | doFade(t,e,i,s){let r=-1,a=1;const n=.5;for(let n=i;n<i+s;++n){const i...
    method constructor (line 5) | constructor(){this._fadeTimeSeconds=.5,this._lastModel=null,this._part...
  class vt (line 5) | class vt{constructor(t){if(this.parameterIndex=0,this.partIndex=0,this.l...
    method constructor (line 5) | constructor(t){if(this.parameterIndex=0,this.partIndex=0,this.link=new...
    method assignment (line 5) | assignment(t){this.partId=t.partId;for(const e=t.link.begin();e.notEqu...
    method initialize (line 5) | initialize(t){this.parameterIndex=t.getParameterIndex(this.partId),thi...
    method clone (line 5) | clone(){const t=new vt;t.partId=this.partId,t.parameterIndex=this.para...
  class Ft (line 5) | class Ft extends c{constructor(t,e){super(),this._width=void 0!==t?t:0,t...
    method constructor (line 5) | constructor(t,e){super(),this._width=void 0!==t?t:0,this._height=void ...
    method setWidth (line 5) | setWidth(t){const e=t/this._width,i=e;this.scale(e,i)}
    method setHeight (line 5) | setHeight(t){const e=t/this._height,i=e;this.scale(e,i)}
    method setPosition (line 5) | setPosition(t,e){this.translate(t,e)}
    method setCenterPosition (line 5) | setCenterPosition(t,e){this.centerX(t),this.centerY(e)}
    method top (line 5) | top(t){this.setY(t)}
    method bottom (line 5) | bottom(t){const e=this._height*this.getScaleY();this.translateY(t-e)}
    method left (line 5) | left(t){this.setX(t)}
    method right (line 5) | right(t){const e=this._width*this.getScaleX();this.translateX(t-e)}
    method centerX (line 5) | centerX(t){const e=this._width*this.getScaleX();this.translateX(t-e/2)}
    method setX (line 5) | setX(t){this.translateX(t)}
    method centerY (line 5) | centerY(t){const e=this._height*this.getScaleY();this.translateY(t-e/2)}
    method setY (line 5) | setY(t){this.translateY(t)}
    method setupFromLayout (line 5) | setupFromLayout(t){for(const e=t.begin();e.notEqual(t.end());e.preIncr...
  class It (line 5) | class It{constructor(t,e){this.x=t,this.y=e,this.x=null==t?0:t,this.y=nu...
    method constructor (line 5) | constructor(t,e){this.x=t,this.y=e,this.x=null==t?0:t,this.y=null==e?0:e}
    method add (line 5) | add(t){const e=new It(0,0);return e.x=this.x+t.x,e.y=this.y+t.y,e}
    method substract (line 5) | substract(t){const e=new It(0,0);return e.x=this.x-t.x,e.y=this.y-t.y,e}
    method multiply (line 5) | multiply(t){const e=new It(0,0);return e.x=this.x*t.x,e.y=this.y*t.y,e}
    method multiplyByScaler (line 5) | multiplyByScaler(t){return this.multiply(new It(t,t))}
    method division (line 5) | division(t){const e=new It(0,0);return e.x=this.x/t.x,e.y=this.y/t.y,e}
    method divisionByScalar (line 5) | divisionByScalar(t){return this.division(new It(t,t))}
    method getLength (line 5) | getLength(){return Math.sqrt(this.x*this.x+this.y*this.y)}
    method getDistanceWith (line 5) | getDistanceWith(t){return Math.sqrt((this.x-t.x)*(this.x-t.x)+(this.y-...
    method dot (line 5) | dot(t){return this.x*t.x+this.y*t.y}
    method normalize (line 5) | normalize(){const t=Math.pow(this.x*this.x+this.y*this.y,.5);this.x=th...
    method isEqual (line 5) | isEqual(t){return this.x==t.x&&this.y==t.y}
    method isNotEqual (line 5) | isNotEqual(t){return!this.isEqual(t)}
  class Vt (line 5) | class Vt{static range(t,e,i){return t<e?t=e:t>i&&(t=i),t}static sin(t){r...
    method range (line 5) | static range(t,e,i){return t<e?t=e:t>i&&(t=i),t}
    method sin (line 5) | static sin(t){return Math.sin(t)}
    method cos (line 5) | static cos(t){return Math.cos(t)}
    method abs (line 5) | static abs(t){return Math.abs(t)}
    method sqrt (line 5) | static sqrt(t){return Math.sqrt(t)}
    method cbrt (line 5) | static cbrt(t){if(0===t)return t;let e=t;const i=e<0;let s;return i&&(...
    method getEasingSine (line 5) | static getEasingSine(t){return t<0?0:t>1?1:.5-.5*this.cos(t*Math.PI)}
    method max (line 5) | static max(t,e){return t>e?t:e}
    method min (line 5) | static min(t,e){return t>e?e:t}
    method clamp (line 5) | static clamp(t,e,i){return t<e?e:i<t?i:t}
    method degreesToRadian (line 5) | static degreesToRadian(t){return t/180*Math.PI}
    method radianToDegrees (line 5) | static radianToDegrees(t){return 180*t/Math.PI}
    method directionToRadian (line 5) | static directionToRadian(t,e){let i=Math.atan2(e.y,e.x)-Math.atan2(t.y...
    method directionToDegrees (line 5) | static directionToDegrees(t,e){const i=this.directionToRadian(t,e);let...
    method radianToDirection (line 5) | static radianToDirection(t){const e=new It;return e.x=this.sin(t),e.y=...
    method quadraticEquation (line 5) | static quadraticEquation(t,e,i){return this.abs(t)<Vt.Epsilon?this.abs...
    method cardanoAlgorithmForBezier (line 5) | static cardanoAlgorithmForBezier(t,e,i,s){if(this.abs(t)<Vt.Epsilon)re...
    method mod (line 5) | static mod(t,e){if(!isFinite(t)||0===e||isNaN(t)||isNaN(e))return cons...
    method constructor (line 5) | constructor(){}
  class Et (line 5) | class Et{constructor(){this._faceTargetX=0,this._faceTargetY=0,this._fac...
    method constructor (line 5) | constructor(){this._faceTargetX=0,this._faceTargetY=0,this._faceX=0,th...
    method update (line 5) | update(t){this._userTimeSeconds+=t;const e=4/30;if(0==this._lastTimeSe...
    method getX (line 5) | getX(){return this._faceX}
    method getY (line 5) | getY(){return this._faceY}
    method set (line 5) | set(t,e){this._faceTargetX=t,this._faceTargetY=e}
  class Lt (line 5) | class Lt{static delete(t){t.release(),t=null}constructor(){this.setBegan...
    method delete (line 5) | static delete(t){t.release(),t=null}
    method constructor (line 5) | constructor(){this.setBeganMotionHandler=t=>this._onBeganMotion=t,this...
    method release (line 5) | release(){this._weight=0}
    method updateParameters (line 5) | updateParameters(t,e,i){if(!e.isAvailable()||e.isFinished())return;thi...
    method setupMotionQueueEntry (line 5) | setupMotionQueueEntry(t,e){null==t||t.isStarted()||t.isAvailable()&&(t...
    method updateFadeWeight (line 5) | updateFadeWeight(t,e){null==t&&P.print(K.LogLevel_Error,"motionQueueEn...
    method setFadeInTime (line 5) | setFadeInTime(t){this._fadeInSeconds=t}
    method setFadeOutTime (line 5) | setFadeOutTime(t){this._fadeOutSeconds=t}
    method getFadeOutTime (line 5) | getFadeOutTime(){return this._fadeOutSeconds}
    method getFadeInTime (line 5) | getFadeInTime(){return this._fadeInSeconds}
    method setWeight (line 5) | setWeight(t){this._weight=t}
    method getWeight (line 5) | getWeight(){return this._weight}
    method getDuration (line 5) | getDuration(){return-1}
    method getLoopDuration (line 5) | getLoopDuration(){return-1}
    method setOffsetTime (line 5) | setOffsetTime(t){this._offsetSeconds=t}
    method setLoop (line 5) | setLoop(t){this._isLoop=t}
    method getLoop (line 5) | getLoop(){return this._isLoop}
    method setLoopFadeIn (line 5) | setLoopFadeIn(t){this._isLoopFadeIn=t}
    method getLoopFadeIn (line 5) | getLoopFadeIn(){return this._isLoopFadeIn}
    method getFiredEvent (line 5) | getFiredEvent(t,e){return this._firedEventValues}
    method isExistModelOpacity (line 5) | isExistModelOpacity(){return!1}
    method getModelOpacityIndex (line 5) | getModelOpacityIndex(){return-1}
    method getModelOpacityId (line 5) | getModelOpacityId(t){return null}
    method getModelOpacityValue (line 5) | getModelOpacityValue(){return 1}
    method adjustEndTime (line 5) | adjustEndTime(t){const e=this.getDuration(),i=e<=0?-1:t.getStartTime()...
  class Ot (line 5) | class Ot extends Lt{static create(t,e){const i=new Ot;return i.parse(t,e...
    method create (line 5) | static create(t,e){const i=new Ot;return i.parse(t,e),i}
    method doUpdateParameters (line 5) | doUpdateParameters(t,e,i,s){for(let e=0;e<this._parameters.getSize();+...
    method calculateExpressionParameters (line 5) | calculateExpressionParameters(t,e,i,s,r,a){if(null!=i&&null!=s&&i.isAv...
    method getExpressionParameters (line 5) | getExpressionParameters(){return this._parameters}
    method getFadeWeight (line 5) | getFadeWeight(){return this._fadeWeight}
    method parse (line 5) | parse(t,e){const i=L.create(t,e);if(!i)return;const s=i.getRoot();this...
    method calculateValue (line 5) | calculateValue(t,e,i){return t*(1-i)+e*i}
    method constructor (line 5) | constructor(){super(),this._parameters=new e,this._fadeWeight=0}
  class Ut (line 5) | class Ut{}
  class Gt (line 5) | class Gt{constructor(){this._autoDelete=!1,this._motion=null,this._avail...
    method constructor (line 5) | constructor(){this._autoDelete=!1,this._motion=null,this._available=!0...
    method release (line 5) | release(){this._autoDelete&&this._motion&&Lt.delete(this._motion)}
    method setFadeOut (line 5) | setFadeOut(t){this._fadeOutSeconds=t,this._isTriggeredFadeOut=!0}
    method startFadeOut (line 5) | startFadeOut(t,e){const i=e+t;this._isTriggeredFadeOut=!0,(this._endTi...
    method isFinished (line 5) | isFinished(){return this._finished}
    method isStarted (line 5) | isStarted(){return this._started}
    method getStartTime (line 5) | getStartTime(){return this._startTimeSeconds}
    method getFadeInStartTime (line 5) | getFadeInStartTime(){return this._fadeInStartTimeSeconds}
    method getEndTime (line 5) | getEndTime(){return this._endTimeSeconds}
    method setStartTime (line 5) | setStartTime(t){this._startTimeSeconds=t}
    method setFadeInStartTime (line 5) | setFadeInStartTime(t){this._fadeInStartTimeSeconds=t}
    method setEndTime (line 5) | setEndTime(t){this._endTimeSeconds=t}
    method setIsFinished (line 5) | setIsFinished(t){this._finished=t}
    method setIsStarted (line 5) | setIsStarted(t){this._started=t}
    method isAvailable (line 5) | isAvailable(){return this._available}
    method setIsAvailable (line 5) | setIsAvailable(t){this._available=t}
    method setState (line 5) | setState(t,e){this._stateTimeSeconds=t,this._stateWeight=e}
    method getStateTime (line 5) | getStateTime(){return this._stateTimeSeconds}
    method getStateWeight (line 5) | getStateWeight(){return this._stateWeight}
    method getLastCheckEventSeconds (line 5) | getLastCheckEventSeconds(){return this._lastEventCheckSeconds}
    method setLastCheckEventSeconds (line 5) | setLastCheckEventSeconds(t){this._lastEventCheckSeconds=t}
    method isTriggeredFadeOut (line 5) | isTriggeredFadeOut(){return this._isTriggeredFadeOut}
    method getFadeOutSeconds (line 5) | getFadeOutSeconds(){return this._fadeOutSeconds}
    method getCubismMotion (line 5) | getCubismMotion(){return this._motion}
  class Xt (line 5) | class Xt{constructor(){this._userTimeSeconds=0,this._eventCallBack=null,...
    method constructor (line 5) | constructor(){this._userTimeSeconds=0,this._eventCallBack=null,this._e...
    method release (line 5) | release(){for(let t=0;t<this._motions.getSize();++t)this._motions.at(t...
    method startMotion (line 5) | startMotion(t,e,i){if(null==t)return Yt;let s=null;for(let t=0;t<this....
    method isFinished (line 5) | isFinished(){for(let t=this._motions.begin();t.notEqual(this._motions....
    method isFinishedByHandle (line 5) | isFinishedByHandle(t){for(let e=this._motions.begin();e.notEqual(this....
    method stopAllMotions (line 5) | stopAllMotions(){for(let t=this._motions.begin();t.notEqual(this._moti...
    method getCubismMotionQueueEntries (line 5) | getCubismMotionQueueEntries(){return this._motions}
    method getCubismMotionQueueEntry (line 5) | getCubismMotionQueueEntry(t){for(let e=this._motions.begin();e.notEqua...
    method setEventCallback (line 5) | setEventCallback(t,e=null){this._eventCallBack=t,this._eventCustomData=e}
    method doUpdateMotion (line 5) | doUpdateMotion(t,e){let i=!1;for(let s=this._motions.begin();s.notEqua...
  class $t (line 5) | class $t{}
  class Zt (line 5) | class Zt extends Xt{constructor(){super(),this._currentPriority=0,this._...
    method constructor (line 5) | constructor(){super(),this._currentPriority=0,this._reservePriority=0,...
    method release (line 5) | release(){this._expressionParameterValues&&(J(this._expressionParamete...
    method getCurrentPriority (line 5) | getCurrentPriority(){return M("CubismExpressionMotionManager.getCurren...
    method getReservePriority (line 5) | getReservePriority(){return M("CubismExpressionMotionManager.getReserv...
    method getFadeWeight (line 5) | getFadeWeight(t){return t<0||this._fadeWeights.getSize()<1||t>=this._f...
    method setFadeWeight (line 5) | setFadeWeight(t,e){t<0||this._fadeWeights.getSize()<1||this._fadeWeigh...
    method setReservePriority (line 5) | setReservePriority(t){M("CubismExpressionMotionManager.setReservePrior...
    method startMotionPriority (line 5) | startMotionPriority(t,e,i){return M("CubismExpressionMotionManager.sta...
    method updateMotion (line 5) | updateMotion(t,e){this._userTimeSeconds+=e;let i=!1;const s=this.getCu...
  class Kt (line 5) | class Kt{constructor(){this.time=0,this.value=0}}
    method constructor (line 5) | constructor(){this.time=0,this.value=0}
  class Qt (line 5) | class Qt{constructor(){this.evaluate=null,this.basePointIndex=0,this.seg...
    method constructor (line 5) | constructor(){this.evaluate=null,this.basePointIndex=0,this.segmentTyp...
  class te (line 5) | class te{constructor(){this.type=qt.CubismMotionCurveTarget_Model,this.s...
    method constructor (line 5) | constructor(){this.type=qt.CubismMotionCurveTarget_Model,this.segmentC...
  class ee (line 5) | class ee{constructor(){this.fireTime=0}}
    method constructor (line 5) | constructor(){this.fireTime=0}
  class ie (line 5) | class ie{constructor(){this.duration=0,this.loop=!1,this.curveCount=0,th...
    method constructor (line 5) | constructor(){this.duration=0,this.loop=!1,this.curveCount=0,this.even...
  class he (line 5) | class he{constructor(t,e){this._json=L.create(t,e)}release(){L.delete(th...
    method constructor (line 5) | constructor(t,e){this._json=L.create(t,e)}
    method release (line 5) | release(){L.delete(this._json)}
    method getMotionDuration (line 5) | getMotionDuration(){return this._json.getRoot().getValueByString(se).g...
    method isMotionLoop (line 5) | isMotionLoop(){return this._json.getRoot().getValueByString(se).getVal...
    method hasConsistency (line 5) | hasConsistency(){let t=!0;if(!this._json||!this._json.getRoot())return...
    method getEvaluationOptionFlag (line 5) | getEvaluationOptionFlag(t){return ue.EvaluationOptionFlag_AreBeziersRi...
    method getMotionCurveCount (line 5) | getMotionCurveCount(){return this._json.getRoot().getValueByString(se)...
    method getMotionFps (line 5) | getMotionFps(){return this._json.getRoot().getValueByString(se).getVal...
    method getMotionTotalSegmentCount (line 5) | getMotionTotalSegmentCount(){return this._json.getRoot().getValueByStr...
    method getMotionTotalPointCount (line 5) | getMotionTotalPointCount(){return this._json.getRoot().getValueByStrin...
    method isExistMotionFadeInTime (line 5) | isExistMotionFadeInTime(){return!this._json.getRoot().getValueByString...
    method isExistMotionFadeOutTime (line 5) | isExistMotionFadeOutTime(){return!this._json.getRoot().getValueByStrin...
    method getMotionFadeInTime (line 5) | getMotionFadeInTime(){return this._json.getRoot().getValueByString(se)...
    method getMotionFadeOutTime (line 5) | getMotionFadeOutTime(){return this._json.getRoot().getValueByString(se...
    method getMotionCurveTarget (line 5) | getMotionCurveTarget(t){return this._json.getRoot().getValueByString(r...
    method getMotionCurveId (line 5) | getMotionCurveId(t){return $.getIdManager().getId(this._json.getRoot()...
    method isExistMotionCurveFadeInTime (line 5) | isExistMotionCurveFadeInTime(t){return!this._json.getRoot().getValueBy...
    method isExistMotionCurveFadeOutTime (line 5) | isExistMotionCurveFadeOutTime(t){return!this._json.getRoot().getValueB...
    method getMotionCurveFadeInTime (line 5) | getMotionCurveFadeInTime(t){return this._json.getRoot().getValueByStri...
    method getMotionCurveFadeOutTime (line 5) | getMotionCurveFadeOutTime(t){return this._json.getRoot().getValueByStr...
    method getMotionCurveSegmentCount (line 5) | getMotionCurveSegmentCount(t){return this._json.getRoot().getValueBySt...
    method getMotionCurveSegment (line 5) | getMotionCurveSegment(t,e){return this._json.getRoot().getValueByStrin...
    method getEventCount (line 5) | getEventCount(){return this._json.getRoot().getValueByString(se).getVa...
    method getTotalEventValueSize (line 5) | getTotalEventValueSize(){return this._json.getRoot().getValueByString(...
    method getEventTime (line 5) | getEventTime(t){return this._json.getRoot().getValueByString(le).getVa...
    method getEventValue (line 5) | getEventValue(t){return new g(this._json.getRoot().getValueByString(le...
  function _e (line 5) | function _e(t,e,i){const s=new Kt;return s.time=t.time+(e.time-t.time)*i...
  function ce (line 5) | function ce(t,e){let i=(e-t[0].time)/(t[1].time-t[0].time);return i<0&&(...
  function me (line 5) | function me(t,e){let i=(e-t[0].time)/(t[3].time-t[0].time);i<0&&(i=0);co...
  function pe (line 5) | function pe(t,e){const i=e,s=t[0].time,r=t[3].time,a=t[1].time,n=t[2].ti...
  function fe (line 5) | function fe(t,e){return t[0].value}
  function ye (line 5) | function ye(t,e){return t[1].value}
  function Se (line 5) | function Se(t,e,i,s,r){const a=t.curves.at(e);let n=-1;const o=a.baseSeg...
  class Be (line 5) | class Be extends Lt{static create(t,e,i,s,r=!1){const a=new Be;return a....
    method create (line 5) | static create(t,e,i,s,r=!1){const a=new Be;return a.parse(t,e,r),a._mo...
    method doUpdateParameters (line 5) | doUpdateParameters(t,e,i,s){null==this._modelCurveIdEyeBlink&&(this._m...
    method setIsLoop (line 5) | setIsLoop(t){v("setIsLoop() is a deprecated function. Please use setLo...
    method isLoop (line 5) | isLoop(){return v("isLoop() is a deprecated function. Please use getLo...
    method setIsLoopFadeIn (line 5) | setIsLoopFadeIn(t){v("setIsLoopFadeIn() is a deprecated function. Plea...
    method isLoopFadeIn (line 5) | isLoopFadeIn(){return v("isLoopFadeIn() is a deprecated function. Plea...
    method setMotionBehavior (line 5) | setMotionBehavior(t){this._motionBehavior=t}
    method getMotionBehavior (line 5) | getMotionBehavior(){return this._motionBehavior}
    method getDuration (line 5) | getDuration(){return this._isLoop?-1:this._loopDurationSeconds}
    method getLoopDuration (line 5) | getLoopDuration(){return this._loopDurationSeconds}
    method setParameterFadeInTime (line 5) | setParameterFadeInTime(t,e){const i=this._motionData.curves;for(let s=...
    method setParameterFadeOutTime (line 5) | setParameterFadeOutTime(t,e){const i=this._motionData.curves;for(let s...
    method getParameterFadeInTime (line 5) | getParameterFadeInTime(t){const e=this._motionData.curves;for(let i=0;...
    method getParameterFadeOutTime (line 5) | getParameterFadeOutTime(t){const e=this._motionData.curves;for(let i=0...
    method setEffectIds (line 5) | setEffectIds(t,e){this._eyeBlinkParameterIds=t,this._lipSyncParameterI...
    method constructor (line 5) | constructor(){super(),this._motionBehavior=Ce.MotionBehavior_V2,this._...
    method release (line 5) | release(){this._motionData=void 0,this._motionData=null}
    method updateForNextLoop (line 5) | updateForNextLoop(t,e,i){switch(this._motionBehavior){case Ce.MotionBe...
    method parse (line 5) | parse(t,e,i=!1){let s=new he(t,e);if(!s)return s.release(),void(s=void...
    method getFiredEvent (line 5) | getFiredEvent(t,e){this._firedEventValues.updateSize(0);for(let i=0;i<...
    method isExistModelOpacity (line 5) | isExistModelOpacity(){for(let t=0;t<this._motionData.curveCount;t++){c...
    method getModelOpacityIndex (line 5) | getModelOpacityIndex(){if(this.isExistModelOpacity())for(let t=0;t<thi...
    method getModelOpacityId (line 5) | getModelOpacityId(t){if(-1!=t){const e=this._motionData.curves.at(t);i...
    method getModelOpacityValue (line 5) | getModelOpacityValue(){return this._modelOpacity}
    method setDebugMode (line 5) | setDebugMode(t){this._debugMode=t}
  class we (line 5) | class we extends Xt{constructor(){super(),this._currentPriority=0,this._...
    method constructor (line 5) | constructor(){super(),this._currentPriority=0,this._reservePriority=0}
    method getCurrentPriority (line 5) | getCurrentPriority(){return this._currentPriority}
    method getReservePriority (line 5) | getReservePriority(){return this._reservePriority}
    method setReservePriority (line 5) | setReservePriority(t){this._reservePriority=t}
    method startMotionPriority (line 5) | startMotionPriority(t,e,i){return i==this._reservePriority&&(this._res...
    method updateMotion (line 5) | updateMotion(t,e){this._userTimeSeconds+=e;const i=super.doUpdateMotio...
    method reserveMotion (line 5) | reserveMotion(t){return!(t<=this._reservePriority||t<=this._currentPri...
  class Fe (line 5) | class Fe{constructor(){this.gravity=new It(0,0),this.wind=new It(0,0)}}
    method constructor (line 5) | constructor(){this.gravity=new It(0,0),this.wind=new It(0,0)}
  class Ie (line 5) | class Ie{}
  class Ve (line 5) | class Ve{}
  class Ee (line 5) | class Ee{constructor(){this.initialPosition=new It(0,0),this.position=ne...
    method constructor (line 5) | constructor(){this.initialPosition=new It(0,0),this.position=new It(0,...
  class Re (line 5) | class Re{constructor(){this.normalizationPosition=new Ve,this.normalizat...
    method constructor (line 5) | constructor(){this.normalizationPosition=new Ve,this.normalizationAngl...
  class Te (line 5) | class Te{constructor(){this.source=new Ie}}
    method constructor (line 5) | constructor(){this.source=new Ie}
  class Le (line 5) | class Le{constructor(){this.destination=new Ie,this.translationScale=new...
    method constructor (line 5) | constructor(){this.destination=new Ie,this.translationScale=new It(0,0)}
  class De (line 5) | class De{constructor(){this.settings=new e,this.inputs=new e,this.output...
    method constructor (line 5) | constructor(){this.settings=new e,this.inputs=new e,this.outputs=new e...
  class Qe (line 5) | class Qe{constructor(t,e){this._json=L.create(t,e)}release(){L.delete(th...
    method constructor (line 5) | constructor(t,e){this._json=L.create(t,e)}
    method release (line 5) | release(){L.delete(this._json)}
    method getGravity (line 5) | getGravity(){const t=new It(0,0);return t.x=this._json.getRoot().getVa...
    method getWind (line 5) | getWind(){const t=new It(0,0);return t.x=this._json.getRoot().getValue...
    method getFps (line 5) | getFps(){return this._json.getRoot().getValueByString(Ne).getValueBySt...
    method getSubRigCount (line 5) | getSubRigCount(){return this._json.getRoot().getValueByString(Ne).getV...
    method getTotalInputCount (line 5) | getTotalInputCount(){return this._json.getRoot().getValueByString(Ne)....
    method getTotalOutputCount (line 5) | getTotalOutputCount(){return this._json.getRoot().getValueByString(Ne)...
    method getVertexCount (line 5) | getVertexCount(){return this._json.getRoot().getValueByString(Ne).getV...
    method getNormalizationPositionMinimumValue (line 5) | getNormalizationPositionMinimumValue(t){return this._json.getRoot().ge...
    method getNormalizationPositionMaximumValue (line 5) | getNormalizationPositionMaximumValue(t){return this._json.getRoot().ge...
    method getNormalizationPositionDefaultValue (line 5) | getNormalizationPositionDefaultValue(t){return this._json.getRoot().ge...
    method getNormalizationAngleMinimumValue (line 5) | getNormalizationAngleMinimumValue(t){return this._json.getRoot().getVa...
    method getNormalizationAngleMaximumValue (line 5) | getNormalizationAngleMaximumValue(t){return this._json.getRoot().getVa...
    method getNormalizationAngleDefaultValue (line 5) | getNormalizationAngleDefaultValue(t){return this._json.getRoot().getVa...
    method getInputCount (line 5) | getInputCount(t){return this._json.getRoot().getValueByString(Xe).getV...
    method getInputWeight (line 5) | getInputWeight(t,e){return this._json.getRoot().getValueByString(Xe).g...
    method getInputReflect (line 5) | getInputReflect(t,e){return this._json.getRoot().getValueByString(Xe)....
    method getInputType (line 5) | getInputType(t,e){return this._json.getRoot().getValueByString(Xe).get...
    method getInputSourceId (line 5) | getInputSourceId(t,e){return $.getIdManager().getId(this._json.getRoot...
    method getOutputCount (line 5) | getOutputCount(t){return this._json.getRoot().getValueByString(Xe).get...
    method getOutputVertexIndex (line 5) | getOutputVertexIndex(t,e){return this._json.getRoot().getValueByString...
    method getOutputAngleScale (line 5) | getOutputAngleScale(t,e){return this._json.getRoot().getValueByString(...
    method getOutputWeight (line 5) | getOutputWeight(t,e){return this._json.getRoot().getValueByString(Xe)....
    method getOutputDestinationId (line 5) | getOutputDestinationId(t,e){return $.getIdManager().getId(this._json.g...
    method getOutputType (line 5) | getOutputType(t,e){return this._json.getRoot().getValueByString(Xe).ge...
    method getOutputReflect (line 5) | getOutputReflect(t,e){return this._json.getRoot().getValueByString(Xe)...
    method getParticleCount (line 5) | getParticleCount(t){return this._json.getRoot().getValueByString(Xe).g...
    method getParticleMobility (line 5) | getParticleMobility(t,e){return this._json.getRoot().getValueByString(...
    method getParticleDelay (line 5) | getParticleDelay(t,e){return this._json.getRoot().getValueByString(Xe)...
    method getParticleAcceleration (line 5) | getParticleAcceleration(t,e){return this._json.getRoot().getValueByStr...
    method getParticleRadius (line 5) | getParticleRadius(t,e){return this._json.getRoot().getValueByString(Xe...
    method getParticlePosition (line 5) | getParticlePosition(t,e){const i=new It(0,0);return i.x=this._json.get...
  class ii (line 5) | class ii{static create(t,e){const i=new ii;return i.parse(t,e),i._physic...
    method create (line 5) | static create(t,e){const i=new ii;return i.parse(t,e),i._physicsRig.gr...
    method delete (line 5) | static delete(t){null!=t&&(t.release(),t=null)}
    method parse (line 5) | parse(t,e){this._physicsRig=new De;let i=new Qe(t,e);this._physicsRig....
    method stabilization (line 5) | stabilization(t){var e,i,s,r;let a,n,o,l;const h=new It;let u,g,d,_;co...
    method evaluate (line 5) | evaluate(t,e){var i,s,r,a;let n,o,l,h;const u=new It;let g,d,_,c;if(0>...
    method interpolate (line 5) | interpolate(t,e){let i,s;const r=t.getModel().parameters.values,a=t.ge...
    method setOptions (line 5) | setOptions(t){this._options=t}
    method getOption (line 5) | getOption(){return this._options}
    method constructor (line 5) | constructor(){this._physicsRig=null,this._options=new si,this._options...
    method release (line 5) | release(){this._physicsRig=void 0,this._physicsRig=null}
    method initialize (line 5) | initialize(){let t,e,i;for(let s=0;s<this._physicsRig.subRigCount;++s)...
  class si (line 5) | class si{constructor(){this.gravity=new It(0,0),this.wind=new It(0,0)}}
    method constructor (line 5) | constructor(){this.gravity=new It(0,0),this.wind=new It(0,0)}
  class ri (line 5) | class ri{constructor(){this.outputs=new e(0)}}
    method constructor (line 5) | constructor(){this.outputs=new e(0)}
  function ai (line 5) | function ai(t,e,i,s,r,a,n,o,l,h){t.x+=yi(i,s,r,a,n.minimum,n.maximum,n.d...
  function ni (line 5) | function ni(t,e,i,s,r,a,n,o,l,h){t.y+=yi(i,s,r,a,n.minimum,n.maximum,n.d...
  function oi (line 5) | function oi(t,e,i,s,r,a,n,o,l,h){e.angle+=yi(i,s,r,a,o.minimum,o.maximum...
  function li (line 5) | function li(t,e,i,s,r){let a=t.x;return s&&(a*=-1),a}
  function hi (line 5) | function hi(t,e,i,s,r){let a=t.y;return s&&(a*=-1),a}
  function ui (line 5) | function ui(t,e,i,s,r){let a;return r=i>=2?e[i-1].position.substract(e[i...
  function gi (line 5) | function gi(t,e){return Vt.min(t,e)+function(t,e){const i=Vt.max(t,e),s=...
  function di (line 5) | function di(t,e){return JSON.parse(JSON.stringify(t.x))}
  function _i (line 5) | function _i(t,e){return JSON.parse(JSON.stringify(t.y))}
  function ci (line 5) | function ci(t,e){return JSON.parse(JSON.stringify(e))}
  function mi (line 5) | function mi(t,e,i,s,r,a,n,o){let l,h,u=new It(0,0),g=new It(0,0),d=new I...
  function pi (line 5) | function pi(t,e,i,s,r,a){let n=new It(0,0);t[0].position=new It(i.x,i.y)...
  function fi (line 5) | function fi(t,e,i,s,r){let a;a=s*r.getScale(r.translationScale,r.angleSc...
  function yi (line 5) | function yi(t,e,i,s,r,a,n,o){let l=0;const h=Vt.max(i,e);h<t&&(t=h);cons...
  class Ci (line 5) | class Ci{constructor(t){this._renderTextureCount=0,this._clippingMaskBuf...
    method constructor (line 5) | constructor(t){this._renderTextureCount=0,this._clippingMaskBufferSize...
    method release (line 5) | release(){for(let t=0;t<this._clippingContextListForMask.getSize();t++...
    method initialize (line 5) | initialize(t,i){i%1!=0&&(v("The number of render textures must be spec...
    method findSameClip (line 5) | findSameClip(t,e){for(let i=0;i<this._clippingContextListForMask.getSi...
    method setupMatrixForHighPrecision (line 5) | setupMatrixForHighPrecision(t,e){let i=0;for(let e=0;e<this._clippingC...
    method createMatrixForMask (line 5) | createMatrixForMask(t,e,i,s){this._tmpMatrix.loadIdentity(),this._tmpM...
    method setupLayoutBounds (line 5) | setupLayoutBounds(t){const e=this._renderTextureCount<=1?36:32*this._r...
    method calcClippedDrawTotalBounds (line 5) | calcClippedDrawTotalBounds(t,e){let i=Number.MAX_VALUE,s=Number.MAX_VA...
    method getClippingContextListForDraw (line 5) | getClippingContextListForDraw(){return this._clippingContextListForDraw}
    method getClippingMaskBufferSize (line 5) | getClippingMaskBufferSize(){return this._clippingMaskBufferSize}
    method getRenderTextureCount (line 5) | getRenderTextureCount(){return this._renderTextureCount}
    method getChannelFlagAsColor (line 5) | getChannelFlagAsColor(t){return this._channelColors.at(t)}
    method setClippingMaskBufferSize (line 5) | setClippingMaskBufferSize(t){this._clippingMaskBufferSize=t}
  class Mi (line 5) | class Mi{constructor(){this._shaderSets=new e}release(){this.releaseShad...
    method constructor (line 5) | constructor(){this._shaderSets=new e}
    method release (line 5) | release(){this.releaseShaderProgram()}
    method setupShaderProgramForDraw (line 5) | setupShaderProgramForDraw(t,e,i){let s,r,a,n;t.isPremultipliedAlpha()|...
    method setupShaderProgramForMask (line 5) | setupShaderProgramForMask(t,e,i){t.isPremultipliedAlpha()||b("NoPremul...
    method releaseShaderProgram (line 5) | releaseShaderProgram(){for(let t=0;t<this._shaderSets.getSize();t++)th...
    method generateShaders (line 5) | generateShaders(){for(let t=0;t<10;t++)this._shaderSets.pushBack(new b...
    method loadShaderProgram (line 5) | loadShaderProgram(t,e){let i=this.gl.createProgram(),s=this.compileSha...
    method compileShaderSource (line 5) | compileShaderSource(t,e){const i=e,s=this.gl.createShader(t);if(this.g...
    method setGl (line 5) | setGl(t){this.gl=t}
  class vi (line 5) | class vi{static getInstance(){return null==xi&&(xi=new vi),xi}static del...
    method getInstance (line 5) | static getInstance(){return null==xi&&(xi=new vi),xi}
    method deleteInstance (line 5) | static deleteInstance(){xi&&(xi.release(),xi=null)}
    method constructor (line 5) | constructor(){this._shaderMap=new I}
    method release (line 5) | release(){for(const t=this._shaderMap.begin();t.notEqual(this._shaderM...
    method getShader (line 5) | getShader(t){return this._shaderMap.getValue(t)}
    method setGlContext (line 5) | setGlContext(t){if(!this._shaderMap.isExist(t)){const e=new Mi;e.setGl...
  class bi (line 5) | class bi{}
  class Ai (line 5) | class Ai extends Ci{getMaskRenderTexture(){if(this._maskTexture&&null!=t...
    method getMaskRenderTexture (line 5) | getMaskRenderTexture(){if(this._maskTexture&&null!=this._maskTexture.t...
    method setGL (line 5) | setGL(t){this.gl=t}
    method constructor (line 5) | constructor(){super(ki)}
    method setupClippingContext (line 5) | setupClippingContext(t,i){this._currentFrameNo++;let s=0;for(let e=0;e...
    method getColorBuffer (line 5) | getColorBuffer(){return this._maskColorBuffers}
    method getClippingMaskCount (line 5) | getClippingMaskCount(){return this._clippingContextListForMask.getSize()}
  class Oi (line 5) | class Oi{constructor(t,e){this.frameNo=t,this.textures=e}}
    method constructor (line 5) | constructor(t,e){this.frameNo=t,this.textures=e}
  class ki (line 5) | class ki extends y{constructor(t,e,i){super(e,i),this._owner=t}getClippi...
    method constructor (line 5) | constructor(t,e,i){super(e,i),this._owner=t}
    method getClippingManager (line 5) | getClippingManager(){return this._owner}
    method setGl (line 5) | setGl(t){this._owner.setGL(t)}
  class Ni (line 5) | class Ni{setGlEnable(t,e){e?this.gl.enable(t):this.gl.disable(t)}setGlEn...
    method setGlEnable (line 5) | setGlEnable(t,e){e?this.gl.enable(t):this.gl.disable(t)}
    method setGlEnableVertexAttribArray (line 5) | setGlEnableVertexAttribArray(t,e){e?this.gl.enableVertexAttribArray(t)...
    method save (line 5) | save(){null!=this.gl?(this._lastArrayBufferBinding=this.gl.getParamete...
    method restore (line 5) | restore(){null!=this.gl?(this.gl.useProgram(this._lastProgram),this.se...
    method setGl (line 5) | setGl(t){this.gl=t}
    method constructor (line 5) | constructor(){this._lastVertexAttribArrayEnabled=new Array(4),this._la...
  class zi (line 5) | class zi extends p{initialize(t,e=1){t.isUsingMasking()&&(this._clipping...
    method initialize (line 5) | initialize(t,e=1){t.isUsingMasking()&&(this._clippingManager=new Ai,th...
    method bindTexture (line 5) | bindTexture(t,e){this._textures.setValue(t,e)}
    method getBindedTextures (line 5) | getBindedTextures(){return this._textures}
    method setClippingMaskBufferSize (line 5) | setClippingMaskBufferSize(t){if(!this._model.isUsingMasking())return;c...
    method getClippingMaskBufferSize (line 5) | getClippingMaskBufferSize(){return this._model.isUsingMasking()?this._...
    method getRenderTextureCount (line 5) | getRenderTextureCount(){return this._model.isUsingMasking()?this._clip...
    method constructor (line 5) | constructor(){super(),this._clippingContextBufferForMask=null,this._cl...
    method release (line 5) | release(){this._clippingManager&&(this._clippingManager.release(),this...
    method doDrawModel (line 5) | doDrawModel(){if(null==this.gl)return void b("'gl' is null. WebGLRende...
    method drawMeshWebGL (line 5) | drawMeshWebGL(t,e){this.isCulling()?this.gl.enable(this.gl.CULL_FACE):...
    method saveProfile (line 5) | saveProfile(){this._rendererProfile.save()}
    method restoreProfile (line 5) | restoreProfile(){this._rendererProfile.restore()}
    method doStaticRelease (line 5) | static doStaticRelease(){vi.deleteInstance()}
    method setRenderState (line 5) | setRenderState(t,e){Di=t,Li=e}
    method preDraw (line 5) | preDraw(){if(this.firstDraw&&(this.firstDraw=!1),this.gl.disable(this....
    method setClippingContextBufferForMask (line 5) | setClippingContextBufferForMask(t){this._clippingContextBufferForMask=t}
    method getClippingContextBufferForMask (line 5) | getClippingContextBufferForMask(){return this._clippingContextBufferFo...
    method setClippingContextBufferForDraw (line 5) | setClippingContextBufferForDraw(t){this._clippingContextBufferForDraw=t}
    method getClippingContextBufferForDraw (line 5) | getClippingContextBufferForDraw(){return this._clippingContextBufferFo...
    method isGeneratingMask (line 5) | isGeneratingMask(){return null!=this.getClippingContextBufferForMask()}
    method startUp (line 5) | startUp(t){this.gl=t,this._clippingManager&&this._clippingManager.setG...
  class Yi (line 5) | class Yi{constructor(t=!1,e=!1){this.isOverridden=t,this.isParameterRepe...
    method constructor (line 5) | constructor(t=!1,e=!1){this.isOverridden=t,this.isParameterRepeated=e}
  class ji (line 5) | class ji{constructor(t=!1,e=new f){this.isOverridden=t,this.color=e}get ...
    method constructor (line 5) | constructor(t=!1,e=new f){this.isOverridden=t,this.color=e}
    method isOverwritten (line 5) | get isOverwritten(){return this.isOverridden}
  class Hi (line 5) | class Hi{constructor(t=!1,e=new f){this.isOverridden=t,this.color=e}get ...
    method constructor (line 5) | constructor(t=!1,e=new f){this.isOverridden=t,this.color=e}
    method isOverwritten (line 5) | get isOverwritten(){return this.isOverridden}
  class qi (line 5) | class qi{constructor(t=!1,e=!1){this.isOverridden=t,this.isCulling=e}get...
    method constructor (line 5) | constructor(t=!1,e=!1){this.isOverridden=t,this.isCulling=e}
    method isOverwritten (line 5) | get isOverwritten(){return this.isOverridden}
  class Wi (line 5) | class Wi{update(){this._model.update(),this._model.drawables.resetDynami...
    method update (line 5) | update(){this._model.update(),this._model.drawables.resetDynamicFlags()}
    method getPixelsPerUnit (line 5) | getPixelsPerUnit(){return null==this._model?0:this._model.canvasinfo.P...
    method getCanvasWidth (line 5) | getCanvasWidth(){return null==this._model?0:this._model.canvasinfo.Can...
    method getCanvasHeight (line 5) | getCanvasHeight(){return null==this._model?0:this._model.canvasinfo.Ca...
    method saveParameters (line 5) | saveParameters(){const t=this._model.parameters.count,e=this._savedPar...
    method getMultiplyColor (line 5) | getMultiplyColor(t){if(this.getOverrideFlagForModelMultiplyColors()||t...
    method getScreenColor (line 5) | getScreenColor(t){if(this.getOverrideFlagForModelScreenColors()||this....
    method setMultiplyColorByTextureColor (line 5) | setMultiplyColorByTextureColor(t,e){this.setMultiplyColorByRGBA(t,e.r,...
    method setMultiplyColorByRGBA (line 5) | setMultiplyColorByRGBA(t,e,i,s,r=1){this._userMultiplyColors.at(t).col...
    method setScreenColorByTextureColor (line 5) | setScreenColorByTextureColor(t,e){this.setScreenColorByRGBA(t,e.r,e.g,...
    method setScreenColorByRGBA (line 5) | setScreenColorByRGBA(t,e,i,s,r=1){this._userScreenColors.at(t).color.r...
    method getPartMultiplyColor (line 5) | getPartMultiplyColor(t){return this._userPartMultiplyColors.at(t).color}
    method getPartScreenColor (line 5) | getPartScreenColor(t){return this._userPartScreenColors.at(t).color}
    method setPartColor (line 5) | setPartColor(t,e,i,s,r,a,n){if(a.at(t).color.r=e,a.at(t).color.g=i,a.a...
    method setPartMultiplyColorByTextureColor (line 5) | setPartMultiplyColorByTextureColor(t,e){this.setPartMultiplyColorByRGB...
    method setPartMultiplyColorByRGBA (line 5) | setPartMultiplyColorByRGBA(t,e,i,s,r){this.setPartColor(t,e,i,s,r,this...
    method setPartScreenColorByTextureColor (line 5) | setPartScreenColorByTextureColor(t,e){this.setPartScreenColorByRGBA(t,...
    method setPartScreenColorByRGBA (line 5) | setPartScreenColorByRGBA(t,e,i,s,r){this.setPartColor(t,e,i,s,r,this._...
    method getOverrideFlagForModelParameterRepeat (line 5) | getOverrideFlagForModelParameterRepeat(){return this._isOverriddenPara...
    method setOverrideFlagForModelParameterRepeat (line 5) | setOverrideFlagForModelParameterRepeat(t){this._isOverriddenParameterR...
    method getOverrideFlagForParameterRepeat (line 5) | getOverrideFlagForParameterRepeat(t){return this._userParameterRepeatD...
    method setOverrideFlagForParameterRepeat (line 5) | setOverrideFlagForParameterRepeat(t,e){this._userParameterRepeatDataLi...
    method getRepeatFlagForParameterRepeat (line 5) | getRepeatFlagForParameterRepeat(t){return this._userParameterRepeatDat...
    method setRepeatFlagForParameterRepeat (line 5) | setRepeatFlagForParameterRepeat(t,e){this._userParameterRepeatDataList...
    method getOverwriteFlagForModelMultiplyColors (line 5) | getOverwriteFlagForModelMultiplyColors(){return v("getOverwriteFlagFor...
    method getOverrideFlagForModelMultiplyColors (line 5) | getOverrideFlagForModelMultiplyColors(){return this._isOverriddenModel...
    method getOverwriteFlagForModelScreenColors (line 5) | getOverwriteFlagForModelScreenColors(){return v("getOverwriteFlagForMo...
    method getOverrideFlagForModelScreenColors (line 5) | getOverrideFlagForModelScreenColors(){return this._isOverriddenModelSc...
    method setOverwriteFlagForModelMultiplyColors (line 5) | setOverwriteFlagForModelMultiplyColors(t){v("setOverwriteFlagForModelM...
    method setOverrideFlagForModelMultiplyColors (line 5) | setOverrideFlagForModelMultiplyColors(t){this._isOverriddenModelMultip...
    method setOverwriteFlagForModelScreenColors (line 5) | setOverwriteFlagForModelScreenColors(t){v("setOverwriteFlagForModelScr...
    method setOverrideFlagForModelScreenColors (line 5) | setOverrideFlagForModelScreenColors(t){this._isOverriddenModelScreenCo...
    method getOverwriteFlagForDrawableMultiplyColors (line 5) | getOverwriteFlagForDrawableMultiplyColors(t){return v("getOverwriteFla...
    method getOverrideFlagForDrawableMultiplyColors (line 5) | getOverrideFlagForDrawableMultiplyColors(t){return this._userMultiplyC...
    method getOverwriteFlagForDrawableScreenColors (line 5) | getOverwriteFlagForDrawableScreenColors(t){return v("getOverwriteFlagF...
    method getOverrideFlagForDrawableScreenColors (line 5) | getOverrideFlagForDrawableScreenColors(t){return this._userScreenColor...
    method setOverwriteFlagForDrawableMultiplyColors (line 5) | setOverwriteFlagForDrawableMultiplyColors(t,e){v("setOverwriteFlagForD...
    method setOverrideFlagForDrawableMultiplyColors (line 5) | setOverrideFlagForDrawableMultiplyColors(t,e){this._userMultiplyColors...
    method setOverwriteFlagForDrawableScreenColors (line 5) | setOverwriteFlagForDrawableScreenColors(t,e){v("setOverwriteFlagForDra...
    method setOverrideFlagForDrawableScreenColors (line 5) | setOverrideFlagForDrawableScreenColors(t,e){this._userScreenColors.at(...
    method getOverwriteColorForPartMultiplyColors (line 5) | getOverwriteColorForPartMultiplyColors(t){return v("getOverwriteColorF...
    method getOverrideColorForPartMultiplyColors (line 5) | getOverrideColorForPartMultiplyColors(t){return this._userPartMultiply...
    method getOverwriteColorForPartScreenColors (line 5) | getOverwriteColorForPartScreenColors(t){return v("getOverwriteColorFor...
    method getOverrideColorForPartScreenColors (line 5) | getOverrideColorForPartScreenColors(t){return this._userPartScreenColo...
    method setOverwriteColorForPartColors (line 5) | setOverwriteColorForPartColors(t,e,i,s){v("setOverwriteColorForPartCol...
    method setOverrideColorForPartColors (line 5) | setOverrideColorForPartColors(t,e,i,s){i.at(t).isOverridden=e;for(let ...
    method setOverwriteColorForPartMultiplyColors (line 5) | setOverwriteColorForPartMultiplyColors(t,e){v("setOverwriteColorForPar...
    method setOverrideColorForPartMultiplyColors (line 5) | setOverrideColorForPartMultiplyColors(t,e){this._userPartMultiplyColor...
    method setOverwriteColorForPartScreenColors (line 5) | setOverwriteColorForPartScreenColors(t,e){v("setOverwriteColorForPartS...
    method setOverrideColorForPartScreenColors (line 5) | setOverrideColorForPartScreenColors(t,e){this._userPartScreenColors.at...
    method getDrawableCulling (line 5) | getDrawableCulling(t){if(this.getOverrideFlagForModelCullings()||this....
    method setDrawableCulling (line 5) | setDrawableCulling(t,e){this._userCullings.at(t).isCulling=e}
    method getOverwriteFlagForModelCullings (line 5) | getOverwriteFlagForModelCullings(){return v("getOverwriteFlagForModelC...
    method getOverrideFlagForModelCullings (line 5) | getOverrideFlagForModelCullings(){return this._isOverriddenCullings}
    method setOverwriteFlagForModelCullings (line 5) | setOverwriteFlagForModelCullings(t){v("setOverwriteFlagForModelCulling...
    method setOverrideFlagForModelCullings (line 5) | setOverrideFlagForModelCullings(t){this._isOverriddenCullings=t}
    method getOverwriteFlagForDrawableCullings (line 5) | getOverwriteFlagForDrawableCullings(t){return v("getOverwriteFlagForDr...
    method getOverrideFlagForDrawableCullings (line 5) | getOverrideFlagForDrawableCullings(t){return this._userCullings.at(t)....
    method setOverwriteFlagForDrawableCullings (line 5) | setOverwriteFlagForDrawableCullings(t,e){v("setOverwriteFlagForDrawabl...
    method setOverrideFlagForDrawableCullings (line 5) | setOverrideFlagForDrawableCullings(t,e){this._userCullings.at(t).isOve...
    method getModelOapcity (line 5) | getModelOapcity(){return this._modelOpacity}
    method setModelOapcity (line 5) | setModelOapcity(t){this._modelOpacity=t}
    method getModel (line 5) | getModel(){return this._model}
    method getPartIndex (line 5) | getPartIndex(t){let e;const i=this._model.parts.count;for(e=0;e<i;++e)...
    method getPartId (line 5) | getPartId(t){const e=this._model.parts.ids[t];return $.getIdManager()....
    method getPartCount (line 5) | getPartCount(){return this._model.parts.count}
    method getPartParentPartIndices (line 5) | getPartParentPartIndices(){return this._model.parts.parentIndices}
    method setPartOpacityByIndex (line 5) | setPartOpacityByIndex(t,e){this._notExistPartOpacities.isExist(t)?this...
    method setPartOpacityById (line 5) | setPartOpacityById(t,e){const i=this.getPartIndex(t);i<0||this.setPart...
    method getPartOpacityByIndex (line 5) | getPartOpacityByIndex(t){return this._notExistPartOpacities.isExist(t)...
    method getPartOpacityById (line 5) | getPartOpacityById(t){const e=this.getPartIndex(t);return e<0?0:this.g...
    method getParameterIndex (line 5) | getParameterIndex(t){let e;const i=this._model.parameters.count;for(e=...
    method getParameterCount (line 5) | getParameterCount(){return this._model.parameters.count}
    method getParameterType (line 5) | getParameterType(t){return this._model.parameters.types[t]}
    method getParameterMaximumValue (line 5) | getParameterMaximumValue(t){return this._model.parameters.maximumValue...
    method getParameterMinimumValue (line 5) | getParameterMinimumValue(t){return this._model.parameters.minimumValue...
    method getParameterDefaultValue (line 5) | getParameterDefaultValue(t){return this._model.parameters.defaultValue...
    method getParameterId (line 5) | getParameterId(t){return $.getIdManager().getId(this._model.parameters...
    method getParameterValueByIndex (line 5) | getParameterValueByIndex(t){return this._notExistParameterValues.isExi...
    method getParameterValueById (line 5) | getParameterValueById(t){const e=this.getParameterIndex(t);return this...
    method setParameterValueByIndex (line 5) | setParameterValueByIndex(t,e,i=1){this._notExistParameterValues.isExis...
    method setParameterValueById (line 5) | setParameterValueById(t,e,i=1){const s=this.getParameterIndex(t);this....
    method addParameterValueByIndex (line 5) | addParameterValueByIndex(t,e,i=1){this.setParameterValueByIndex(t,this...
    method addParameterValueById (line 5) | addParameterValueById(t,e,i=1){const s=this.getParameterIndex(t);this....
    method isRepeat (line 5) | isRepeat(t){if(this._notExistParameterValues.isExist(t))return!1;let e...
    method getParameterRepeatValue (line 5) | getParameterRepeatValue(t,e){if(this._notExistParameterValues.isExist(...
    method getParameterClampValue (line 5) | getParameterClampValue(t,e){if(this._notExistParameterValues.isExist(t...
    method getParameterRepeats (line 5) | getParameterRepeats(t){return 0!=this._model.parameters.repeats[t]}
    method multiplyParameterValueById (line 5) | multiplyParameterValueById(t,e,i=1){const s=this.getParameterIndex(t);...
    method multiplyParameterValueByIndex (line 5) | multiplyParameterValueByIndex(t,e,i=1){this.setParameterValueByIndex(t...
    method getDrawableIndex (line 5) | getDrawableIndex(t){const e=this._model.drawables.count;for(let i=0;i<...
    method getDrawableCount (line 5) | getDrawableCount(){return this._model.drawables.count}
    method getDrawableId (line 5) | getDrawableId(t){const e=this._model.drawables.ids;return $.getIdManag...
    method getDrawableRenderOrders (line 5) | getDrawableRenderOrders(){return this._model.drawables.renderOrders}
    method getDrawableTextureIndices (line 5) | getDrawableTextureIndices(t){return this.getDrawableTextureIndex(t)}
    method getDrawableTextureIndex (line 5) | getDrawableTextureIndex(t){return this._model.drawables.textureIndices...
    method getDrawableDynamicFlagVertexPositionsDidChange (line 5) | getDrawableDynamicFlagVertexPositionsDidChange(t){const e=this._model....
    method getDrawableVertexIndexCount (line 5) | getDrawableVertexIndexCount(t){return this._model.drawables.indexCount...
    method getDrawableVertexCount (line 5) | getDrawableVertexCount(t){return this._model.drawables.vertexCounts[t]}
    method getDrawableVertices (line 5) | getDrawableVertices(t){return this.getDrawableVertexPositions(t)}
    method getDrawableVertexIndices (line 5) | getDrawableVertexIndices(t){return this._model.drawables.indices[t]}
    method getDrawableVertexPositions (line 5) | getDrawableVertexPositions(t){return this._model.drawables.vertexPosit...
    method getDrawableVertexUvs (line 5) | getDrawableVertexUvs(t){return this._model.drawables.vertexUvs[t]}
    method getDrawableOpacity (line 5) | getDrawableOpacity(t){return this._model.drawables.opacities[t]}
    method getDrawableMultiplyColor (line 5) | getDrawableMultiplyColor(t){const e=this._model.drawables.multiplyColo...
    method getDrawableScreenColor (line 5) | getDrawableScreenColor(t){const e=this._model.drawables.screenColors,i...
    method getDrawableParentPartIndex (line 5) | getDrawableParentPartIndex(t){return this._model.drawables.parentPartI...
    method getDrawableBlendMode (line 5) | getDrawableBlendMode(t){const e=this._model.drawables.constantFlags;re...
    method getDrawableInvertedMaskBit (line 5) | getDrawableInvertedMaskBit(t){const e=this._model.drawables.constantFl...
    method getDrawableMasks (line 5) | getDrawableMasks(){return this._model.drawables.masks}
    method getDrawableMaskCounts (line 5) | getDrawableMaskCounts(){return this._model.drawables.maskCounts}
    method isUsingMasking (line 5) | isUsingMasking(){for(let t=0;t<this._model.drawables.count;++t)if(!(th...
    method getDrawableDynamicFlagIsVisible (line 5) | getDrawableDynamicFlagIsVisible(t){const e=this._model.drawables.dynam...
    method getDrawableDynamicFlagVisibilityDidChange (line 5) | getDrawableDynamicFlagVisibilityDidChange(t){const e=this._model.drawa...
    method getDrawableDynamicFlagOpacityDidChange (line 5) | getDrawableDynamicFlagOpacityDidChange(t){const e=this._model.drawable...
    method getDrawableDynamicFlagRenderOrderDidChange (line 5) | getDrawableDynamicFlagRenderOrderDidChange(t){const e=this._model.draw...
    method getDrawableDynamicFlagBlendColorDidChange (line 5) | getDrawableDynamicFlagBlendColorDidChange(t){const e=this._model.drawa...
    method loadParameters (line 5) | loadParameters(){let t=this._model.parameters.count;const e=this._save...
    method initialize (line 5) | initialize(){C(this._model),this._parameterValues=this._model.paramete...
    method constructor (line 5) | constructor(t){this._model=t,this._parameterValues=null,this._paramete...
    method release (line 5) | release(){this._model.release(),this._model=null}
  class Ji (line 5) | class Ji{static create(t,e){let i=null;if(e){if(!this.hasMocConsistency(...
    method create (line 5) | static create(t,e){let i=null;if(e){if(!this.hasMocConsistency(t))retu...
    method delete (line 5) | static delete(t){t._moc._release(),t._moc=null,t=null}
    method createModel (line 5) | createModel(){let t=null;const e=Live2DCubismCore.Model.fromMoc(this._...
    method deleteModel (line 5) | deleteModel(t){null!=t&&(t.release(),t=null,--this._modelCount)}
    method constructor (line 5) | constructor(t){this._moc=t,this._modelCount=0,this._mocVersion=0}
    method release (line 5) | release(){C(0==this._modelCount),this._moc._release(),this._moc=null}
    method getLatestMocVersion (line 5) | getLatestMocVersion(){return Live2DCubismCore.Version.csmGetLatestMocV...
    method getMocVersion (line 5) | getMocVersion(){return this._mocVersion}
    method hasMocConsistency (line 5) | static hasMocConsistency(t){return 1===Live2DCubismCore.Moc.prototype....
  class Ki (line 5) | class Ki{constructor(t,e){this._json=L.create(t,e)}release(){L.delete(th...
    method constructor (line 5) | constructor(t,e){this._json=L.create(t,e)}
    method release (line 5) | release(){L.delete(this._json)}
    method getUserDataCount (line 5) | getUserDataCount(){return this._json.getRoot().getValueByString($i).ge...
    method getTotalUserDataSize (line 5) | getTotalUserDataSize(){return this._json.getRoot().getValueByString($i...
    method getUserDataTargetType (line 5) | getUserDataTargetType(t){return this._json.getRoot().getValueByString(...
    method getUserDataId (line 5) | getUserDataId(t){return $.getIdManager().getId(this._json.getRoot().ge...
    method getUserDataValue (line 5) | getUserDataValue(t){return this._json.getRoot().getValueByString(Zi).g...
  class ts (line 5) | class ts{}
  class es (line 5) | class es{static create(t,e){const i=new es;return i.parseUserData(t,e),i...
    method create (line 5) | static create(t,e){const i=new es;return i.parseUserData(t,e),i}
    method delete (line 5) | static delete(t){null!=t&&(t.release(),t=null)}
    method getArtMeshUserDatas (line 5) | getArtMeshUserDatas(){return this._artMeshUserDataNode}
    method parseUserData (line 5) | parseUserData(t,e){let i=new Ki(t,e);if(!i)return i.release(),void(i=v...
    method constructor (line 5) | constructor(){this._userDataNodes=new e,this._artMeshUserDataNode=new e}
    method release (line 5) | release(){for(let t=0;t<this._userDataNodes.getSize();++t)this._userDa...
  class rs (line 5) | class rs{isInitialized(){return this._initialized}setInitialized(t){this...
    method isInitialized (line 5) | isInitialized(){return this._initialized}
    method setInitialized (line 5) | setInitialized(t){this._initialized=t}
    method isUpdating (line 5) | isUpdating(){return this._updating}
    method setUpdating (line 5) | setUpdating(t){this._updating=t}
    method setDragging (line 5) | setDragging(t,e){this._dragManager.set(t,e)}
    method setAcceleration (line 5) | setAcceleration(t,e,i){this._accelerationX=t,this._accelerationY=e,thi...
    method getModelMatrix (line 5) | getModelMatrix(){return this._modelMatrix}
    method setOpacity (line 5) | setOpacity(t){this._opacity=t}
    method getOpacity (line 5) | getOpacity(){return this._opacity}
    method loadModel (line 5) | loadModel(t,e=!1){this._moc=Ji.create(t,e),null!=this._moc?(this._mode...
    method loadMotion (line 5) | loadMotion(t,e,i,s,r,a,n,o,l=!1){if(null==t||0==e)return b("Failed to ...
    method loadExpression (line 5) | loadExpression(t,e,i){return null==t||0==e?(b("Failed to loadExpressio...
    method loadPose (line 5) | loadPose(t,e){null!=t&&0!=e?this._pose=Mt.create(t,e):b("Failed to loa...
    method loadUserData (line 5) | loadUserData(t,e){null!=t&&0!=e?this._modelUserData=es.create(t,e):b("...
    method loadPhysics (line 5) | loadPhysics(t,e){null!=t&&0!=e?this._physics=ii.create(t,e):b("Failed ...
    method isHit (line 5) | isHit(t,e,i){const s=this._model.getDrawableIndex(t);if(s<0)return!1;c...
    method getModel (line 5) | getModel(){return this._model}
    method getRenderer (line 5) | getRenderer(){return this._renderer}
    method createRenderer (line 5) | createRenderer(t=1){this._renderer&&this.deleteRenderer(),this._render...
    method deleteRenderer (line 5) | deleteRenderer(){null!=this._renderer&&(this._renderer.release(),this....
    method motionEventFired (line 5) | motionEventFired(t){M("{0}",t.s)}
    method cubismDefaultMotionEventCallback (line 5) | static cubismDefaultMotionEventCallback(t,e,i){null!=i&&i.motionEventF...
    method constructor (line 5) | constructor(){this._moc=null,this._model=null,this._motionManager=null...
    method release (line 5) | release(){null!=this._motionManager&&(this._motionManager.release(),th...
  class ns (line 5) | class ns{static getInstance(){return null==as&&(as=new ns),as}static rel...
    method getInstance (line 5) | static getInstance(){return null==as&&(as=new ns),as}
    method releaseInstance (line 5) | static releaseInstance(){null!=as&&(as=void 0),as=null}
    method update (line 5) | update(t){let e,i;if(null==this._pcmData||this._sampleOffset>=this._wa...
    method start (line 5) | start(t){this._sampleOffset=0,this._userTimeSeconds=0,this._lastRms=0,...
    method getRms (line 5) | getRms(){return this._lastRms}
    method loadWavFile (line 5) | loadWavFile(t){return new Promise((e=>{let i=!1;null!=this._pcmData&&t...
    method getPcmSample (line 5) | getPcmSample(){let t;switch(this._wavFileInfo._bitsPerSample){case 8:t...
    method getPcmDataChannel (line 5) | getPcmDataChannel(t){return this._pcmData&&t<this._pcmData.length?Floa...
    method getWavSamplingRate (line 5) | getWavSamplingRate(){return!this._wavFileInfo||this._wavFileInfo._samp...
    method releasePcmData (line 5) | releasePcmData(){for(let t=0;t<this._wavFileInfo._numberOfChannels;t++...
    method constructor (line 5) | constructor(){this.loadFiletoBytes=(t,e)=>{this._byteReader._fileByte=...
  class os (line 5) | class os{constructor(){this._fileName="",this._numberOfChannels=0,this._...
    method constructor (line 5) | constructor(){this._fileName="",this._numberOfChannels=0,this._bitsPer...
  class ls (line 5) | class ls{constructor(){this._fileByte=null,this._fileDataView=null,this....
    method constructor (line 5) | constructor(){this._fileByte=null,this._fileDataView=null,this._fileSi...
    method get8 (line 5) | get8(){const t=this._fileDataView.getUint8(this._readOffset);return th...
    method get16LittleEndian (line 5) | get16LittleEndian(){const t=this._fileDataView.getUint8(this._readOffs...
    method get24LittleEndian (line 5) | get24LittleEndian(){const t=this._fileDataView.getUint8(this._readOffs...
    method get32LittleEndian (line 5) | get32LittleEndian(){const t=this._fileDataView.getUint8(this._readOffs...
    method getCheckSignature (line 5) | getCheckSignature(t){const e=new Uint8Array(4),i=(new TextEncoder).enc...
  class gs (line 5) | class gs extends rs{loadAssets(t,e){this._modelHomeDir=t,fetch(`${this._...
    method loadAssets (line 5) | loadAssets(t,e){this._modelHomeDir=t,fetch(`${this._modelHomeDir}${e}`...
    method setupModel (line 5) | setupModel(t){if(this._updating=!0,this._initialized=!1,this._modelSet...
    method setupTextures (line 5) | setupTextures(){const t=!0;if(this._state==hs.LoadTexture){const e=thi...
    method reloadRenderer (line 5) | reloadRenderer(){this.deleteRenderer(),this.createRenderer(),this.setu...
    method update (line 5) | update(){if(this._state!=hs.CompleteSetup)return;const t=at.getDeltaTi...
    method startMotion (line 5) | startMotion(t,e,i,s,r){if(3==i)this._motionManager.setReservePriority(...
    method startRandomMotion (line 5) | startRandomMotion(t,e,i,s){if(0==this._modelSetting.getMotionCount(t))...
    method setExpression (line 5) | setExpression(t){const e=this._expressions.getValue(t);this._debugMode...
    method setRandomExpression (line 5) | setRandomExpression(){if(0==this._expressions.getSize())return;const t...
    method motionEventFired (line 5) | motionEventFired(t){M("{0} is fired on LAppModel!!",t.s)}
    method hitTest (line 5) | hitTest(t,e,i){if(this._opacity<1)return!1;const s=this._modelSetting....
    method preLoadMotionGroup (line 5) | preLoadMotionGroup(t){for(let e=0;e<this._modelSetting.getMotionCount(...
    method releaseMotions (line 5) | releaseMotions(){this._motions.clear()}
    method releaseExpressions (line 5) | releaseExpressions(){this._expressions.clear()}
    method doDraw (line 5) | doDraw(){if(null==this._model)return;const t=this._subdelegate.getCanv...
    method draw (line 5) | draw(t){null!=this._model&&this._state==hs.CompleteSetup&&(t.multiplyB...
    method hasMocConsistencyFromFile (line 5) | async hasMocConsistencyFromFile(){if(C(this._modelSetting.getModelFile...
    method setSubdelegate (line 5) | setSubdelegate(t){this._subdelegate=t}
    method constructor (line 5) | constructor(){super(),this._modelSetting=null,this._modelHomeDir=null,...
  class ds (line 5) | class ds{releaseAllModel(){this._models.clear()}onDrag(t,e){const i=this...
    method releaseAllModel (line 5) | releaseAllModel(){this._models.clear()}
    method onDrag (line 5) | onDrag(t,e){const i=this._models.at(0);i&&i.setDragging(t,e)}
    method onTap (line 5) | onTap(t,e){const i=this._models.at(0);i.hitTest("Head",t,e)?i.setRando...
    method onUpdate (line 5) | onUpdate(){const{width:t,height:e}=this._subdelegate.getCanvas(),i=new...
    method nextScene (line 5) | nextScene(){const t=(this._sceneIndex+1)%it;this.changeScene(t)}
    method changeScene (line 5) | changeScene(t){this._sceneIndex=t;const e=tt+et[t]+"/";let i=et[t];i+=...
    method setViewMatrix (line 5) | setViewMatrix(t){for(let e=0;e<16;e++)this._viewMatrix.getArray()[e]=t...
    method addModel (line 5) | addModel(t=0){this._sceneIndex=t,this.changeScene(this._sceneIndex)}
    method constructor (line 5) | constructor(){this.beganMotion=t=>{at.printMessage("Motion Began:"),co...
    method release (line 5) | release(){}
    method initialize (line 5) | initialize(t){this._subdelegate=t,this.changeScene(this._sceneIndex)}
  class _s (line 5) | class _s{constructor(){this._textures=new e}release(){for(let t=this._te...
    method constructor (line 5) | constructor(){this._textures=new e}
    method release (line 5) | release(){for(let t=this._textures.begin();t.notEqual(this._textures.e...
    method createTextureFromPngFile (line 5) | createTextureFromPngFile(t,e,i){for(let s=this._textures.begin();s.not...
    method releaseTextures (line 5) | releaseTextures(){for(let t=0;t<this._textures.getSize();t++)this._glM...
    method releaseTextureByTexture (line 5) | releaseTextureByTexture(t){for(let e=0;e<this._textures.getSize();e++)...
    method releaseTextureByFilePath (line 5) | releaseTextureByFilePath(t){for(let e=0;e<this._textures.getSize();e++...
    method setGlManager (line 5) | setGlManager(t){this._glManager=t}
  class cs (line 5) | class cs{constructor(){this.id=null,this.width=0,this.height=0}}
    method constructor (line 5) | constructor(){this.id=null,this.width=0,this.height=0}
  class ms (line 5) | class ms extends c{constructor(){super(),this._screenLeft=0,this._screen...
    method constructor (line 5) | constructor(){super(),this._screenLeft=0,this._screenRight=0,this._scr...
    method adjustTranslate (line 5) | adjustTranslate(t,e){this._tr[0]*this._maxLeft+(this._tr[12]+t)>this._...
    method adjustScale (line 5) | adjustScale(t,e,i){const s=this.getMaxScale(),r=this.getMinScale(),a=i...
    method setScreenRect (line 5) | setScreenRect(t,e,i,s){this._screenLeft=t,this._screenRight=e,this._sc...
    method setMaxScreenRect (line 5) | setMaxScreenRect(t,e,i,s){this._maxLeft=t,this._maxRight=e,this._maxTo...
    method setMaxScale (line 5) | setMaxScale(t){this._maxScale=t}
    method setMinScale (line 5) | setMinScale(t){this._minScale=t}
    method getMaxScale (line 5) | getMaxScale(){return this._maxScale}
    method getMinScale (line 5) | getMinScale(){return this._minScale}
    method isMaxScale (line 5) | isMaxScale(){return this.getScaleX()>=this._maxScale}
    method isMinScale (line 5) | isMinScale(){return this.getScaleX()<=this._minScale}
    method getScreenLeft (line 5) | getScreenLeft(){return this._screenLeft}
    method getScreenRight (line 5) | getScreenRight(){return this._screenRight}
    method getScreenBottom (line 5) | getScreenBottom(){return this._screenBottom}
    method getScreenTop (line 5) | getScreenTop(){return this._screenTop}
    method getMaxLeft (line 5) | getMaxLeft(){return this._maxLeft}
    method getMaxRight (line 5) | getMaxRight(){return this._maxRight}
    method getMaxBottom (line 5) | getMaxBottom(){return this._maxBottom}
    method getMaxTop (line 5) | getMaxTop(){return this._maxTop}
  class ps (line 5) | class ps{constructor(t,e,i,s,r){this._rect=new fs,this._rect.left=t-.5*i...
    method constructor (line 5) | constructor(t,e,i,s,r){this._rect=new fs,this._rect.left=t-.5*i,this._...
    method release (line 5) | release(){this._rect=null;const t=this._subdelegate.getGlManager().get...
    method getTexture (line 5) | getTexture(){return this._texture}
    method render (line 5) | render(t){if(null==this._texture)return;const e=this._subdelegate.getG...
    method isHit (line 5) | isHit(t,e){const{height:i}=this._subdelegate.getCanvas(),s=i-e;return ...
    method setSubdelegate (line 5) | setSubdelegate(t){this._subdelegate=t}
  class fs (line 5) | class fs{}
  class ys (line 5) | class ys{constructor(){this._startX=0,this._startY=0,this._lastX=0,this....
    method constructor (line 5) | constructor(){this._startX=0,this._startY=0,this._lastX=0,this._lastY=...
    method getCenterX (line 5) | getCenterX(){return this._lastX}
    method getCenterY (line 5) | getCenterY(){return this._lastY}
    method getDeltaX (line 5) | getDeltaX(){return this._deltaX}
    method getDeltaY (line 5) | getDeltaY(){return this._deltaY}
    method getStartX (line 5) | getStartX(){return this._startX}
    method getStartY (line 5) | getStartY(){return this._startY}
    method getScale (line 5) | getScale(){return this._scale}
    method getX (line 5) | getX(){return this._lastX}
    method getY (line 5) | getY(){return this._lastY}
    method getX1 (line 5) | getX1(){return this._lastX1}
    method getY1 (line 5) | getY1(){return this._lastY1}
    method getX2 (line 5) | getX2(){return this._lastX2}
    method getY2 (line 5) | getY2(){return this._lastY2}
    method isSingleTouch (line 5) | isSingleTouch(){return this._touchSingle}
    method isFlickAvailable (line 5) | isFlickAvailable(){return this._flipAvailable}
    method disableFlick (line 5) | disableFlick(){this._flipAvailable=!1}
    method touchesBegan (line 5) | touchesBegan(t,e){this._lastX=t,this._lastY=e,this._startX=t,this._sta...
    method touchesMoved (line 5) | touchesMoved(t,e){this._lastX=t,this._lastY=e,this._lastTouchDistance=...
    method getFlickDistance (line 5) | getFlickDistance(){return this.calculateDistance(this._startX,this._st...
    method calculateDistance (line 5) | calculateDistance(t,e,i,s){return Math.sqrt((t-i)*(t-i)+(e-s)*(e-s))}
    method calculateMovingAmount (line 5) | calculateMovingAmount(t,e){if(t>0!=e>0)return 0;const i=t>0?1:-1,s=Mat...
  class Ss (line 5) | class Ss{constructor(){this._programId=null,this._back=null,this._gear=n...
    method constructor (line 5) | constructor(){this._programId=null,this._back=null,this._gear=null,thi...
    method initialize (line 5) | initialize(t){this._subdelegate=t;const{width:e,height:i}=t.getCanvas(...
    method release (line 5) | release(){this._viewMatrix=null,this._touchManager=null,this._deviceTo...
    method render (line 5) | render(){this._subdelegate.getGlManager().getGl().useProgram(this._pro...
    method initializeSprite (line 5) | initializeSprite(){const t=this._subdelegate.getCanvas().width,e=this....
    method onTouchesBegan (line 5) | onTouchesBegan(t,e){this._touchManager.touchesBegan(t*window.devicePix...
    method onTouchesMoved (line 5) | onTouchesMoved(t,e){const i=t*window.devicePixelRatio,s=e*window.devic...
    method onTouchesEnded (line 5) | onTouchesEnded(t,e){const i=t*window.devicePixelRatio,s=e*window.devic...
    method transformViewX (line 5) | transformViewX(t){const e=this._deviceToScreen.transformX(t);return th...
    method transformViewY (line 5) | transformViewY(t){const e=this._deviceToScreen.transformY(t);return th...
    method transformScreenX (line 5) | transformScreenX(t){return this._deviceToScreen.transformX(t)}
    method transformScreenY (line 5) | transformScreenY(t){return this._deviceToScreen.transformY(t)}
  class Cs (line 5) | class Cs{constructor(){this._canvas=null,this._glManager=new nt,this._te...
    method constructor (line 5) | constructor(){this._canvas=null,this._glManager=new nt,this._textureMa...
    method release (line 5) | release(){this._resizeObserver.unobserve(this._canvas),this._resizeObs...
    method initialize (line 5) | initialize(t){if(!this._glManager.initialize(t))return!1;this._canvas=...
    method onResize (line 5) | onResize(){this.resizeCanvas(),this._view.initialize(this),this._view....
    method resizeObserverCallback (line 5) | resizeObserverCallback(t,e){this._needResize=!0}
    method update (line 5) | update(){if(this._glManager.getGl().isContextLost())return;this._needR...
    method createShader (line 5) | createShader(){const t=this._glManager.getGl(),e=t.createShader(t.VERT...
    method getTextureManager (line 5) | getTextureManager(){return this._textureManager}
    method getFrameBuffer (line 5) | getFrameBuffer(){return this._frameBuffer}
    method getCanvas (line 5) | getCanvas(){return this._canvas}
    method getGlManager (line 5) | getGlManager(){return this._glManager}
    method getLive2DManager (line 5) | getLive2DManager(){return this._live2dManager}
    method resizeCanvas (line 5) | resizeCanvas(){this._canvas.width=this._canvas.clientWidth*window.devi...
    method onPointBegan (line 5) | onPointBegan(t,e){if(!this._view)return void at.printMessage("view not...
    method onPointMoved (line 5) | onPointMoved(t,e){if(!this._captured)return;const i=t-this._canvas.off...
    method onPointEnded (line 5) | onPointEnded(t,e){if(this._captured=!1,!this._view)return void at.prin...
    method onTouchCancel (line 5) | onTouchCancel(t,e){if(this._captured=!1,!this._view)return void at.pri...
    method isContextLost (line 5) | isContextLost(){return this._glManager.getGl().isContextLost()}
  class Ms (line 5) | class Ms{static getInstance(){return null==xs&&(xs=new Ms),xs}static rel...
    method getInstance (line 5) | static getInstance(){return null==xs&&(xs=new Ms),xs}
    method releaseInstance (line 5) | static releaseInstance(){null!=xs&&xs.release(),xs=null}
    method onPointerBegan (line 5) | onPointerBegan(t){for(let e=this._subdelegates.begin();e.notEqual(this...
    method onPointerMoved (line 5) | onPointerMoved(t){for(let e=this._subdelegates.begin();e.notEqual(this...
    method onPointerEnded (line 5) | onPointerEnded(t){for(let e=this._subdelegates.begin();e.notEqual(this...
    method onPointerCancel (line 5) | onPointerCancel(t){for(let e=this._subdelegates.begin();e.notEqual(thi...
    method onResize (line 5) | onResize(){for(let t=0;t<this._subdelegates.getSize();t++)this._subdel...
    method run (line 5) | run(){const t=()=>{if(null!=xs){at.updateTime();for(let t=0;t<this._su...
    method release (line 5) | release(){this.releaseEventListener(),this.releaseSubdelegates(),$.dis...
    method releaseEventListener (line 5) | releaseEventListener(){document.removeEventListener("pointerup",this.p...
    method releaseSubdelegates (line 5) | releaseSubdelegates(){for(let t=this._subdelegates.begin();t.notEqual(...
    method initialize (line 5) | initialize(){return this.initializeCubism(),this.initializeSubdelegate...
    method initializeEventListener (line 5) | initializeEventListener(){this.pointBeganEventListener=this.onPointerB...
    method initializeCubism (line 5) | initializeCubism(){at.updateTime(),this._cubismOption.logFunction=at.p...
    method initializeSubdelegates (line 5) | initializeSubdelegates(){let t=100;t=100,this._canvases.prepareCapacit...
    method constructor (line 5) | constructor(){this._cubismOption=new Z,this._subdelegates=new e,this._...
  class vs (line 5) | class vs extends Cs{initialize(t){if(!this._glManager.initialize(t))retu...
    method initialize (line 5) | initialize(t){if(!this._glManager.initialize(t))return!1;this._canvas=...
    method onResize (line 5) | onResize(){this.resizeCanvas(),this._view.initialize(this)}
    method update (line 5) | update(){if(this._glManager.getGl().isContextLost())return;this._needR...
  class bs (line 5) | class bs extends Ms{run(){const t=()=>{at.updateTime();for(let t=0;t<thi...
    method run (line 5) | run(){const t=()=>{at.updateTime();for(let t=0;t<this._subdelegates.ge...
    method stop (line 5) | stop(){this._drawFrameId&&(window.cancelAnimationFrame(this._drawFrame...
    method release (line 5) | release(){this.stop(),this.releaseEventListener(),this._subdelegates.c...
    method transformOffset (line 5) | transformOffset(t){const e=this._subdelegates.at(0),i=e.getCanvas().ge...
    method onMouseMove (line 5) | onMouseMove(t){const e=this._subdelegates.at(0).getLive2DManager(),{x:...
    method onMouseEnd (line 5) | onMouseEnd(t){const e=this._subdelegates.at(0).getLive2DManager(),{x:i...
    method onTap (line 5) | onTap(t){const e=this._subdelegates.at(0).getLive2DManager(),{x:i,y:s}...
    method initializeEventListener (line 5) | initializeEventListener(){this.mouseMoveEventListener=this.onMouseMove...
    method releaseEventListener (line 5) | releaseEventListener(){document.removeEventListener("mousemove",this.m...
    method initializeSubdelegates (line 5) | initializeSubdelegates(){this._canvases.prepareCapacity(1),this._subde...
    method changeModel (line 5) | changeModel(t){const e=t.split("/"),i=e.pop(),s=e.join("/")+"/",r=this...
    method subdelegates (line 5) | get subdelegates(){return this._subdelegates}

FILE: dist/waifu-tips.js
  function e (line 5) | function e(e){return Array.isArray(e)?e[Math.floor(Math.random()*e.lengt...
  function t (line 5) | function t(e,t){const s=Math.floor(Math.random()*(e-1));return s>=t?s+1:s}
  function s (line 5) | function s(e,t){return new Promise(((t,s)=>{let o;o=document.createEleme...
  function i (line 5) | function i(t,s,i,n=!0){let l=parseInt(sessionStorage.getItem("waifu-mess...
  function n (line 5) | function n(e,...t){return e.replace(/\$(\d+)/g,((e,s)=>{var o;const i=pa...
  class l (line 5) | class l{constructor(e="info"){this.level=e}setLevel(e){e&&(this.level=e)...
    method constructor (line 5) | constructor(e="info"){this.level=e}
    method setLevel (line 5) | setLevel(e){e&&(this.level=e)}
    method shouldLog (line 5) | shouldLog(e){return l.levelOrder[e]<=l.levelOrder[this.level]}
    method error (line 5) | error(e,...t){this.shouldLog("error")&&console.error("[Live2D Widget][...
    method warn (line 5) | warn(e,...t){this.shouldLog("warn")&&console.warn("[Live2D Widget][WAR...
    method info (line 5) | info(e,...t){this.shouldLog("info")&&console.log("[Live2D Widget][INFO...
    method trace (line 5) | trace(e,...t){this.shouldLog("trace")&&console.log("[Live2D Widget][TR...
  class c (line 5) | class c{constructor(e,t=[]){var s;this.modelList=null;let{apiPath:o,cdnP...
    method constructor (line 5) | constructor(e,t=[]){var s;this.modelList=null;let{apiPath:o,cdnPath:i}...
    method initCheck (line 5) | static async initCheck(e,t=[]){const s=new c(e,t);if(s.useCDN){const e...
    method modelId (line 5) | set modelId(e){this._modelId=e,localStorage.setItem("modelId",e.toStri...
    method modelId (line 5) | get modelId(){return this._modelId}
    method modelTexturesId (line 5) | set modelTexturesId(e){this._modelTexturesId=e,localStorage.setItem("m...
    method modelTexturesId (line 5) | get modelTexturesId(){return this._modelTexturesId}
    method resetCanvas (line 5) | resetCanvas(){document.getElementById("waifu-canvas").innerHTML='<canv...
    method fetchWithCache (line 5) | async fetchWithCache(e){let t;if(e in this.modelJSONCache)t=this.model...
    method checkModelVersion (line 5) | checkModelVersion(e){return 3===e.Version||e.FileReferences?3:2}
    method loadLive2D (line 5) | async loadLive2D(e,t){if(this.loading)a.warn("Still loading. Abort.");...
    method loadTextureCache (line 5) | async loadTextureCache(e){return await this.fetchWithCache(`${this.cdn...
    method loadModel (line 5) | async loadModel(e){let t,s;if(this.useCDN){let e=this.modelList.models...
    method loadRandTexture (line 5) | async loadRandTexture(e="",s=""){const{modelId:o}=this;let n=!1;if(thi...
    method loadNextModel (line 5) | async loadNextModel(){this.modelTexturesId=0,this.useCDN?(this.modelId...
  class d (line 5) | class d{constructor(e,t,s){this.config=t,this.tools={hitokoto:{icon:'<sv...
    method constructor (line 5) | constructor(e,t,s){this.config=t,this.tools={hitokoto:{icon:'<svg xmln...
    method registerTools (line 5) | registerTools(){var e;Array.isArray(this.config.tools)||(this.config.t...
  function r (line 5) | async function r(t){var s;localStorage.removeItem("waifu-display"),sessi...

FILE: rollup.config.js
  function findCubismDir (line 9) | function findCubismDir() {

FILE: src/cubism2/LAppLive2DManager.js
  class LAppLive2DManager (line 8) | class LAppLive2DManager {
    method constructor (line 9) | constructor() {
    method getModel (line 17) | getModel() {
    method releaseModel (line 21) | releaseModel(gl) {
    method changeModel (line 28) | async changeModel(gl, modelSettingPath) {
    method changeModelWithJSON (line 48) | async changeModelWithJSON(gl, modelSettingPath, modelSetting) {
    method setDrag (line 63) | setDrag(x, y) {
    method maxScaleEvent (line 69) | maxScaleEvent() {
    method minScaleEvent (line 79) | minScaleEvent() {
    method tapEvent (line 89) | tapEvent(x, y) {

FILE: src/cubism2/LAppModel.js
  class LAppModel (line 13) | class LAppModel extends L2DBaseModel {
    method constructor (line 14) | constructor() {
    method loadJSON (line 23) | loadJSON(callback) {
    method loadModelSetting (line 133) | async loadModelSetting(modelSettingPath, modelSetting) {
    method load (line 147) | load(gl, modelSettingPath, callback) {
    method release (line 163) | release(gl) {
    method preloadMotionGroup (line 170) | preloadMotionGroup(name) {
    method update (line 180) | update() {
    method setRandomExpression (line 277) | setRandomExpression() {
    method startRandomMotion (line 288) | startRandomMotion(name, priority) {
    method startMotion (line 294) | startMotion(name, no, priority) {
    method setFadeInFadeOut (line 325) | setFadeInFadeOut(name, no, priority, motion) {
    method setExpression (line 349) | setExpression(name) {
    method draw (line 358) | draw(gl) {
    method hitTest (line 374) | hitTest(id, testX, testY) {

FILE: src/cubism2/Live2DFramework.js
  class L2DBaseModel (line 15) | class L2DBaseModel {
    method constructor (line 16) | constructor() {
    method getModelMatrix (line 45) | getModelMatrix() {
    method setAlpha (line 52) | setAlpha(a /*float*/) {
    method getAlpha (line 61) | getAlpha() {
    method isInitialized (line 68) | isInitialized() {
    method setInitialized (line 75) | setInitialized(v /*boolean*/) {
    method isUpdating (line 82) | isUpdating() {
    method setUpdating (line 89) | setUpdating(v /*boolean*/) {
    method getLive2DModel (line 96) | getLive2DModel() {
    method setLipSync (line 103) | setLipSync(v /*boolean*/) {
    method setLipSyncValue (line 110) | setLipSyncValue(v /*float*/) {
    method setAccel (line 117) | setAccel(x /*float*/, y /*float*/, z /*float*/) {
    method setDrag (line 126) | setDrag(x /*float*/, y /*float*/) {
    method getMainMotionManager (line 134) | getMainMotionManager() {
    method getExpressionManager (line 141) | getExpressionManager() {
    method loadModelData (line 148) | loadModelData(path /*String*/, callback) {
    method loadTexture (line 182) | loadTexture(no /*int*/, path /*String*/, callback) {
    method loadMotion (line 199) | loadMotion(name /*String*/, path /*String*/, callback) {
    method loadExpression (line 218) | loadExpression(name /*String*/, path /*String*/, callback) {
    method loadPose (line 234) | loadPose(path /*String*/, callback) {
    method loadPhysics (line 250) | loadPhysics(path /*String*/) {
    method hitTestSimple (line 265) | hitTestSimple(drawID, testX, testY) {
  class L2DExpressionMotion (line 307) | class L2DExpressionMotion extends AMotion {
    method constructor (line 308) | constructor() {
    method loadJson (line 316) | static loadJson(buf) {
    method updateParamExe (line 372) | updateParamExe(
  function L2DExpressionParam (line 404) | function L2DExpressionParam() {
  class L2DEyeBlink (line 423) | class L2DEyeBlink {
    method constructor (line 424) | constructor() {
    method calcNextBlink (line 441) | calcNextBlink() {
    method setInterval (line 450) | setInterval(blinkIntervalMsec /*int*/) {
    method setEyeMotion (line 457) | setEyeMotion(
    method updateParam (line 470) | updateParam(model /*ALive2DModel*/) {
  class L2DMatrix44 (line 543) | class L2DMatrix44 {
    method constructor (line 544) | constructor() {
    method mul (line 552) | static mul(a /*float[]*/, b /*float[]*/, dst /*float[]*/) {
    method identity (line 571) | identity() {
    method getArray (line 578) | getArray() {
    method getCopyMatrix (line 585) | getCopyMatrix() {
    method setMatrix (line 592) | setMatrix(tr /*float[]*/) {
    method getScaleX (line 600) | getScaleX() {
    method getScaleY (line 607) | getScaleY() {
    method transformX (line 614) | transformX(src /*float*/) {
    method transformY (line 621) | transformY(src /*float*/) {
    method invertTransformX (line 628) | invertTransformX(src /*float*/) {
    method invertTransformY (line 635) | invertTransformY(src /*float*/) {
    method multTranslate (line 642) | multTranslate(shiftX /*float*/, shiftY /*float*/) {
    method translate (line 650) | translate(x /*float*/, y /*float*/) {
    method translateX (line 658) | translateX(x /*float*/) {
    method translateY (line 665) | translateY(y /*float*/) {
    method multScale (line 672) | multScale(scaleX /*float*/, scaleY /*float*/) {
    method scale (line 680) | scale(scaleX /*float*/, scaleY /*float*/) {
  class L2DModelMatrix (line 699) | class L2DModelMatrix extends L2DMatrix44 {
    method constructor (line 700) | constructor(w /*float*/, h /*float*/) {
    method setPosition (line 709) | setPosition(x /*float*/, y /*float*/) {
    method setCenterPosition (line 716) | setCenterPosition(x /*float*/, y /*float*/) {
    method top (line 725) | top(y /*float*/) {
    method bottom (line 732) | bottom(y /*float*/) {
    method left (line 740) | left(x /*float*/) {
    method right (line 747) | right(x /*float*/) {
    method centerX (line 755) | centerX(x /*float*/) {
    method centerY (line 763) | centerY(y /*float*/) {
    method setX (line 771) | setX(x /*float*/) {
    method setY (line 778) | setY(y /*float*/) {
    method setHeight (line 785) | setHeight(h /*float*/) {
    method setWidth (line 794) | setWidth(w /*float*/) {
  class L2DMotionManager (line 814) | class L2DMotionManager extends MotionQueueManager {
    method constructor (line 815) | constructor() {
    method getCurrentPriority (line 826) | getCurrentPriority() {
    method getReservePriority (line 833) | getReservePriority() {
    method reserveMotion (line 840) | reserveMotion(priority /*int*/) {
    method setReservePriority (line 856) | setReservePriority(val /*int*/) {
    method updateParam (line 863) | updateParam(model /*ALive2DModel*/) {
    method startMotionPrio (line 876) | startMotionPrio(motion /*AMotion*/, priority /*int*/) {
  class L2DPhysics (line 898) | class L2DPhysics {
    method constructor (line 899) | constructor() {
    method load (line 907) | static load(buf /*byte[]*/) {
    method updateParam (line 967) | updateParam(model /*ALive2DModel*/) {
  class L2DPose (line 988) | class L2DPose {
    method constructor (line 989) | constructor() {
    method load (line 998) | static load(buf /*byte[]*/) {
    method updateParam (line 1031) | updateParam(model /*ALive2DModel*/) {
    method initParam (line 1053) | initParam(model /*ALive2DModel*/) {
    method normalizePartsOpacityGroup (line 1076) | normalizePartsOpacityGroup(
    method copyOpacityOtherParts (line 1134) | copyOpacityOtherParts(
  class L2DPartsParam (line 1157) | class L2DPartsParam {
    method constructor (line 1158) | constructor(id /*String*/) {
    method initIndex (line 1168) | initIndex(model /*ALive2DModel*/) {
  class L2DTargetPoint (line 1188) | class L2DTargetPoint {
    method constructor (line 1189) | constructor() {
    method setPoint (line 1203) | setPoint(x /*float*/, y /*float*/) {
    method getX (line 1211) | getX() {
    method getY (line 1218) | getY() {
    method update (line 1225) | update() {
  class L2DViewMatrix (line 1289) | class L2DViewMatrix extends L2DMatrix44 {
    method constructor (line 1290) | constructor() {
    method getMaxScale (line 1307) | getMaxScale() {
    method getMinScale (line 1314) | getMinScale() {
    method setMaxScale (line 1321) | setMaxScale(v /*float*/) {
    method setMinScale (line 1328) | setMinScale(v /*float*/) {
    method isMaxScale (line 1335) | isMaxScale() {
    method isMinScale (line 1342) | isMinScale() {
    method adjustTranslate (line 1349) | adjustTranslate(shiftX /*float*/, shiftY /*float*/) {
    method adjustScale (line 1369) | adjustScale(cx /*float*/, cy /*float*/, scale /*float*/) {
    method setScreenRect (line 1387) | setScreenRect(
    method setMaxScreenRect (line 1402) | setMaxScreenRect(
    method getScreenLeft (line 1417) | getScreenLeft() {
    method getScreenRight (line 1424) | getScreenRight() {
    method getScreenBottom (line 1431) | getScreenBottom() {
    method getScreenTop (line 1438) | getScreenTop() {
    method getMaxLeft (line 1445) | getMaxLeft() {
    method getMaxRight (line 1452) | getMaxRight() {
    method getMaxBottom (line 1459) | getMaxBottom() {
    method getMaxTop (line 1466) | getMaxTop() {
  class Live2DFramework (line 1484) | class Live2DFramework {
    method getPlatformManager (line 1488) | static getPlatformManager() {
    method setPlatformManager (line 1495) | static setPlatformManager(platformManager /*IPlatformManager*/) {

FILE: src/cubism2/PlatformManager.js
  class PlatformManager (line 16) | class PlatformManager {
    method constructor (line 17) | constructor() {
    method loadBytes (line 23) | loadBytes(path /*String*/, callback) {
    method loadLive2DModel (line 38) | loadLive2DModel(path /*String*/, callback) {
    method loadTexture (line 51) | loadTexture(model /*ALive2DModel*/, no /*int*/, path /*String*/, callb...
    method jsonParseFromBytes (line 107) | jsonParseFromBytes(buf) {

FILE: src/cubism2/index.js
  function normalizePoint (line 8) | function normalizePoint(x, y, x0, y0, w, h) {
  class Cubism2Model (line 30) | class Cubism2Model {
    method constructor (line 31) | constructor() {
    method initL2dCanvas (line 50) | initL2dCanvas(canvasId) {
    method init (line 68) | async init(canvasId, modelSettingPath, modelSetting) {
    method destroy (line 118) | destroy() {
    method startDraw (line 159) | startDraw() {
    method draw (line 170) | draw() {
    method changeModel (line 197) | async changeModel(modelSettingPath) {
    method changeModelWithJSON (line 201) | async changeModelWithJSON(modelSettingPath, modelSetting) {
    method modelScaling (line 205) | modelScaling(scale) {
    method modelTurnHead (line 224) | modelTurnHead(event) {
    method followPointer (line 249) | followPointer(event) {
    method lookFront (line 273) | lookFront() {
    method mouseEvent (line 277) | mouseEvent(e) {
    method touchEvent (line 292) | touchEvent(e) {
    method transformViewX (line 320) | transformViewX(deviceX) {
    method transformViewY (line 325) | transformViewY(deviceY) {
    method transformScreenX (line 330) | transformScreenX(deviceX) {
    method transformScreenY (line 334) | transformScreenY(deviceY) {

FILE: src/cubism2/utils/MatrixStack.js
  class MatrixStack (line 9) | class MatrixStack {
    method reset (line 10) | static reset() {
    method loadIdentity (line 14) | static loadIdentity() {
    method push (line 20) | static push() {
    method pop (line 36) | static pop() {
    method getMatrix (line 48) | static getMatrix() {
    method multMatrix (line 52) | static multMatrix(matNew) {

FILE: src/cubism2/utils/ModelSettingJson.js
  class ModelSettingJson (line 3) | class ModelSettingJson {
    method constructor (line 4) | constructor() {
    method loadModelSetting (line 27) | loadModelSetting(path, callback) {
    method getTextureFile (line 36) | getTextureFile(n) {
    method getModelFile (line 43) | getModelFile() {
    method getTextureNum (line 47) | getTextureNum() {
    method getHitAreaNum (line 53) | getHitAreaNum() {
    method getHitAreaCustom (line 59) | getHitAreaCustom() {
    method getHitAreaID (line 63) | getHitAreaID(n) {
    method getHitAreaName (line 73) | getHitAreaName(n) {
    method getPhysicsFile (line 83) | getPhysicsFile() {
    method getPoseFile (line 87) | getPoseFile() {
    method getExpressionNum (line 91) | getExpressionNum() {
    method getExpressionFile (line 97) | getExpressionFile(n) {
    method getExpressionName (line 102) | getExpressionName(n) {
    method getLayout (line 107) | getLayout() {
    method getInitParamNum (line 111) | getInitParamNum() {
    method getMotionNum (line 117) | getMotionNum(name) {
    method getMotionFile (line 127) | getMotionFile(name, n) {
    method getMotionSound (line 138) | getMotionSound(name, n) {
    method getMotionFadeIn (line 150) | getMotionFadeIn(name, n) {
    method getMotionFadeOut (line 162) | getMotionFadeOut(name, n) {
    method getInitParamID (line 174) | getInitParamID(n) {
    method getInitParamValue (line 184) | getInitParamValue(n) {
    method getInitPartsVisibleNum (line 194) | getInitPartsVisibleNum() {
    method getInitPartsVisibleID (line 200) | getInitPartsVisibleID(n) {
    method getInitPartsVisibleValue (line 209) | getInitPartsVisibleValue(n) {

FILE: src/cubism5/index.js
  class AppSubdelegate (line 13) | class AppSubdelegate extends LAppSubdelegate {
    method initialize (line 18) | initialize(canvas) {
    method onResize (line 78) | onResize() {
    method update (line 87) | update() {
  class AppDelegate (line 124) | class AppDelegate extends LAppDelegate {
    method run (line 128) | run() {
    method stop (line 145) | stop() {
    method release (line 152) | release() {
    method transformOffset (line 160) | transformOffset(e) {
    method onMouseMove (line 174) | onMouseMove(e) {
    method onMouseEnd (line 186) | onMouseEnd(e) {
    method onTap (line 193) | onTap(e) {
    method initializeEventListener (line 203) | initializeEventListener() {
    method releaseEventListener (line 219) | releaseEventListener() {
    method initializeSubdelegates (line 236) | initializeSubdelegates() {
    method changeModel (line 274) | changeModel(modelSettingPath) {
    method subdelegates (line 290) | get subdelegates() {

FILE: src/drag.ts
  function registerDrag (line 1) | function registerDrag() {

FILE: src/logger.ts
  type LogLevel (line 1) | type LogLevel = 'error' | 'warn' | 'info' | 'trace';
  class Logger (line 3) | class Logger {
    method constructor (line 13) | constructor(level: LogLevel = 'info') {
    method setLevel (line 17) | setLevel(level: LogLevel | undefined) {
    method shouldLog (line 22) | private shouldLog(level: LogLevel): boolean {
    method error (line 26) | error(message: string, ...args: any[]) {
    method warn (line 32) | warn(message: string, ...args: any[]) {
    method info (line 38) | info(message: string, ...args: any[]) {
    method trace (line 44) | trace(message: string, ...args: any[]) {

FILE: src/message.ts
  type Time (line 8) | type Time = {
  function showMessage (line 30) | function showMessage(
  function welcomeMessage (line 68) | function welcomeMessage(time: Time, welcomeTemplate?: string, referrerTe...
  function i18n (line 92) | function i18n(template: string, ...args: string[]) {

FILE: src/model.ts
  type ModelListCDN (line 12) | interface ModelListCDN {
  type ModelList (line 17) | interface ModelList {
  type Config (line 23) | interface Config {
  class ModelManager (line 74) | class ModelManager {
    method constructor (line 93) | private constructor(config: Config, models: ModelList[] = []) {
    method initCheck (line 130) | public static async initCheck(config: Config, models: ModelList[] = []) {
    method modelId (line 165) | public set modelId(modelId: number) {
    method modelId (line 170) | public get modelId() {
    method modelTexturesId (line 174) | public set modelTexturesId(modelTexturesId: number) {
    method modelTexturesId (line 179) | public get modelTexturesId() {
    method resetCanvas (line 183) | resetCanvas() {
    method fetchWithCache (line 187) | async fetchWithCache(url: string) {
    method checkModelVersion (line 203) | checkModelVersion(modelSetting: any) {
    method loadLive2D (line 210) | async loadLive2D(modelSettingPath: string, modelSetting: object) {
    method loadTextureCache (line 267) | async loadTextureCache(modelName: string): Promise<any[]> {
    method loadModel (line 276) | async loadModel(message: string | string[]) {
    method loadRandTexture (line 306) | async loadRandTexture(successMessage: string | string[] = '', failMess...
    method loadNextModel (line 345) | async loadNextModel() {

FILE: src/tools.ts
  type Tools (line 19) | interface Tools {
  class ToolsManager (line 41) | class ToolsManager {
    method constructor (line 45) | constructor(model: ModelManager, config: Config, tips: Tips) {
    method registerTools (line 135) | registerTools() {

FILE: src/types/live2dApi.d.ts
  class Live2DModelWebGL (line 20) | class Live2DModelWebGL {

FILE: src/types/window.d.ts
  type Window (line 5) | interface Window {

FILE: src/utils.ts
  function randomSelection (line 11) | function randomSelection(obj: string[] | string): string {
  function randomOtherOption (line 15) | function randomOtherOption(total: number, excludeIndex: number): number {
  function loadExternalResource (line 25) | function loadExternalResource(url: string, type: string): Promise<string> {

FILE: src/widget.ts
  type Tips (line 14) | interface Tips {
  function registerEventListener (line 85) | function registerEventListener(tips: Tips) {
  function loadWidget (line 175) | async function loadWidget(config: Config) {
  function initWidget (line 208) | function initWidget(config: string | Config) {
Condensed preview — 82 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (632K chars).
[
  {
    "path": ".github/workflows/linter.yml",
    "chars": 266,
    "preview": "name: Linter\n\non: [push, pull_request]\n\njobs:\n  linter:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checko"
  },
  {
    "path": ".github/workflows/tester.yml",
    "chars": 464,
    "preview": "name: Tester\n\non: [push, pull_request]\n\njobs:\n  tester:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n      "
  },
  {
    "path": ".gitignore",
    "chars": 114,
    "preview": "package-lock.json\nnode_modules/\n.DS_Store\n.idea/\n.vscode/\nbackup/\nsrc/CubismSdkForWeb-*/\nbuild/CubismSdkForWeb-*/\n"
  },
  {
    "path": ".prettierignore",
    "chars": 18,
    "preview": "node_modules\ndist\n"
  },
  {
    "path": ".prettierrc.yaml",
    "chars": 97,
    "preview": "tabWidth: 2\nsemi: true\nsingleQuote: true\njsxSingleQuote: true\ntrailingComma: all\nendOfLine: crlf\n"
  },
  {
    "path": "LICENSE",
    "chars": 35149,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "README.en.md",
    "chars": 12977,
    "preview": "# Live2D Widget\n\n![](https://forthebadge.com/images/badges/built-with-love.svg)\n![](https://forthebadge.com/images/badge"
  },
  {
    "path": "README.md",
    "chars": 7972,
    "preview": "# Live2D Widget\n\n![](https://forthebadge.com/images/badges/built-with-love.svg)\n![](https://forthebadge.com/images/badge"
  },
  {
    "path": "build/cubism2/LAppDefine.d.ts",
    "chars": 772,
    "preview": "export default LAppDefine;\ndeclare namespace LAppDefine {\n    let VIEW_MAX_SCALE: number;\n    let VIEW_MIN_SCALE: number"
  },
  {
    "path": "build/cubism2/LAppDefine.js",
    "chars": 648,
    "preview": "const LAppDefine = {\n    VIEW_MAX_SCALE: 1.5,\n    VIEW_MIN_SCALE: 1,\n    VIEW_LOGICAL_LEFT: -1,\n    VIEW_LOGICAL_RIGHT: "
  },
  {
    "path": "build/cubism2/LAppLive2DManager.d.ts",
    "chars": 498,
    "preview": "export default LAppLive2DManager;\ndeclare class LAppLive2DManager {\n    model: LAppModel;\n    reloading: boolean;\n    ge"
  },
  {
    "path": "build/cubism2/LAppLive2DManager.js",
    "chars": 2705,
    "preview": "import { Live2DFramework } from './Live2DFramework.js';\nimport LAppModel from './LAppModel.js';\nimport PlatformManager f"
  },
  {
    "path": "build/cubism2/LAppModel.d.ts",
    "chars": 876,
    "preview": "export default LAppModel;\ndeclare class LAppModel extends L2DBaseModel {\n    modelHomeDir: string;\n    modelSetting: Mod"
  },
  {
    "path": "build/cubism2/LAppModel.js",
    "chars": 12079,
    "preview": "import { L2DBaseModel, Live2DFramework, L2DEyeBlink } from './Live2DFramework.js';\nimport ModelSettingJson from './utils"
  },
  {
    "path": "build/cubism2/Live2DFramework.d.ts",
    "chars": 5321,
    "preview": "export class L2DBaseModel {\n    live2DModel: any;\n    modelMatrix: L2DModelMatrix;\n    eyeBlink: any;\n    physics: L2DPh"
  },
  {
    "path": "build/cubism2/Live2DFramework.js",
    "chars": 30527,
    "preview": "import logger from '../logger.js';\nclass L2DBaseModel {\n    constructor() {\n        this.live2DModel = null;\n        thi"
  },
  {
    "path": "build/cubism2/PlatformManager.d.ts",
    "chars": 289,
    "preview": "export default PlatformManager;\ndeclare class PlatformManager {\n    cache: {};\n    loadBytes(path: any, callback: any): "
  },
  {
    "path": "build/cubism2/PlatformManager.js",
    "chars": 2552,
    "preview": "import logger from '../logger.js';\nclass PlatformManager {\n    constructor() {\n        this.cache = {};\n    }\n    loadBy"
  },
  {
    "path": "build/cubism2/index.d.ts",
    "chars": 1283,
    "preview": "export default Cubism2Model;\ndeclare class Cubism2Model {\n    live2DMgr: LAppLive2DManager;\n    isDrawStart: boolean;\n  "
  },
  {
    "path": "build/cubism2/index.js",
    "chars": 9914,
    "preview": "import { L2DMatrix44, L2DTargetPoint, L2DViewMatrix } from './Live2DFramework.js';\nimport LAppDefine from './LAppDefine."
  },
  {
    "path": "build/cubism2/utils/MatrixStack.d.ts",
    "chars": 383,
    "preview": "export default MatrixStack;\ndeclare class MatrixStack {\n    static reset(): void;\n    static loadIdentity(): void;\n    s"
  },
  {
    "path": "build/cubism2/utils/MatrixStack.js",
    "chars": 1666,
    "preview": "class MatrixStack {\n    static reset() {\n        this.depth = 0;\n    }\n    static loadIdentity() {\n        for (let i = "
  },
  {
    "path": "build/cubism2/utils/ModelSettingJson.d.ts",
    "chars": 1334,
    "preview": "export default ModelSettingJson;\ndeclare class ModelSettingJson {\n    NAME: string;\n    ID: string;\n    MODEL: string;\n "
  },
  {
    "path": "build/cubism2/utils/ModelSettingJson.js",
    "chars": 5688,
    "preview": "import { Live2DFramework } from '../Live2DFramework.js';\nclass ModelSettingJson {\n    constructor() {\n        this.NAME "
  },
  {
    "path": "build/cubism5/index.d.ts",
    "chars": 604,
    "preview": "export class AppDelegate extends LAppDelegate {\n    _drawFrameId: number;\n    stop(): void;\n    transformOffset(e: any):"
  },
  {
    "path": "build/cubism5/index.js",
    "chars": 7119,
    "preview": "import { LAppDelegate } from '@demo/lappdelegate.js';\nimport { LAppSubdelegate } from '@demo/lappsubdelegate.js';\nimport"
  },
  {
    "path": "build/drag.d.ts",
    "chars": 68,
    "preview": "declare function registerDrag(): void;\nexport default registerDrag;\n"
  },
  {
    "path": "build/drag.js",
    "chars": 1461,
    "preview": "function registerDrag() {\n    const element = document.getElementById('waifu');\n    if (!element)\n        return;\n    le"
  },
  {
    "path": "build/icons.d.ts",
    "chars": 6089,
    "preview": "declare const fa_comment = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><!--! Font Awesome Free 6."
  },
  {
    "path": "build/icons.js",
    "chars": 5977,
    "preview": "const fa_comment = '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.7.2 by @font"
  },
  {
    "path": "build/index.d.ts",
    "chars": 317,
    "preview": "export { default as registerDrag } from './drag.js';\nexport { default as logger, LogLevel } from './logger.js';\nexport {"
  },
  {
    "path": "build/index.js",
    "chars": 307,
    "preview": "export { default as registerDrag } from './drag.js';\nexport { default as logger } from './logger.js';\nexport { default a"
  },
  {
    "path": "build/logger.d.ts",
    "chars": 507,
    "preview": "type LogLevel = 'error' | 'warn' | 'info' | 'trace';\ndeclare class Logger {\n    private static levelOrder;\n    private l"
  },
  {
    "path": "build/logger.js",
    "chars": 1028,
    "preview": "class Logger {\n    constructor(level = 'info') {\n        this.level = level;\n    }\n    setLevel(level) {\n        if (!le"
  },
  {
    "path": "build/message.d.ts",
    "chars": 397,
    "preview": "type Time = {\n    hour: string;\n    text: string;\n}[];\ndeclare function showMessage(text: string | string[], timeout: nu"
  },
  {
    "path": "build/message.js",
    "chars": 1981,
    "preview": "import { randomSelection } from './utils.js';\nlet messageTimer = null;\nfunction showMessage(text, timeout, priority, ove"
  },
  {
    "path": "build/model.d.ts",
    "chars": 1497,
    "preview": "import { LogLevel } from './logger.js';\ninterface ModelList {\n    name: string;\n    paths: string[];\n    message: string"
  },
  {
    "path": "build/model.js",
    "chars": 10357,
    "preview": "import { showMessage } from './message.js';\nimport { loadExternalResource, randomOtherOption } from './utils.js';\nimport"
  },
  {
    "path": "build/tools.d.ts",
    "chars": 403,
    "preview": "import type { Config, ModelManager } from './model.js';\nimport type { Tips } from './widget.js';\ninterface Tools {\n    ["
  },
  {
    "path": "build/tools.js",
    "chars": 4765,
    "preview": "import { fa_comment, fa_paper_plane, fa_street_view, fa_shirt, fa_camera_retro, fa_info_circle, fa_xmark } from './icons"
  },
  {
    "path": "build/utils.d.ts",
    "chars": 299,
    "preview": "declare function randomSelection(obj: string[] | string): string;\ndeclare function randomOtherOption(total: number, excl"
  },
  {
    "path": "build/utils.js",
    "chars": 899,
    "preview": "function randomSelection(obj) {\n    return Array.isArray(obj) ? obj[Math.floor(Math.random() * obj.length)] : obj;\n}\nfun"
  },
  {
    "path": "build/waifu-tips.d.ts",
    "chars": 11,
    "preview": "export {};\n"
  },
  {
    "path": "build/waifu-tips.js",
    "chars": 74,
    "preview": "import { initWidget } from './widget.js';\nwindow.initWidget = initWidget;\n"
  },
  {
    "path": "build/widget.d.ts",
    "chars": 867,
    "preview": "import { Config, ModelList } from './model.js';\nimport { Time } from './message.js';\ninterface Tips {\n    message: {\n   "
  },
  {
    "path": "build/widget.js",
    "chars": 6092,
    "preview": "import { ModelManager } from './model.js';\nimport { showMessage, welcomeMessage } from './message.js';\nimport { randomSe"
  },
  {
    "path": "demo/chat.html",
    "chars": 5729,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1,"
  },
  {
    "path": "demo/demo.html",
    "chars": 1473,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>Live2D 看板娘 / Demo</title>\n<style>\n#github svg {\n\ttransition:"
  },
  {
    "path": "demo/login.html",
    "chars": 6492,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1,"
  },
  {
    "path": "dist/autoload.js",
    "chars": 2859,
    "preview": "/*!\n * Live2D Widget\n * https://github.com/stevenjoezhang/live2d-widget\n */\n\n// Recommended to use absolute path for liv"
  },
  {
    "path": "dist/chunk/index.js",
    "chars": 32830,
    "preview": "/*!\n * Live2D Widget\n * https://github.com/stevenjoezhang/live2d-widget\n */\nimport{l as t}from\"../waifu-tips.js\";class e"
  },
  {
    "path": "dist/chunk/index2.js",
    "chars": 208848,
    "preview": "/*!\n * Live2D Widget\n * https://github.com/stevenjoezhang/live2d-widget\n */\nimport{l as t}from\"../waifu-tips.js\";class e"
  },
  {
    "path": "dist/waifu-tips.js",
    "chars": 17984,
    "preview": "/*!\n * Live2D Widget\n * https://github.com/stevenjoezhang/live2d-widget\n */\nfunction e(e){return Array.isArray(e)?e[Math"
  },
  {
    "path": "dist/waifu-tips.json",
    "chars": 10769,
    "preview": "{\n  \"mouseover\": [{\n    \"selector\": \"#waifu-tool-hitokoto\",\n    \"text\": [\"猜猜我要说些什么?\", \"我从青蛙王子那里听到了不少人生经验。\"]\n  }, {\n    \""
  },
  {
    "path": "dist/waifu.css",
    "chars": 4966,
    "preview": "#waifu-toggle {\n\tbackground-color: #fa0;\n\tborder-radius: 5px;\n\tbottom: 66px;\n\tcursor: pointer;\n\tdisplay: flex;\n\tjustify-"
  },
  {
    "path": "eslint.config.js",
    "chars": 451,
    "preview": "// @ts-check\n\nimport eslint from '@eslint/js';\nimport tseslint from 'typescript-eslint';\n\nexport default tseslint.config"
  },
  {
    "path": "package.json",
    "chars": 1258,
    "preview": "{\n  \"name\": \"live2d-widgets\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Live2D widget for web pages\",\n  \"main\": \"build/ind"
  },
  {
    "path": "renovate.json",
    "chars": 114,
    "preview": "{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n  \"extends\": [\n    \"config:recommended\"\n  ]\n}\n"
  },
  {
    "path": "rollup.config.js",
    "chars": 1219,
    "preview": "import terser from '@rollup/plugin-terser';\nimport alias from '@rollup/plugin-alias';\nimport fs from 'fs';\nimport path f"
  },
  {
    "path": "src/cubism2/LAppDefine.js",
    "chars": 614,
    "preview": "const LAppDefine = {\n  VIEW_MAX_SCALE: 1.5,\n  VIEW_MIN_SCALE: 1,\n\n  VIEW_LOGICAL_LEFT: -1,\n  VIEW_LOGICAL_RIGHT: 1,\n\n  V"
  },
  {
    "path": "src/cubism2/LAppLive2DManager.js",
    "chars": 2525,
    "preview": "/* global Live2D */\nimport { Live2DFramework } from './Live2DFramework.js';\nimport LAppModel from './LAppModel.js';\nimpo"
  },
  {
    "path": "src/cubism2/LAppModel.js",
    "chars": 11833,
    "preview": "/* global UtSystem, document */\nimport { L2DBaseModel, Live2DFramework, L2DEyeBlink } from './Live2DFramework.js';\nimpor"
  },
  {
    "path": "src/cubism2/Live2DFramework.js",
    "chars": 50287,
    "preview": "/* global Live2D, Live2DMotion, AMotion, UtSystem, MotionQueueManager, PhysicsHair, UtDebug, PartsDataID */\n/**\n *\n *  Y"
  },
  {
    "path": "src/cubism2/PlatformManager.js",
    "chars": 3727,
    "preview": "/* global Image, Live2DModelWebGL, document, fetch */\n/**\n *\n *  You can modify and use this source freely\n *  only for "
  },
  {
    "path": "src/cubism2/index.js",
    "chars": 9317,
    "preview": "/* global document, window, Event, Live2D */\nimport { L2DMatrix44, L2DTargetPoint, L2DViewMatrix } from './Live2DFramewo"
  },
  {
    "path": "src/cubism2/utils/MatrixStack.js",
    "chars": 1698,
    "preview": "/**\n *\n *  You can modify and use this source freely\n *  only for the development of application related Live2D.\n *\n *  "
  },
  {
    "path": "src/cubism2/utils/ModelSettingJson.js",
    "chars": 5227,
    "preview": "import { Live2DFramework } from '../Live2DFramework.js';\n\nclass ModelSettingJson {\n  constructor() {\n    this.NAME = 'na"
  },
  {
    "path": "src/cubism5/index.js",
    "chars": 8856,
    "preview": "/* global document, window, Event */\n\nimport { LAppDelegate } from '@demo/lappdelegate.js';\nimport { LAppSubdelegate } f"
  },
  {
    "path": "src/drag.ts",
    "chars": 1828,
    "preview": "function registerDrag() {\n  const element = document.getElementById('waifu');\n  if (!element) return;\n  let winWidth = w"
  },
  {
    "path": "src/icons.ts",
    "chars": 6000,
    "preview": "const fa_comment = '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 6.7.2 by @font"
  },
  {
    "path": "src/index.ts",
    "chars": 366,
    "preview": "/**\n * @file Main module.\n * @module index\n */\n\nexport { default as registerDrag } from './drag.js';\nexport { default as"
  },
  {
    "path": "src/logger.ts",
    "chars": 1185,
    "preview": "type LogLevel = 'error' | 'warn' | 'info' | 'trace';\n\nclass Logger {\n  private static levelOrder: Record<LogLevel, numbe"
  },
  {
    "path": "src/message.ts",
    "chars": 2887,
    "preview": "/**\n * @file Contains functions for displaying waifu messages.\n * @module message\n */\n\nimport { randomSelection } from '"
  },
  {
    "path": "src/model.ts",
    "chars": 11364,
    "preview": "/**\n * @file Contains classes related to waifu model loading and management.\n * @module model\n */\n\nimport { showMessage "
  },
  {
    "path": "src/tools.ts",
    "chars": 4474,
    "preview": "/**\n * @file Contains the configuration and functions for waifu tools.\n * @module tools\n */\n\nimport {\n  fa_comment,\n  fa"
  },
  {
    "path": "src/types/index.d.ts",
    "chars": 124,
    "preview": "/**\n * @file Export all type definitions.\n * @module types/index\n */\nexport * from './live2dApi';\nexport * from './windo"
  },
  {
    "path": "src/types/live2dApi.d.ts",
    "chars": 1405,
    "preview": "/**\n * @file Define types for Live2D API.\n * @module types/live2dApi\n */\ndeclare namespace Live2D {\n  /**\n   * Initializ"
  },
  {
    "path": "src/types/window.d.ts",
    "chars": 411,
    "preview": "/**\n * @file Define the type of the global window object.\n * @module types/window\n */\ninterface Window {\n  /**\n   * Aste"
  },
  {
    "path": "src/utils.ts",
    "chars": 1351,
    "preview": "/**\n * @file Contains utility functions.\n * @module utils\n */\n\n/**\n * Randomly select an element from an array, or retur"
  },
  {
    "path": "src/waifu-tips.ts",
    "chars": 153,
    "preview": "/**\n * @file Export initWidget function to window.\n * @module waifu-tips\n */\n\nimport { initWidget } from './widget.js';\n"
  },
  {
    "path": "src/widget.ts",
    "chars": 7139,
    "preview": "/**\n * @file Contains functions for initializing the waifu widget.\n * @module widget\n */\n\nimport { ModelManager, Config,"
  },
  {
    "path": "tsconfig.json",
    "chars": 603,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"es2017\",\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"declaratio"
  }
]

About this extraction

This page contains the full source code of the stevenjoezhang/live2d-widget GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 82 files (598.7 KB), approximately 177.1k tokens, and a symbol index with 1844 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!